/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 100%);
    font-family: 'Orbitron', monospace;
    color: #D4AF37;
    overflow: hidden;
    user-select: none;
}

#header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #8B4513, #CD853F, #8B4513);
    border: 3px solid #D4AF37;
    border-bottom: none;
    padding: 10px 20px;
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.3);
    height: 60px;
}

.header-btn {
    background: linear-gradient(145deg, #DAA520, #B8860B);
    border: 2px solid #D4AF37;
    color: #000;
    padding: 8px 16px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: linear-gradient(145deg, #FFD700, #DAA520);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.8);
    transform: translateY(-2px);
}

#credits {
    font-weight: 900;
    font-size: 18px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 2px;
}

#house-banner {
    font-weight: 900;
    font-size: 14px;
    color: #4169E1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    background: rgba(65, 105, 225, 0.2);
    padding: 8px 12px;
    border: 2px solid #4169E1;
    border-radius: 4px;
}

#game-container {
    position: relative;
    display: flex;
    background: #2F2F2F;
    border: 3px solid #D4AF37;
    border-top: none;
    height: calc(100vh - 80px);
}

#canvas {
    border: none;
    cursor: crosshair;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#command-panel {
    width: 250px;
    background: linear-gradient(180deg, #8B4513, #654321);
    border-left: 3px solid #D4AF37;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

#unit-portrait {
    width: 64px;
    height: 64px;
    border: 2px solid #D4AF37;
    background: #1a1a1a;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#unit-portrait img {
    width: 60px;
    height: 60px;
    image-rendering: pixelated;
}

#unit-info {
    text-align: center;
}

#unit-name {
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#health-bar {
    width: 100%;
    height: 8px;
    background: #333;
    border: 1px solid #666;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

#health-fill {
    height: 100%;
    background: #00FF00;
    width: 100%;
    transition: width 0.3s ease;
}

#unit-stats {
    font-size: 11px;
    color: #AAA;
    font-weight: 400;
}

#command-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cmd-btn {
    padding: 12px 8px;
    border: 2px solid #666;
    background: linear-gradient(145deg, #333, #555);
    color: #D4AF37;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cmd-btn:hover {
    border-color: #D4AF37;
    background: linear-gradient(145deg, #555, #777);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.cmd-btn.active {
    border-color: #FFD700;
    background: linear-gradient(145deg, #DAA520, #B8860B);
    color: #000;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.3);
}

.attack-btn:hover { border-color: #FF6B6B; }
.move-btn:hover { border-color: #4ECDC4; }
.guard-btn:hover { border-color: #FFE66D; }
.retreat-btn:hover { border-color: #A8A8A8; }

#status-display {
    background: rgba(0,0,0,0.7);
    border: 1px solid #666;
    padding: 8px;
    font-size: 10px;
    text-align: center;
    color: #AAA;
    border-radius: 4px;
}

#mini-map {
    position: absolute;
    bottom: 15px;
    right: 270px;
    border: 3px solid #D4AF37;
    background: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

#mini-canvas {
    cursor: pointer;
    image-rendering: pixelated;
}

#controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.8);
    padding: 8px 12px;
    border: 1px solid #666;
    border-radius: 4px;
    font-size: 11px;
    color: #AAA;
}

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

::-webkit-scrollbar-track {
    background: #333;
}

::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FFD700;
}