:root {
    --primary-color: #f4c542; /* Bright Gold */
    --primary-dark: #d4af37; /* Dark Gold */
    --secondary-color: #1a1a1a; /* Dark Grey */
    --accent-color: #9d4edd; /* Purple */
    --accent-dark: #7209b7; /* Dark Purple */
    --text-color: #e8e8e8;
    --text-muted: #a0a0a0;
    --bg-color: #0a0a0a;
    --bg-section: #121212;
    --card-bg: #1c1c1c;
    --card-border: #2a2a2a;
    --hover-glow: rgba(244, 197, 66, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(180deg, var(--bg-color) 0%, #0d0d0d 50%, var(--bg-color) 100%);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Cinzel', serif;
}

/* Header */
header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(244, 197, 66, 0.5);
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(244, 197, 66, 0.4);
}

nav a:hover::after {
    width: 100%;
}

/* Hero Section */
#hero {
    height: 100vh;
    background: url('imgs/start_screen/start.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0 0 0;
    margin: 0;
    max-width: 100%;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(244, 197, 66, 0.6), 2px 2px 8px rgba(0, 0, 0, 0.9);
    letter-spacing: 2px;
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(244, 197, 66, 0.6), 2px 2px 8px rgba(0, 0, 0, 0.9); }
    50% { text-shadow: 0 0 30px rgba(244, 197, 66, 0.8), 2px 2px 8px rgba(0, 0, 0, 0.9); }
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    color: var(--text-color);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 197, 66, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(244, 197, 66, 0.5);
}

/* Sections General */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

#hero {
    padding: 60px 0 0 0;
    max-width: 100%;
    margin: 0;
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
    display: inline-block;
    padding-bottom: 0.8rem;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(244, 197, 66, 0.4);
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 10px rgba(244, 197, 66, 0.5);
}

/* Characters Section */
.character-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.character-card {
    background-color: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    overflow: visible;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Character backgrounds */
#char-illusionist {
    background-image: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2)), url('imgs/Illusionist.png');
}
#char-lightbringer {
    background-image: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2)), url('imgs/LightBringer.png');
}
#char-shadowcaster {
    background-image: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.2)), url('imgs/ShadowCaster.png');
}

.character-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), 0 0 30px var(--hover-glow);
    border-color: var(--primary-color);
    z-index: 10;
}

.card-inner {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    border-radius: 0 0 10px 10px;
}

.character-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.character-card .role {
    font-style: italic;
    color: #aaa;
    margin-bottom: 1rem;
}

/* Abilities Section */
.abilities {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.ability-icon {
    width: 50px;
    height: 50px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.ability-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 2px solid #444;
    border-radius: 4px;
    background: rgba(0,0,0,0.5);
}

.ability-icon:hover {
    transform: scale(1.1);
}

.ability-icon:hover img {
    border-color: var(--primary-color);
}

/* Tooltip */
.ability-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: rgba(0, 0, 0, 0.95);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    white-space: pre-line;
    width: max-content;
    max-width: 280px;
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid var(--primary-color);
    z-index: 1000;
}

.ability-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Map Section */
#map {
    background-color: #0a0a0a;
}

.map-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.map-background {
    width: 100%;
    height: auto;
    display: block;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
}

.map-rooms {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-room {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 10;
}

.map-room img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.map-room:hover {
    transform: translate(-50%, -50%) scale(1.2);
    z-index: 100;
}

.map-room:hover img {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.8));
}

/* Map Room Tooltip */
.map-room::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: rgba(0, 0, 0, 0.95);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    border: 1px solid var(--primary-color);
    z-index: 1000;
    margin-bottom: 10px;
}

.map-room:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Dungeon Section */
.section-intro {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.room-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.room-type {
    background-color: var(--card-bg);
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    border: 2px solid var(--card-border);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.room-type:hover {
    background-color: #252525;
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px var(--hover-glow);
}

.room-type .icon {
    width: 50px;
    height: 50px;
    display: block;
    margin: 0 auto 1rem auto;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(244, 197, 66, 0.3));
    transition: filter 0.3s ease;
}

.room-type:hover .icon {
    filter: drop-shadow(0 0 10px rgba(244, 197, 66, 0.6));
}

.room-type h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

#characters {
    background-color: var(--bg-section);
    padding: 5rem 2rem;
}

#dungeon {
    background-color: var(--bg-color);
}

/* Goal Section */
#goal {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
    padding: 6rem 2rem;
}

.goal-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Enemies Section */
#enemies {
    background-color: #0a0a0a;
}

.enemies-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.enemy-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, #1a1a1a 100%);
    border: 2px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.enemy-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(157, 78, 221, 0.2);
    border-color: var(--accent-color);
}

.enemy-card img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.enemy-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.enemy-card p {
    color: #aaa;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: #000;
    padding: 2rem;
    text-align: center;
    color: #666;
    border-top: 1px solid #333;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    nav ul {
        display: none; /* Simple hide for mobile for now */
    }
    
    nav {
        justify-content: center;
    }
}
