/* Header */
.game-header {
    height: 70px;
    background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.game-title {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
    letter-spacing: 2px;
    font-weight: 600;
}

.player-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#player-name {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.coord {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    color: var(--accent-cyan);
    font-size: 0.9rem;
    border: 1px solid var(--glass-border);
}

/* Resource Bar */
.resource-bar {
    height: 90px;
    background: linear-gradient(to bottom, var(--bg-tertiary), var(--bg-secondary));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.resource-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
}

.resource-item.metal { border-color: rgba(0, 212, 255, 0.3); }
.resource-item.crystal { border-color: rgba(74, 0, 224, 0.3); }
.resource-item.deut { border-color: rgba(255, 215, 0, 0.3); }
.resource-item.spv { border-color: rgba(0, 255, 136, 0.3); }
.resource-item.population { border-color: rgba(139, 155, 180, 0.3); }

.resource-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.resource-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

#resource-metal,
#resource-crystal,
#resource-deut,
#resource-spv,
#resource-population {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.resource-rate {
    font-size: 0.7rem;
    color: var(--accent-cyan);
    margin-top: 0.25rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.resource-item.crystal .progress-fill { background: var(--accent-purple); }
.resource-item.deut .progress-fill { background: var(--accent-yellow); }
.resource-item.spv .progress-fill { background: var(--accent-green); }
.resource-item.population .progress-fill { background: var(--accent-cyan); }

/* Navigation */
.main-nav {
    display: flex;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.5rem;
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.nav-btn:last-child {
    border-right: none;
}

.nav-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-btn.active {
    background: linear-gradient(to bottom, rgba(0, 212, 255, 0.1), transparent);
    color: var(--accent-cyan);
    border-bottom: 3px solid var(--accent-cyan);
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    position: relative;
}

.page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.page.active {
    display: flex;
}

/* Notifications */
.notifications-container {
    position: fixed;
    bottom: 80px;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.notification {
    min-width: 300px;
    padding: 1rem 1.5rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    animation: slideIn 0.3s ease;
    box-shadow: var(--glow-cyan);
}

.notification.success {
    border-color: var(--accent-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.notification.warning {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.notification.error {
    border-color: var(--accent-red);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.3);
}

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

/* Modal Overlay */
#modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

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

/* Modal */
.modal {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--glow-cyan);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-shadow: var(--glow-cyan);
}

.modal-close {
    font-size: 2rem;
    color: var(--text-secondary);
    background: transparent;
    padding: 0 0.5rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--accent-red);
    transform: none;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.modal-btn.primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border: 1px solid var(--glass-border);
}

.modal-btn.primary:hover {
    box-shadow: var(--glow-cyan);
}

.modal-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-btn.secondary:hover {
    background: var(--border-color);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}