/* === GLOBAL STYLES === */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Global animation utilities */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.page-container {
    width: 100%;
    max-width: 800px; /* Set a max-width for better layout on larger screens */
    padding: 20px;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.page-container {
    width: 100%;
    max-width: 800px; /* Set a max-width for better layout on larger screens */
    padding: 20px;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.game-header {
    margin-top: 100px; /* Increased margin to push it down a bit more */
    margin-bottom: 20px; /* Add margin to the bottom instead of top */
    border-radius: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(50, 50, 50, 0.8)); /* Gradient background */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Subtle box shadow for depth */
    font-family: 'Tangerine', cursive;
    font-size: 48px;
    color: #FFD700; /* Gold text color */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center; /* Center the text */
    position: relative; /* Ensure it's positioned relative to its container */
    z-index: 10; /* Raise it above other elements if needed */
}

label {
    display: block;
    margin-bottom: 5px;
}

input {
    width: 90%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button, .btn {
    padding: 10px;
    background-color: #007BFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover, .btn:hover {
    background-color: #0056b3;
}

/* === LOGIN STYLES === */
.login-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    width: 300px;
}

/* === CHARACTER CREATION STYLES === */
.character-creation-container {
    width: 100%; /* This ensures it takes the full width of its parent container */
    margin: 50px auto;
    padding: 10px 20px; /* Adjusted padding to match the game header */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.character-creation-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    margin-bottom: 8px;
    color: #555;
}

.submit-btn {
    width: 100%;
}

/* === CHARACTER LIST STYLES === */
.character-list {
    list-style-type: none;
    padding: 0;
}

.character-list li {
    border: 1px solid #ccc;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.character-list h3, .character-list p {
    margin: 5px 0;
}

.character-list h3 {
    color: #333;
}

.character-list p {
    color: #666;
}

/* === HOMEPAGE THEME (scoped with .home-page) === */

/* Design tokens */
:root {
    --rpg-gold: #ffd166;
    --rpg-gold-deep: #e0b84e;
    --rpg-indigo: #2d2e83;
    --rpg-plum: #5a189a;
    --rpg-ink: rgba(0, 0, 0, 0.75);
    --glass-bg: rgba(20, 22, 35, 0.55);
    --glass-stroke: rgba(255, 255, 255, 0.15);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.35);
}

/* Override global layout only on the homepage */
.home-page {
    display: block;
    justify-content: initial;
    height: auto;
    min-height: 100vh;
    background-image: url("images/whispering_winds_bg.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    color: #eaeaf5;
    animation: fadeIn 0.8s ease;
}

.home-page .page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Top banners */
.home-page .dev-banner {
    background: linear-gradient(180deg, rgba(255, 208, 0, 0.95), rgba(255, 208, 0, 0.85));
    color: #1a1a1a;
    border-bottom: 2px solid var(--rpg-plum);
    text-align: center;
    padding: 10px 14px;
    font-weight: bold;
}

.home-page .discord-banner {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(114, 137, 218, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 10px 14px;
}

.home-page .discord-banner a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
}

/* Navigation */
.home-page .nav-menu {
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.5));
    display: flex;
    justify-content: center;
    gap: 26px;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-stroke);
    position: sticky;
    top: 0;
    z-index: 50;
}

.home-page .nav-menu a {
    color: var(--rpg-gold);
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0.3px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.home-page .nav-menu a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

/* === SHARED BANNERS + NAV + HEADER (applies to all pages) === */

/* Shared game header styling */
.races-page .game-header, .classes-page .game-header, .story-page .game-header {
    margin-top: 64px;
    margin-bottom: 24px;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: 'Tangerine', cursive;
    font-size: 56px;
    color: var(--rpg-gold);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
    background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(40,40,70,0.75));
    box-shadow: var(--shadow-lg);
    text-align: center;
}

/* Shared overview container styling */
.races-page .overview-container, .classes-page .overview-container, .story-page .story-overview {
    margin-top: 18px;
    padding: 24px;
    border-radius: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--shadow-lg);
    line-height: 1.7;
    font-size: 16px;
    color: #eaeaf5;
}

.dev-banner {
    background: linear-gradient(180deg, rgba(255, 208, 0, 0.95), rgba(255, 208, 0, 0.85));
    color: #1a1a1a;
    border-bottom: 2px solid var(--rpg-plum);
    text-align: center;
    padding: 10px 14px;
    font-weight: bold;
}

.discord-banner {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(114, 137, 218, 0.9);
    color: #ffffff;
    text-align: center;
    padding: 10px 14px;
}

.discord-banner a { color: #ffffff; text-decoration: underline; font-weight: bold; }

.nav-menu {
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.5));
    display: flex;
    justify-content: center;
    gap: 26px;
    padding: 12px 0;
    border-bottom: 1px solid var(--glass-stroke);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-menu a {
    color: var(--rpg-gold);
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 0.3px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover { color: #ffffff; transform: translateY(-1px); }

/* Hero/game title */
.home-page .game-header {
    margin-top: 64px;
    margin-bottom: 24px;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: 'Tangerine', cursive;
    font-size: 56px;
    color: var(--rpg-gold);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
    background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(40,40,70,0.75));
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: fadeInUp 1s ease 0.2s both;
    position: relative;
    overflow: hidden;
}

.home-page .game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* Overview card (glassmorphism) */
.home-page .overview-container {
    margin-top: 18px;
    padding: 24px;
    border-radius: 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-stroke);
    box-shadow: var(--shadow-lg);
    line-height: 1.7;
    font-size: 16px;
    animation: fadeInUp 1s ease 0.4s both;
}

/* CTA button */
.home-page .start-button {
    display: inline-block;
    margin-top: 14px;
    background: linear-gradient(135deg, var(--rpg-plum), var(--rpg-indigo));
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.6s both;
}

.home-page .start-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.home-page .start-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(90, 24, 154, 0.4);
}

.home-page .start-button:hover::before {
    left: 100%;
}

.home-page .start-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Features */
.home-page .features { 
    margin-top: 22px;
    animation: fadeInUp 1s ease 0.8s both;
}
.home-page .feature-item { 
    margin-bottom: 26px;
    animation: fadeInUp 1s ease 1s both;
}

.home-page .image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
}

.home-page .race-image, .home-page .class-icon {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.15);
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.home-page .race-image:hover, .home-page .class-icon:hover {
    transform: translateY(-5px) scale(1.05) rotate(2deg);
    filter: brightness(1.15) saturate(1.2);
    box-shadow: 0 20px 35px rgba(0,0,0,0.5);
    animation: pulse 0.6s ease infinite;
}

/* Tooltips */
.home-page .tooltip { position: relative; display: inline-block; text-align: center; color: #fff; }

.home-page .tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background: rgba(33, 35, 58, 0.95);
    color: #fff;
    text-align: left;
    border: 1px solid var(--glass-stroke);
    border-radius: 12px;
    padding: 14px;
    position: absolute;
    z-index: 20;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-lg);
}

.home-page .tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Loading indicator */
.home-page .loading-indicator {
    position: fixed;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 1000;
    display: none;
}

/* Shared loading indicator fallback */
.loading-indicator {
    position: fixed;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    z-index: 1000;
    display: none;
    animation: pulse 1.5s ease-in-out infinite;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .home-page .game-header { font-size: 42px; }
    .home-page .race-image, .home-page .class-icon { width: 100px; height: 100px; }
}

/* === RACES PAGE === */
.races-page {
    display: block;
    min-height: 100vh;
    background-image: url("images/whispering_winds_bg.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    color: #eaeaf5;
    animation: fadeIn 0.8s ease;
}

.races-page .page-container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px; }
.races-page .game-header { margin-top: 48px; }
.races-page .overview-container, .races-page .feature-item { background: var(--glass-bg); border: 1px solid var(--glass-stroke); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 18px; }
.races-page .image-grid { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; }
.races-page .race-image { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 2px solid rgba(255,255,255,0.15); }
.races-page .tooltip .tooltiptext { width: 240px; }

/* === CLASSES PAGE === */
.classes-page {
    display: block;
    min-height: 100vh;
    background-image: linear-gradient(135deg, rgba(39,152,232,0.15) 0%, rgba(255,255,255,0.05) 100%), url("images/whispering_winds_bg.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    animation: fadeIn 0.8s ease;
}

.classes-page .page-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 24px; }

/* Classes Grid Layout */
.classes-page .classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-top: 32px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Class Cards */
.classes-page .class-card {
    background: var(--glass-bg);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    position: relative;
    overflow: hidden;
}

.classes-page .class-card:nth-child(1) { animation-delay: 0.1s; }
.classes-page .class-card:nth-child(2) { animation-delay: 0.2s; }
.classes-page .class-card:nth-child(3) { animation-delay: 0.3s; }
.classes-page .class-card:nth-child(4) { animation-delay: 0.4s; }
.classes-page .class-card:nth-child(5) { animation-delay: 0.5s; }

.classes-page .class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.classes-page .class-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

.classes-page .class-card:hover::before {
    left: 100%;
}

/* Class-specific border colors */
.classes-page .class-card.bladesworn { border-color: #b03a2e; }
.classes-page .class-card.ethermancer { border-color: #2798e8; }
.classes-page .class-card.divinist { border-color: #f7ca18; }
.classes-page .class-card.rogue { border-color: #27ae60; }
.classes-page .class-card.skyrender { border-color: #7ed6df; }

.classes-page .class-card.bladesworn:hover { border-color: #d35400; box-shadow: 0 25px 50px rgba(176,58,46,0.3); }
.classes-page .class-card.ethermancer:hover { border-color: #3498db; box-shadow: 0 25px 50px rgba(39,152,232,0.3); }
.classes-page .class-card.divinist:hover { border-color: #f39c12; box-shadow: 0 25px 50px rgba(247,202,24,0.3); }
.classes-page .class-card.rogue:hover { border-color: #2ecc71; box-shadow: 0 25px 50px rgba(39,174,96,0.3); }
.classes-page .class-card.skyrender:hover { border-color: #48cae4; box-shadow: 0 25px 50px rgba(126,214,223,0.3); }

/* Card Header */
.classes-page .class-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.classes-page .class-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.classes-page .class-card:hover .class-icon-large {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
}

.classes-page .class-title h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
    color: var(--rpg-gold);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.classes-page .class-tagline {
    font-size: 0.9em;
    color: rgba(255,255,255,0.8);
    margin: 4px 0 0 0;
    font-style: italic;
}

/* Description */
.classes-page .class-description {
    margin-bottom: 20px;
    color: #eaeaf5;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Stats */
.classes-page .class-stats {
    margin-bottom: 20px;
}

.classes-page .stat-bar {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    gap: 12px;
}

.classes-page .stat-label {
    width: 60px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.classes-page .stat-progress {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.classes-page .stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rpg-gold), var(--rpg-gold-deep));
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.classes-page .stat-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

/* Abilities */
.classes-page .class-abilities h4 {
    color: var(--rpg-gold);
    font-family: 'Cinzel', serif;
    font-size: 1.1em;
    margin: 0 0 12px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.classes-page .ability {
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--rpg-gold);
    color: #eaeaf5;
    font-size: 0.9em;
    line-height: 1.4;
}

.classes-page .ability strong {
    color: var(--rpg-gold);
}

/* Responsive */
@media (max-width: 768px) {
    .classes-page .classes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .classes-page .class-card {
        padding: 20px;
    }
    
    .classes-page .class-icon-large {
        width: 56px;
        height: 56px;
    }
}

/* === STORY PAGE === */
.story-page {
    display: block;
    min-height: 100vh;
    background-image: url("images/whispering_winds_bg.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    animation: fadeIn 0.8s ease;
}

.story-page .page-container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 24px; }
.story-page .image-boxes { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; }
.story-page .image-box { background: rgba(0, 0, 0, 0.55); padding: 20px; border-radius: 12px; box-shadow: 0 10px 22px rgba(0,0,0,0.35); width: 30%; min-width: 260px; text-align: center; color: #fff; }
.story-page .image-box img { width: 100%; border-radius: 10px; }