:root {
    --bg-dark: #0a0e17;
    --text-light: #e2e8f0;
    --accent: #d4af37; /* Gold for runes/mythology */
    --accent-hover: #fcd34d;
    --freya-color: #10b981; /* Emerald/nature */
    --odin-color: #3b82f6; /* Blue/thunder */
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

h1, h2 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

h1 {
    font-size: 3rem;
    letter-spacing: 4px;
}

#game-container {
    position: relative;
    width: 800px;
    height: 450px;
    background: #05070a; /* Very dark background behind canvas */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(212, 175, 55, 0.1);
    overflow: hidden;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Layers */
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Character Selection */
.character-selection {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.char-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.char-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.char-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
}

.freya-icon {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.odin-icon {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Instructions */
.instructions {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 1.2rem;
    line-height: 1.7;
    text-align: left;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 12px 18px;
}

.instructions strong:first-child {
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
}

.instruction-detail {
    display: inline-block;
    padding-left: 0.5rem;
}

.instruction-detail strong {
    color: #cbd5e1;
}

/* HUD */
#hud {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#mute-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

#mute-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    transform: scale(1.1);
}

/* Buttons */
#restart-btn {
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.8rem 2rem;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.2s;
}

#restart-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

/* Action Buttons */
.action-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

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

/* Auth Screen */
#auth-forms {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
    max-width: 600px;
}

.auth-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-box h3 {
    margin: 0 0 10px 0;
    color: #e2e8f0;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
}

.auth-box input {
    background: #1e293b;
    border: 1px solid #475569;
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

.auth-box input:focus {
    border-color: #3b82f6;
}

.auth-divider {
    font-family: 'Cinzel', serif;
    color: #94a3b8;
    font-weight: bold;
}

.error-msg {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
}

.success-msg {
    color: #10b981;
    font-size: 0.85rem;
    margin-top: 5px;
}
