/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #1a1a2e;
    color: #eee;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Card Pack Animations */
@keyframes packShake {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    10% { transform: translateX(-5px) rotate(-2deg); }
    20% { transform: translateX(5px) rotate(2deg); }
    30% { transform: translateX(-5px) rotate(-2deg); }
    40% { transform: translateX(5px) rotate(2deg); }
    50% { transform: translateX(-5px) rotate(-2deg); }
    60% { transform: translateX(5px) rotate(2deg); }
    70% { transform: translateX(-5px) rotate(-2deg); }
    80% { transform: translateX(5px) rotate(2deg); }
    90% { transform: translateX(-5px) rotate(-2deg); }
}

@keyframes sparkle {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% { 
        transform: scale(1.3) rotate(180deg);
        opacity: 0.7;
    }
}

/* Remove blue highlight on button click/focus */
button:focus,
button:active,
.btn:focus,
.btn:active,
.nav-btn:focus,
.nav-btn:active,
.tab-btn:focus,
.tab-btn:active,
.sort-btn:focus,
.sort-btn:active,
.recruitment-sort-btn:focus,
.recruitment-sort-btn:active,
.menu-btn:focus,
.menu-btn:active,
.hero-card:focus,
.hero-card:active,
.disaster-card:focus,
.disaster-card:active,
.sequence-card:focus,
.sequence-card:active,
.calendar-day:focus,
.calendar-day:active {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

#app {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Screen Management */
.screen {
    display: none;
    width: 100%;
    height: 100%;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Main Menu */
#main-menu {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.menu-container {
    text-align: center;
    padding: 40px;
    background: rgba(15, 15, 30, 0.8);
    border: 4px solid #0f3460;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 200, 255, 0.3);
}

.game-title {
    font-size: 48px;
    color: #00d4ff;
    text-shadow: 4px 4px 0 #0f3460;
    margin-bottom: 40px;
    letter-spacing: 4px;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-btn {
    padding: 15px 40px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    background: #0f3460;
    color: #00d4ff;
    border: 3px solid #00d4ff;
    cursor: default;
    transition: all 0.2s;
    outline: none;
}

.menu-btn:hover {
    background: #00d4ff;
    color: #0f3460;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.4);
}

.menu-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Universe Creation */
#universe-creation {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.creation-container {
    background: rgba(15, 15, 30, 0.9);
    padding: 40px;
    border: 4px solid #0f3460;
    border-radius: 8px;
    min-width: 500px;
}

.creation-container h2 {
    color: #00d4ff;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #00d4ff;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    background: #0f1923;
    color: #eee;
    border: 2px solid #0f3460;
    border-radius: 4px;
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 2px solid;
    cursor: default;
    transition: all 0.2s;
    background: #0f3460;
    color: #00d4ff;
    border-color: #00d4ff;
    outline: none;
}

.btn:hover {
    background: #00d4ff;
    color: #0f3460;
    transform: translateY(-2px);
}

.btn-primary {
    background: #00d4ff;
    color: #0f3460;
    border-color: #00d4ff;
}

.btn-primary:hover {
    background: #00a8cc;
    border-color: #00a8cc;
}

.btn-secondary {
    background: #533483;
    color: #eee;
    border-color: #7b4397;
}

.btn-secondary:hover {
    background: #7b4397;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Game Screen Layout */
.top-bar {
    background: #0f1923;
    border-bottom: 3px solid #0f3460;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.league-info,
.time-info,
.save-load-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.league-name-display {
    font-size: 20px;
    color: #00d4ff;
    font-weight: bold;
}

.budget-display,
.diamonds-display {
    font-size: 16px;
    padding: 5px 15px;
    background: #16213e;
    border: 2px solid #0f3460;
    border-radius: 4px;
}

.date-display {
    font-size: 16px;
    color: #00d4ff;
}

.btn-next-month {
    font-size: 16px;
    padding: 8px 20px;
}

.btn-save,
.btn-load {
    font-size: 14px;
    padding: 8px 16px;
    background: #0f3460;
    color: #00d4ff;
    border: 2px solid #00d4ff;
    cursor: default;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.btn-save:hover,
.btn-load:hover {
    background: #00d4ff;
    color: #0f3460;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 212, 255, 0.4);
}

.btn-save:active,
.btn-load:active {
    transform: translateY(0);
}

.save-feedback {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #4caf50;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-out 2.7s forwards;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background: #0f1923;
    border-right: 3px solid #0f3460;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
}

.nav-btn {
    padding: 12px 20px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    background: transparent;
    color: #eee;
    outline: none;
    border: none;
    border-left: 4px solid transparent;
    cursor: default;
    text-align: left;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #16213e;
    border-left-color: #00d4ff;
}

.nav-btn.active {
    background: #16213e;
    border-left-color: #00d4ff;
    color: #00d4ff;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: #16213e;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view h2 {
    color: #00d4ff;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dash-card {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.dash-card h3 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 14px;
}

.stat-value {
    font-size: 32px;
    color: #eee;
    font-weight: bold;
}

.recent-events {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
}

.recent-events h3 {
    color: #00d4ff;
    margin-bottom: 15px;
}

#recent-events-list {
    max-height: 300px;
    overflow-y: auto;
}

.event-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #16213e;
    border-left: 3px solid #00d4ff;
    border-radius: 4px;
}

/* Heroes Grid */
.heroes-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#search-heroes {
    flex: 1;
    padding: 8px 12px;
    background: #0f1923;
    border: 2px solid #0f3460;
    color: #eee;
    font-family: 'Courier New', monospace;
}

.heroes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.hero-card {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    outline: none;
    padding: 15px;
    cursor: default;
    transition: all 0.2s;
}

.hero-avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: rgba(15, 52, 96, 0.3);
    border-radius: 8px;
}

.hero-avatar-img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: 64px;
    height: 64px;
    animation: avatarIdle 3s ease-in-out infinite;
}

.deployment-hero-avatar {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: 48px;
    height: 48px;
    margin: 0 auto;
    display: block;
    animation: avatarIdle 3s ease-in-out infinite;
}

@keyframes avatarIdle {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.02);
    }
}

@keyframes avatarDance {
    0%, 100% {
        transform: translateY(0px) rotate(0deg) scale(1);
    }
    10% {
        transform: translateY(-10px) rotate(-8deg) scale(1.08);
    }
    20% {
        transform: translateY(-5px) rotate(8deg) scale(1.08);
    }
    30% {
        transform: translateY(-12px) rotate(-5deg) scale(1.12);
    }
    40% {
        transform: translateY(-3px) rotate(5deg) scale(1.08);
    }
    50% {
        transform: translateY(-15px) rotate(0deg) scale(1.15);
    }
    60% {
        transform: translateY(-5px) rotate(-8deg) scale(1.08);
    }
    70% {
        transform: translateY(-10px) rotate(8deg) scale(1.08);
    }
    80% {
        transform: translateY(-3px) rotate(-5deg) scale(1.05);
    }
    90% {
        transform: translateY(-8px) rotate(5deg) scale(1.08);
    }
}

.mvp-avatar-dance {
    animation: avatarDance 1s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

.hero-avatar-canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.hero-card:hover {
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hero-name {
    font-size: 18px;
    color: #00d4ff;
    font-weight: bold;
}

.hero-level {
    color: #ffb400;
}

.hero-role {
    color: #888;
    font-size: 12px;
    margin-bottom: 10px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    font-size: 12px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
}

.rarity-common { border-left: 4px solid #888; }
.rarity-uncommon { border-left: 4px solid #4caf50; }
.rarity-rare { border-left: 4px solid #2196f3; }
.rarity-epic { border-left: 4px solid #9c27b0; }
.rarity-legendary { border-left: 4px solid #ff9800; }

/* Disasters */
.disaster-card,
.sequence-card {
    background: #0f1923;
    border: 2px solid #ff3860;
    outline: none;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.disaster-header,
.sequence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.disaster-title,
.sequence-title {
    font-size: 20px;
    color: #ff3860;
}

.disaster-location,
.sequence-location {
    color: #888;
}

.disaster-enemies {
    margin: 15px 0;
}

.enemy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.enemy-chip {
    background: #16213e;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #0f3460;
    font-size: 12px;
}

.disaster-actions,
.sequence-actions {
    display: flex;
    gap: 10px;
}

/* Vertical Sequence Visualization */
.vertical-sequence {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.sequence-step {
    display: flex;
    gap: 15px;
    position: relative;
    padding: 10px 0;
}

.sequence-step.current {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.sequence-step.completed .step-content {
    opacity: 0.6;
}

.sequence-step.future .step-content {
    opacity: 0.4;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 0 15px currentColor;
}

.step-connector {
    position: absolute;
    left: 19px;
    top: 50px;
    width: 2px;
    height: calc(100% + 10px);
    background: linear-gradient(to bottom, #555, transparent);
}

.step-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sequence-step.current .step-content {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.step-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #00d4ff;
}

.current-badge {
    background: #00d4ff;
    color: #0f3460;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 10px;
}

.step-enemies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enemy-preview {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 4px;
    border-left: 3px solid #ff3860;
}

.enemy-name {
    font-weight: bold;
    color: #ff3860;
    margin-right: 10px;
}

.enemy-level {
    color: #ffb400;
    font-size: 12px;
}

.enemy-stats-mini {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* Hero States Display */
.hero-states-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.hero-state-mini {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-state-name {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #00d4ff;
}

.hero-state-bar {
    margin-bottom: 5px;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.step-hero-states {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.deployment-hero.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.deployment-hero.disabled:hover {
    transform: none;
}

/* Selected Hero Indication */
.deployment-hero.selected {
    border-color: #4caf50 !important;
    border-width: 3px !important;
    background: rgba(76, 175, 80, 0.15) !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6), inset 0 0 15px rgba(76, 175, 80, 0.25) !important;
    position: relative;
    transform: scale(1.02);
}

.deployment-hero.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.7), 0 0 0 3px rgba(76, 175, 80, 0.3);
    z-index: 10;
    animation: checkmark-pulse 2s infinite;
}

@keyframes checkmark-pulse {
    0%, 100% { 
        box-shadow: 0 2px 10px rgba(76, 175, 80, 0.7), 0 0 0 3px rgba(76, 175, 80, 0.3);
    }
    50% { 
        box-shadow: 0 2px 15px rgba(76, 175, 80, 0.9), 0 0 0 5px rgba(76, 175, 80, 0.5);
    }
}

.deployment-hero.selected .hero-name {
    color: #4caf50 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.deployment-hero.selected .hero-avatar {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
    border: 2px solid #4caf50;
}

.deployment-hero.selected:hover {
    border-color: #4caf50 !important;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.8), inset 0 0 15px rgba(76, 175, 80, 0.25) !important;
}

/* Calendar */
.calendar-grid {
    width: 100%;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    color: #00d4ff;
    padding: 8px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 4px;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 120px;
    background: #0f1923;
    border: 2px solid #0f3460;
    outline: none;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    min-height: auto;
}

.calendar-day.has-disaster {
    border-color: #ff3860;
    background: rgba(255, 56, 96, 0.1);
}

.calendar-day-number {
    font-weight: bold;
    font-size: 16px;
    color: #00d4ff;
    margin-bottom: 5px;
}

.calendar-sequence,
.calendar-disaster {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 4px;
    font-size: 11px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;
}

.calendar-status.completed {
    background: #4caf50;
    color: white;
}

.calendar-status.failed {
    background: #ff3860;
    color: white;
}

.calendar-status.active {
    background: #00d4ff;
    color: #0f3460;
}

.calendar-status.future {
    background: #555;
    color: #ccc;
}

.calendar-status.retry {
    background: #ffb400;
    color: #0f3460;
    font-weight: bold;
}

.calendar-sequence-title {
    font-weight: bold;
    color: #00d4ff;
    font-size: 11px;
    margin-bottom: 4px;
}

.calendar-sequence-enemies {
    color: #888;
    font-size: 10px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-sequence-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
}

.calendar-sequence-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
}

.calendar-sequence-actions .btn {
    padding: 4px 8px;
    font-size: 10px;
    flex: 1;
}

.calendar-edit-deploy-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
    flex: 0 0 auto !important;
    min-width: 50px;
    background: #555 !important;
    border-color: #666 !important;
}

.calendar-edit-deploy-btn:hover {
    background: #666 !important;
    border-color: #777 !important;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Sort Buttons */
.sort-btn,
.recruitment-sort-btn {
    transition: all 0.2s;
}

.sort-btn.active,
.recruitment-sort-btn.active {
    background: #00d4ff;
    color: #0f3460;
    border-color: #00d4ff;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.sort-btn.active:hover,
.recruitment-sort-btn.active:hover {
    background: #00a8cc;
    border-color: #00a8cc;
}

/* Recruitment */
.recruitment-tabs,
.rankings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: #0f1923;
    border: 2px solid #0f3460;
    color: #eee;
    font-family: 'Courier New', monospace;
    outline: none;
    cursor: default;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #00d4ff;
    color: #0f3460;
    border-color: #00d4ff;
}

/* Gacha */
.gacha-container {
    text-align: center;
}

.gacha-display {
    margin: 40px 0;
}

.gacha-machine {
    font-size: 120px;
    margin-bottom: 20px;
}

.gacha-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

#gacha-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gacha-result-card {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 15px;
    animation: gachaReveal 0.5s ease-out;
}

@keyframes gachaReveal {
    0% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

/* Rankings */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table thead {
    background: #0f1923;
}

.ranking-table th,
.ranking-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #0f3460;
}

.ranking-table th {
    color: #00d4ff;
}

.ranking-table tr:hover,
.hero-ranking-row:hover,
.league-ranking-row:hover {
    background: #0f1923;
}

.hero-ranking-row:hover,
.league-ranking-row:hover {
    background: rgba(0, 212, 255, 0.15) !important;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

.rank-1 { color: #ffd700; font-weight: bold; }
.rank-2 { color: #c0c0c0; font-weight: bold; }
.rank-3 { color: #cd7f32; font-weight: bold; }

.player-league {
    background: rgba(0, 212, 255, 0.1);
    border-left: 3px solid #00d4ff;
}

.threat-badge {
    padding: 4px 8px;
    background: #ff3860;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* News Feed */
#news-feed {
    max-height: 600px;
    overflow-y: auto;
}

.news-item {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.news-category {
    color: #00d4ff;
    font-weight: bold;
}

.news-date {
    color: #888;
    font-size: 12px;
}

.news-content {
    line-height: 1.6;
}

/* Exploration */
.explorations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.exploration-card {
    background: rgba(15, 25, 45, 0.8);
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.exploration-card:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.exploration-card.active {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.exploration-card.completed {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.exploration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #0f3460;
}

.exploration-header h4 {
    margin: 0;
    color: #00d4ff;
    font-size: 18px;
}

.exploration-distance {
    background: #0f3460;
    color: #00d4ff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.exploration-status {
    background: #0f3460;
    color: #00d4ff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.exploration-details {
    margin-bottom: 15px;
}

.exploration-info {
    margin-bottom: 8px;
    font-size: 14px;
    color: #ccc;
}

.exploration-info strong {
    color: #00d4ff;
    margin-right: 8px;
}

.exploration-loots {
    margin-top: 10px;
}

.exploration-loots strong {
    color: #00d4ff;
    display: block;
    margin-bottom: 8px;
}

.loots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.loot-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
}

.loot-food {
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid #ff9800;
    color: #ff9800;
}

.loot-equipment {
    background: rgba(156, 39, 176, 0.2);
    border: 1px solid #9c27b0;
    color: #9c27b0;
}

.loot-entertainment {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
}

.loot-scouting {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid #2196f3;
    color: #2196f3;
}

.loot-item {
    background: rgba(15, 25, 45, 0.9);
    border: 2px solid;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-width: 150px;
}

.loot-item .loot-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.loot-item .loot-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #fff;
}

.loot-item .loot-rarity {
    font-size: 12px;
    text-transform: capitalize;
    opacity: 0.8;
}

.selectable-hero {
    cursor: default;
    transition: all 0.3s ease;
}

.selectable-hero:hover {
    border-color: #00d4ff !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.selectable-hero.selected {
    border-color: #4caf50 !important;
    background: rgba(76, 175, 80, 0.2) !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

/* Facilities */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.facility-card {
    background: #0f1923;
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
}

.facility-card h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 20px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.item-card {
    background: rgba(15, 25, 45, 0.8);
    border: 2px solid #0f3460;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
}

.item-card:hover {
    border-color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.item-card.rarity-common {
    border-color: #9e9e9e;
}

.item-card.rarity-uncommon {
    border-color: #4caf50;
}

.item-card.rarity-rare {
    border-color: #2196f3;
}

.item-card.rarity-epic {
    border-color: #9c27b0;
}

.item-card.rarity-legendary {
    border-color: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.3);
}

.item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 4px;
    word-break: break-word;
}

.item-rarity {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.item-rarity.rarity-common {
    color: #9e9e9e;
    background: rgba(158, 158, 158, 0.2);
}

.item-rarity.rarity-uncommon {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.2);
}

.item-rarity.rarity-rare {
    color: #2196f3;
    background: rgba(33, 150, 243, 0.2);
}

.item-rarity.rarity-epic {
    color: #9c27b0;
    background: rgba(156, 39, 176, 0.2);
}

.item-rarity.rarity-legendary {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.2);
}

.item-stat {
    font-size: 10px;
    color: #00d4ff;
    margin-top: 4px;
}

/* Battle Screen */
#battle-screen {
    background: #000;
    justify-content: center;
    align-items: center;
}

.battle-container {
    position: relative;
}

.battle-controls {
    position: absolute;
    top: 20px;
    right: 20px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #16213e;
    border: 3px solid #00d4ff;
    border-radius: 8px;
    padding: 30px;
    max-width: 80%;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    color: #00d4ff;
    cursor: default;
}

.modal-close:hover {
    color: #ff3860;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0f1923;
}

::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00d4ff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading indicator */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #0f3460;
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3860;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
}

/* Hero Selection Screen */
.hero-selectable {
    transition: all 0.2s;
}

.hero-selectable:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.selection-indicator {
    z-index: 10;
    animation: fadeIn 0.3s ease-out;
}

#hero-selection .creation-container {
    max-width: 1200px;
}

/* Chat System */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    max-height: 700px;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #00d4ff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: fadeInUp 0.3s ease-out;
}

.chat-avatar {
    flex-shrink: 0;
}

.chat-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #00d4ff;
    image-rendering: pixelated;
}

.chat-content {
    flex: 1;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    border-left: 3px solid #00d4ff;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.chat-name {
    font-weight: bold;
    color: #00d4ff;
    font-size: 14px;
}

.chat-time {
    font-size: 11px;
    color: #888;
}

.chat-text {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-text.typing::after {
    content: '|';
    animation: blink 1s infinite;
    color: #00d4ff;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar for chat */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00d4ff;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #00b8e6;
}
