@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700&family=Lato:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background-color: #0b0f19;
    font-family: 'Lato', sans-serif;
    user-select: none;
}

.civ-font {
    font-family: 'Cinzel', serif;
}

/* Canvas - full screen */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    pointer-events: none;
}

/* Glass Panel Base */
.glass-panel {
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid #334155;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    color: #e2e8f0;
}

/* Top HUD */
.top-hud {
    pointer-events: auto;
    margin: 0 auto;
    border-radius: 9999px;
    padding: 8px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 2px solid #a16207;
}

.top-hud .title {
    color: #eab308;
    font-weight: 700;
    font-size: 18px;
}

.top-hud .divider {
    height: 24px;
    width: 1px;
    background: #475569;
}

.top-hud .stat {
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
}

.top-hud .stat-value {
    color: #facc15;
}

.top-hud .stat-value.white {
    color: #ffffff;
}

/* Selection Panel */
#selection-panel {
    pointer-events: auto;
    align-self: center;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
}

#selection-panel.hidden {
    display: none;
}

#selection-panel h2 {
    text-align: center;
    font-weight: 700;
    color: #eab308;
    margin-bottom: 8px;
}

#selection-panel .subtitle {
    font-size: 12px;
    text-align: center;
    color: #94a3b8;
}

/* Next Turn Button */
.next-turn-btn {
    background: #eab308;
    color: #0b0f19;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.next-turn-btn:hover {
    background: #facc15;
}

.next-turn-btn:active {
    background: #ca8a04;
}

/* Unit/City Info */
.unit-info, .city-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #334155;
}

.unit-info.hidden, .city-info.hidden {
    display: none;
}

.unit-info div, .city-info div {
    font-size: 11px;
    margin: 4px 0;
    color: #cbd5e1;
}

.unit-info .label, .city-info .label {
    color: #94a3b8;
    font-weight: 700;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px 24px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    animation: toastSlideIn 0.3s ease-out, toastFadeOut 0.3s ease-in 2.7s forwards;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-color: #22c55e;
    background: rgba(20, 35, 25, 0.95);
}

.toast.success::before {
    content: '🏛️';
    font-size: 20px;
}

.toast.warning {
    border-color: #f59e0b;
    background: rgba(35, 30, 20, 0.95);
}

.toast.info {
    border-color: #3b82f6;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Action Buttons */
.action-buttons {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #334155;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons.hidden {
    display: none;
}

.action-btn {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border: 1px solid #3b82f6;
    color: #93c5fd;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-color: #60a5fa;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.primary {
    background: linear-gradient(135deg, #eab308 0%, #a16207 100%);
    border-color: #facc15;
    color: #0b0f19;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.3);
}

/* Resource Change Animation */
.stat-value.increased {
    animation: resourcePulse 0.5s ease-out;
    color: #22c55e !important;
}

.stat-value.decreased {
    animation: resourcePulse 0.5s ease-out;
    color: #ef4444 !important;
}

@keyframes resourcePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

/* Production Queue in City Info */
.production-select {
    margin-top: 8px;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.production-btn {
    background: rgba(30, 40, 55, 0.9);
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.production-btn:hover {
    background: #334155;
    border-color: #64748b;
}

.production-btn.active {
    border-color: #eab308;
    color: #eab308;
}

