/* --- Buttons --- */
.button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    color: var(--primary-text);
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.button:hover {
    background-color: #3182ce;
}

.button:disabled {
    background-color: var(--disabled-color);
    cursor: not-allowed;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background-color: var(--primary-bg);
    color: var(--primary-text);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* --- Player Info & Hub --- */
.player-info {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: var(--primary-bg);
    border-radius: 8px;
    margin-bottom: 20px;
}

.player-info .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-right: 20px;
    border: 3px solid var(--accent-color);
}

.player-info .details {
    font-size: 1.1rem;
}

.player-info .details .name {
    font-size: 1.5rem;
    font-weight: bold;
}

/* --- Mission List --- */
.mission-list {
    list-style: none;
    display: grid;
    gap: 15px;
}

.mission-item {
    padding: 20px;
    background-color: var(--primary-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.mission-item:not(.locked):hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.mission-item.locked {
    background-color: var(--secondary-bg);
    color: var(--disabled-color);
    cursor: not-allowed;
    border-color: transparent;
}

.loading-spin {
    display: inline-block;
    animation: spin 1s infinite linear;
    margin-left: 10px;
    color: #ffd700;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.mission-item h3 {
    margin: 0;
    text-align: left;
}

/* --- Character Selection --- */
.avatar-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
}

.avatar-option {
    cursor: pointer;
    border: 4px solid transparent;
    border-radius: 50%;
    transition: border-color 0.2s;
}

.avatar-option.selected {
    border-color: var(--accent-color);
}

.avatar-option img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
}

/* --- Hub Container & Glassmorphism --- */
.hub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    width: 100%;
    margin-top: 15px;
    /* Reduced further to 15px */
}

.mission-carousel {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 900px;
    /* Slightly wider for modern feel */
    position: relative;
    perspective: 1000px;
    /* For 3D feel if needed */
}

.mission-carousel-inner {
    flex-grow: 1;
    overflow: hidden;
    /* Hide extra cards */
    position: relative;
    min-height: 550px;
    /* Increased height for breathing room */
    display: flex;
    /* Added flex to ensure child .level-card centers vertically */
    align-items: center;
    /* Center cards vertically in the carousel track */
}

/* --- Level Card (Glassmorphism) --- */
.level-card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Fill the container */
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.6s ease;

    /* Glassmorphism Effect */
    background: rgba(15, 23, 42, 0.65);
    /* Dark blue-ish tint */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);

    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center content vertically */
}

.level-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.level-card h2 {
    text-align: center;
    margin: 0;
    flex-grow: 1;

    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #f1f5f9;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

/* --- Carousel Controls --- */
.carousel-control {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(255, 215, 0, 0.3);
    /* Chrome/Gold tint */
    color: #ffd700;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(255, 215, 0, 0.1);

    /* Absolute Positioning for Stability */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.carousel-control svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
    transition: transform 0.3s ease;
}

.carousel-control.prev-control {
    left: -80px;
}

.carousel-control.next-control {
    right: -80px;
}

.carousel-control:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 1));
    border-color: #ffd700;
    transform: translateY(-50%) scale(1.15);
    box-shadow:
        0 0 25px rgba(255, 215, 0, 0.4),
        inset 0 0 15px rgba(255, 215, 0, 0.2);
    color: #fff;
}

.carousel-control:hover svg {
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

.carousel-control.prev-control:hover svg {
    transform: translateX(-3px);
}

.carousel-control.next-control:hover svg {
    transform: translateX(3px);
}

.carousel-control:active:not(:disabled) {
    transform: translateY(-50%) scale(0.95);
}

.carousel-control:disabled {
    background: rgba(15, 23, 42, 0.4);
    color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.carousel-control.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) scale(0.8);
}

/* --- Mission List & Items --- */
.mission-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    flex-grow: 1;
    /* Expand to fill level-card */
}

.mission-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align contents to left */
    gap: 20px;

    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    flex: 1;
    /* Expand to fill available space in list */
}

.mission-item:not(.locked):hover {
    transform: translateX(5px) scale(1.01);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.mission-item:not(.locked):hover::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

.mission-item.locked {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.02);
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

.mission-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    min-width: 40px;
    text-align: center;
}

.mission-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mission-text-stars {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.mission-item h3 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    color: #e2e8f0;
    letter-spacing: 0.5px;
}

/* --- Star Rating System --- */
.star-rating {
    display: flex;
    gap: 4px;
}

.mini-stars {
    font-size: 1.1rem;
}

.big-stars {
    font-size: 3rem;
    justify-content: center;
    margin-bottom: 15px;
}

.star-filled {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.star-empty {
    color: rgba(255, 255, 255, 0.15);
}

.stat-group-stars .stat-icon {
    font-size: 1.2rem;
}

.total-stars {
    font-weight: bold;
    color: #ffd700;
}

.mission-status-text {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
}

.mission-status-text.completed-status {
    color: #4ade80;
    /* Bright Green */
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

/* --- Level 3 Special Layout --- */
.level-card[data-level="3"],
.level-card[data-level="6"] {
    background: none;
    /* Clear the default glass background */
    border: none;
    /* Clear default border */
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
}

.level-card[data-level="3"]::before,
.level-card[data-level="6"]::before {
    display: none;
}

.level-card[data-level="3"] .mission-list,
.level-card[data-level="6"] .mission-list {
    height: 100%;
    min-height: 450px;
    /* Match standard card visual height */
}

/* The single mission item behaves like the card itself */
.level-card[data-level="3"] .mission-item,
.level-card[data-level="6"] .mission-item {
    flex: 1;
    margin: 0;

    /* Custom Background */
    background-image:
        linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8)),
        url('../assets/backgrounds/lvl3.png'),
        url('../assets/backgrounds/landing.jpg');
    background-size: cover;
    background-position: center;

    border: 1px solid rgba(255, 215, 0, 0.3);
    /* Subtle Gold Border */
    border-radius: 16px;

    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 30px;
}

.level-card[data-level="6"] .mission-item {
    background-image:
        linear-gradient(to bottom, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.8)),
        url('../assets/backgrounds/lvl6_boss.png'),
        url('../assets/backgrounds/landing.jpg');
}

.level-card[data-level="3"] .mission-item:hover,
.level-card[data-level="6"] .mission-item:hover {
    transform: scale(1.02);
    border-color: rgba(255, 215, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
}

.level-card[data-level="3"] .mission-item:hover::after,
.level-card[data-level="6"] .mission-item:hover::after {
    background-color: #ffd700;
    /* Gold stripe on hover */
}

.level-card[data-level="3"] .mission-icon,
.level-card[data-level="6"] .mission-icon {
    font-size: 4rem;
    /* Giant icon for boss */
    margin-bottom: 0;
}

.level-card[data-level="3"] .mission-info,
.level-card[data-level="6"] .mission-info {
    flex-direction: column;
    flex-grow: 0;
    gap: 15px;
}

.level-card[data-level="3"] h3,
.level-card[data-level="6"] h3 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.level-card[data-level="3"] .mission-status-text,
.level-card[data-level="6"] .mission-status-text {
    font-size: 1rem;
    padding: 8px 16px;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.4s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.98));
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(0.8);
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    overflow: hidden;
}

/* Shine effect */
.modal-content::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite linear;
    pointer-events: none;
}

.modal-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.4);
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* --- Menu Audio Settings --- */
.menu-settings {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.setting-item label {
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    color: #ffd700;
    letter-spacing: 1px;
}

#master-volume-slider {
    width: 100%;
    cursor: pointer;
    accent-color: #ffd700;
}

.modal-message {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 30px;
    line-height: 1.5;
}

.modal-button {
    background: linear-gradient(to bottom, #f59e0b, #d97706);
    border: 1px solid #b45309;
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
    position: relative;
    z-index: 10;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background: linear-gradient(to bottom, #fbbf24, #d97706);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shine {
    0% {
        transform: translateY(-100%) rotate(30deg);
    }

    100% {
        transform: translateY(100%) rotate(30deg);
    }
}

/* --- Scoped Global Elements for Landing --- */
.background-landing .global-navbar {
    display: none !important;
}

.background-landing #app {
    background: transparent !important;
    box-shadow: none !important;
}

/* --- Epic Landing Page Styles (Dark Fantasy) --- */
.landing-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 100;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
    /* Vignette */
}

.landing-content {
    animation: fadeUp 1.5s ease-out;
    padding: 20px;
    width: 100%;
    max-width: 900px;
}

.landing-title {
    font-family: 'Cinzel', serif;
    font-size: 5.5rem;
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 30px;

    /* Silver/Steel Gradient */
    background: linear-gradient(to bottom, #ffffff 0%, #e2e8f0 40%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    letter-spacing: 8px;
}

.landing-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #94a3b8;
    margin-bottom: 60px;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    opacity: 0.8;
}

.landing-actions {
    display: flex;
    justify-content: center;
}

/* Minimalist "Ghost" Button */
.btn-start-epic {
    position: relative;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 20px 80px;
    font-size: 1.5rem;
    font-family: 'Cinzel', serif;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.5s ease;
}

.btn-start-epic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-start-epic:hover {
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    letter-spacing: 6px;
    transform: translateY(-2px);
}

.btn-start-epic:hover::before {
    width: 100%;
}

.btn-glow {
    display: none;
}

.landing-footer {
    position: absolute;
    bottom: 30px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Inter', sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- Scene Transition Overlay --- */
/* --- Scene Transition (Dungeon Doors) --- */
.scene-transition-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    display: flex;
}

.scene-transition-container.active {
    pointer-events: all;
}

.transition-gate {
    width: 50%;
    height: 100%;
    background-color: #0f172a;
    /* Use the custom transition image */
    background-image: url('../assets/utils/transition.png');
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border-right: 2px solid #334155;
    /* Ensure image covers fully */
    background-repeat: no-repeat;
}

.left-gate {
    transform: translateX(-100%);
    border-right: 5px solid #1e293b;
    /* Clean cut for image */
    background-position: left center;
}

.right-gate {
    transform: translateX(100%);
    border-left: 5px solid #1e293b;
    border-right: none;
    background-position: right center;
}

/* Closed State */
.scene-transition-container.active .left-gate {
    transform: translateX(0);
}

.scene-transition-container.active .right-gate {
    transform: translateX(0);
}

/* --- Scene Transition (Fade) --- */
.scene-transition-fade {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.scene-transition-fade.active {
    opacity: 1;
    pointer-events: all;
}

/* Optional: Add a central emblem or lock that meets in the middle */
.left-gate::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 100px;
    background: #334155;
    border-radius: 4px;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .landing-title {
        font-size: 3rem;
        /* Smaller on mobile */
        letter-spacing: 2px;
    }

    .landing-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .btn-start-epic {
        font-size: 1.4rem;
        padding: 18px 40px;
        width: 80%;
        /* Wider button on mobile */
    }
}

/* --- Game Menu & Navigation Styles --- */
.nav-menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffd700;
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    line-height: 1;
}

.nav-menu-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.game-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.game-menu-overlay.hidden {
    display: none !important;
    opacity: 0;
}

.game-menu-content {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 50px 40px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.05);
    animation: menu-entry 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes menu-entry {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-title {
    font-family: 'Cinzel', serif;
    color: #ffd700;
    font-size: 2.2rem;
    letter-spacing: 5px;
    margin-bottom: 40px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-opt-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-opt-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #ffd700;
    transform: translateX(5px);
}

.game-menu-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: #475569;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.game-menu-close:hover {
    color: #ef4444;
}

/* --- Integrated Cheat Section (Submenu) --- */
.cheat-section {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(34, 197, 94, 0.2);
    animation: submenu-entry 0.3s ease-out;
}

.submenu-title {
    color: #22c55e;
    font-size: 0.8rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
    font-family: monospace;
}

@keyframes submenu-entry {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cheat-buttons {
    display: flex;
    gap: 10px;
}

.btn-cheat-send,
.btn-menu-back {
    flex: 1;
    padding: 12px;
    font-weight: 900;
    cursor: pointer;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-cheat-send {
    background: #22c55e;
    color: #020617;
    border: none;
}

.btn-cheat-send:hover {
    background: #4ade80;
    transform: scale(1.02);
}

.btn-menu-back {
    background: transparent;
    border: 1px solid #475569;
    color: #94a3b8;
}

.btn-menu-back:hover {
    border-color: #ffd700;
    color: #ffd700;
}

.menu-options.hidden {
    display: none !important;
}

.cheat-section.hidden {
    display: none !important;
}

#cheat-input-v2 {
    width: 100%;
    background: #000;
    border: 2px solid #22c55e;
    color: #22c55e;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
    outline: none;
    box-shadow: inset 0 0 10px rgba(34, 197, 94, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#cheat-input-v2::placeholder {
    color: rgba(34, 197, 94, 0.3);
}

#cheat-input-v2:focus {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.4), inset 0 0 10px rgba(34, 197, 94, 0.2);
}

.cheat-msg {
    margin-top: 10px;
    font-size: 0.8rem;
    font-family: sans-serif;
    min-height: 1.2em;
}

.cheat-msg.success {
    color: #22c55e;
}

.cheat-msg.error {
    color: #ef4444;
}

/* --- Dragon Flight Effects --- */
.correct-gate-glow {
    position: relative;
    overflow: hidden;
}

.correct-gate-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            rgba(255, 255, 255, 0.6),
            rgba(255, 255, 255, 0.2),
            transparent);
    transform: skewX(-25deg);
    animation: beamOfLight 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes beamOfLight {
    0% {
        left: -150%;
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        left: 150%;
        opacity: 0;
    }
}

.screen-flash-correct {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 1000;
    animation: flashEffect 0.4s ease-out;
}

@keyframes flashEffect {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 0;
    }
}