:root {
    --bg-deep: #0a192f;
    --bg-surface: rgba(16, 33, 65, 0.7);
    --accent-orange: #f97316;
    --accent-teal: #2dd4bf;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(45, 212, 191, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(249, 115, 22, 0.05) 0%, transparent 50%);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-orange));
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Navigation Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 2rem;
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled {
    background: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.main-header nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 101;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-teal);
}

.btn-join {
    background: var(--accent-orange);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    color: white !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
}

.btn-join:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(249, 115, 22, 0.4);
}

#story-container {
    scroll-snap-type: y mandatory;
    height: 100vh;
    overflow-y: scroll;
}

.scene {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scene.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    box-shadow: var(--shadow-premium);
    text-align: center;
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 600;
}

p {
    font-size: 1.8rem;
    line-height: 1.6;
    font-weight: 400;
}

.media-container {
    margin-top: 2rem;
    max-width: 600px;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 5;
}

.media-container img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
}

/* Overlays */
.overlay-scene {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.bg-img {
    width: 100%;
    display: block;
}

.sea-tiger-overlay {
    position: absolute;
    width: 30% !important;
    /* Fixed relative size for the tiger */
    height: auto !important;
    box-shadow: none !important;
    pointer-events: none;
    z-index: 20;
    transition: all 0.5s ease;
}

/* Specific Positions for Sea Tiger Overlays */
.pos-slide3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
}

.pos-slide5 {
    top: 20%;
    right: 10%;
}

.pos-slide11 {
    top: 40%;
    left: 5%;
    transform: rotate(-10deg);
}

.pos-slide12 {
    bottom: 10%;
    right: 15%;
    width: 25% !important;
}

.pos-slide12-bars {
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    z-index: 25;
    /* Above Sea Tiger (20) */
}



.pos-slide13-aquarium {
    object-fit: cover;
}

.pos-slide13-drunk {
    bottom: 0;
    right: 0;
    width: 45% !important;
    z-index: 22;
}

.pos-slide13-rooster-1 {
    top: 10%;
    left: 10%;
    width: 25% !important;
    transform: rotate(-15deg);
    z-index: 23;
}

.pos-slide13-rooster-2 {
    bottom: 10%;
    left: 30%;
    width: 20% !important;
    transform: scaleX(-1) rotate(10deg);
    z-index: 23;
}

.pos-slide17 {
    bottom: 20%;
    right: 5%;
    transform: scaleX(-1);
}

.pos-slide22 {
    top: 30%;
    right: 20%;
    width: 40% !important;
}

.china-men-img {
    /* Crop the bottom 15% to hide the logo, matching PPT */
    clip-path: inset(0 0 15% 0);
    width: 100%;
    height: auto;
}

/* Specific fixes for background images */
.bg-img {
    max-height: 60vh;
    object-fit: contain;
}

/* Specific Scene Styling */
.hero {
    background: transparent;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    max-width: none;
    z-index: -1;
}

.hero-bg img {
    opacity: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

.accent-warning {
    border-left: 8px solid #dc2626;
}

.accent-primary {
    border-left: 8px solid var(--accent-teal);
}

.mojito-quote {
    font-style: italic;
    color: var(--accent-teal);
    font-size: 2rem;
    margin-top: 1.5rem;
    padding: 1rem;
}

/* Stats and Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-teal);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn.primary {
    background: var(--accent-teal);
    color: var(--bg-deep);
}

.btn.primary:hover {
    background: #23b2a2;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(45, 212, 191, 0.3);
}

.btn.secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn.full-width {
    width: 100%;
}

/* Premium Form */
.premium-form {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-teal);
    background: rgba(0, 0, 0, 0.3);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
}

.small-text {
    font-size: 1.2rem !important;
    color: var(--text-secondary);
}

.enemy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    width: 100%;
}

.enemy-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.enemy-item img {
    width: 100%;
    max-width: 250px;
    height: 180px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.enemy-item p {
    font-size: 1.2rem;
    color: var(--accent-teal);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.float-anim {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.pulse-anim {
    animation: pulse 4s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --padding-scene: 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    p {
        font-size: 1.2rem;
    }

    .glass-card {
        padding: 1.5rem;
        margin-top: 2rem;
        max-height: 40vh;
        overflow-y: auto;
    }

    .media-container {
        margin-top: 1rem;
        max-width: 100%;
    }

    .media-container img {
        max-height: 45vh;
        object-fit: contain;
    }

    /* Navigation */
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    /* Mobile Navigation Logic */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(10, 25, 47, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .btn-join {
        padding: 0.4rem 1rem;
    }

    /* Dashboard & Form */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    /* Pledge Modal */
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(10, 25, 47, 0.8);
        backdrop-filter: blur(8px);
        z-index: 1000;
        justify-content: center;
        align-items: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .modal.active {
        display: flex;
        opacity: 1;
    }

    .modal-content {
        background: var(--bg-surface);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        padding: 3rem;
        text-align: center;
        max-width: 500px;
        width: 90%;
        box-shadow: var(--shadow-premium);
        transform: translateY(20px);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .modal.active .modal-content {
        transform: translateY(0);
    }

    .modal h3 {
        font-size: 2rem;
        color: var(--accent-teal);
        margin-bottom: 1rem;
        font-family: 'Montserrat', sans-serif;
    }

    .modal-close {
        margin-top: 2rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .premium-form {
        gap: 1rem;
    }

    /* Overlay adjustments for mobile */
    .sea-tiger-overlay {
        width: 40% !important;
    }

    /* Force bars overlay to full width on mobile to maintain effect */
    .pos-slide12-bars {
        width: 100% !important;
    }

    /* Full content for Dashboard and Join sections on mobile */
    .dashboard-section .glass-card,
    .join-section .glass-card {
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto;
        margin-top: 1rem;
        padding-bottom: 3rem;
    }

    .dashboard-section,
    .join-section {
        height: auto !important;
        min-height: 100vh;
        padding: 2rem 1rem;
    }
}

/* Extra small devices check to prevent title cutoff */
@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }

    .main-header {
        padding: 1rem;
    }

    .nav-links {
        display: none;
        /* Hide full nav on tiny screens if needed, or stick to simple text */
    }

    .main-header.scrolled .logo {
        font-size: 1rem;
    }
}


/* Slide 23 - The End */
.ending-text {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.the-end {
    font-family: 'Montserrat', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
}
