/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

html {
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
    background: #000000;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: radial-gradient(ellipse at center, #1a1f2e 0%, #0a0e1a 50%, #000000 100%);
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    position: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    min-height: 100vh;
}


/* ==================== PARTICLES ==================== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: -webkit-fill-available;
    z-index: 0;
    pointer-events: none;
    background: transparent;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float linear infinite;
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.4);
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

/* ==================== CONTAINER & CARD ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
}

.card {
    background: transparent !important;
    border-radius: 0;
    padding: 60px 80px;
    box-shadow: none !important;
    text-align: center;
    animation: cardEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 90vh;
    border: none !important;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card::before {
    display: none !important;
}

.card::-webkit-scrollbar {
    display: none;
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card::before {
    display: none;
}

/* ==================== LOGO ==================== */
.logo {
    display: none;
}

/* ==================== TYPOGRAPHY ==================== */
h1 {
    font-size: 12em;
    font-weight: 100;
    margin-bottom: 40px;
    letter-spacing: -8px;
    animation: titleFade 0.8s ease-out 0.2s both, subtleShine 8s ease-in-out infinite;
    text-transform: lowercase;
    position: relative;
    display: block; /* ADD THIS */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(139, 92, 246, 0.4) 20%,
        rgba(255, 255, 255, 0.3) 40%,
        rgba(59, 130, 246, 0.35) 60%,
        rgba(255, 255, 255, 0.25) 80%,
        rgba(139, 92, 246, 0.38) 100%);
    background-size: 300% 100%;
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 50px rgba(139, 92, 246, 0.4));
    filter: drop-shadow(0 0 50px rgba(139, 92, 246, 0.4))
            drop-shadow(0 0 100px rgba(139, 92, 246, 0.2));
}

@keyframes subtleShine {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

h1:hover {
    filter: drop-shadow(0 0 70px rgba(139, 92, 246, 0.6))
            drop-shadow(0 0 120px rgba(139, 92, 246, 0.3));
    animation: titleFade 0.8s ease-out 0.2s both, subtleShine 4s ease-in-out infinite;
}

@keyframes titleFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.beta {
    display: none;
}

.tagline {
    display: none;
}

.description {
    display: none;
}

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

/* ==================== SEARCH SECTION ==================== */
.search-section {
    display: block;
    animation: fadeIn 0.5s ease-out;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.search-section.active {
    display: block;
}

.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    animation: slideUp 0.6s ease-out 0.7s both;
    max-width: 1100px !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    border-radius: 100px;
    padding: 3px;
    background: linear-gradient(90deg, 
        rgba(255, 107, 107, 0.6) 0%, 
        rgba(255, 167, 196, 0.3) 25%,
        rgba(139, 92, 246, 0.6) 50%,
        rgba(59, 130, 246, 0.6) 75%,
        rgba(139, 92, 246, 0.3) 100%);
    background-size: 200% 100%;
    animation: slideUp 0.6s ease-out 0.7s both, borderGlow 3s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3), 
                0 0 60px rgba(139, 92, 246, 0.2),
                inset 0 0 20px rgba(139, 92, 246, 0.1);
    transition: all 0.4s ease;
}

.search-box:hover {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.5), 
                0 0 80px rgba(139, 92, 246, 0.3),
                0 0 120px rgba(139, 92, 246, 0.2),
                inset 0 0 30px rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.search-box:focus-within {
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.6), 
                0 0 100px rgba(139, 92, 246, 0.4),
                0 0 150px rgba(139, 92, 246, 0.3),
                inset 0 0 40px rgba(139, 92, 246, 0.2);
    animation: slideUp 0.6s ease-out 0.7s both, borderGlow 2s ease-in-out infinite, pulse 2s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.3);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.01) translateY(-2px);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

input[type="text"] {
    flex: 1;
    padding: 20px 30px;
    border: none;
    border-radius: 100px 0 0 100px;
    font-size: 16px;
    font-family: inherit;
    background: rgba(20, 25, 35, 0.95);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

input[type="text"]:focus {
    outline: none;
    background: rgba(20, 25, 35, 1);
    color: white;
    box-shadow: inset 0 2px 20px rgba(139, 92, 246, 0.2);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

input[type="text"]:focus::placeholder {
    color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ==================== OPTIONS ==================== */
.options {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    animation: slideUp 0.6s ease-out 0.8s both;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.option-group {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.option-group label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

select {
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

select option {
    background: #1a1f2e;
    color: #ffffff;
}

select:focus {
    outline: none;
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    width: 100%;
    animation: slideUp 0.6s ease-out 0.9s both;
    box-shadow: none;
}

#searchBtn {
    width: auto !important;
    padding: 20px 35px !important;
    border-radius: 0 100px 100px 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    position: relative;
    overflow: hidden;
}

#searchBtn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#searchBtn:hover::before {
    width: 300px;
    height: 300px;
}

#searchBtn span {
    position: relative;
    z-index: 1;
}

.btn-primary:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.15);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
    box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.4);
}


.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
}

/* ==================== PROGRESS ==================== */
.progress-section {
    display: none;
    margin-top: 30px;
    animation: slideUp 0.5s ease-out;
}

.progress-section.active {
    display: block;
}

.loading-orbitals {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 25px auto;
    display: none;
}

.progress-section.active .loading-orbitals {
    display: block;
    animation: orbitalsAppear 0.6s ease-out;
}

@keyframes orbitalsAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.orbital {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: orbit 2.5s linear infinite;
    opacity: 0.8;
}

.orbital:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #3b82f6;
    border-width: 2.5px;
    animation: orbit 2s linear infinite reverse;
}

.orbital:nth-child(3) {
    width: 45%;
    height: 45%;
    top: 27.5%;
    left: 27.5%;
    border-top-color: #ec4899;
    border-width: 2px;
    animation: orbit 1.5s linear infinite;
}

@keyframes orbit {
    to { transform: rotate(360deg); }
}

.progress-percentage {
    font-size: 42px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-shadow: 0 3px 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
}

.progress-percentage.updating {
    animation: numberPulse 0.6s ease-out;
}

@keyframes numberPulse {
    0% { 
        opacity: 0.6; 
        transform: scale(0.92);
    }
    50% {
        transform: scale(1.12);
    }
    100% { 
        opacity: 1; 
        transform: scale(1);
    }
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6 0%, #3b82f6 40%, #ec4899 80%, #8b5cf6 100%);
    background-size: 300% 100%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.8);
    animation: progressGlow 2.5s ease-in-out infinite, gradientShift 3s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.7);
    }
    50% {
        box-shadow: 0 0 35px rgba(139, 92, 246, 1);
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.status-message {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    font-weight: 500;
}

.status-message::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    border-radius: 50%;
    animation: statusDot 1.8s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

@keyframes statusDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.4;
    }
}

/* ==================== ERROR & RESULTS ==================== */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

.error-message.active {
    display: block;
}

.results-section {
    display: none;
}

.results-section.active {
    display: block;
}

.result-title {
    font-size: 2em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-weight: 400;
}

.result-meta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    flex-wrap: wrap;
}

.result-content {
    text-align: left;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 25px;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

/* ==================== HISTORY ==================== */
.history-section {
    margin-top: 60px;
}

.history-title {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.history-item {
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.history-item:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.history-title-text {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
}

.history-meta {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ==================== SPINNER ==================== */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== WELCOME SECTION ==================== */
.welcome-section {
    display: block;
    animation: fadeIn 0.8s ease-out;
    margin-bottom: 50px;
}

.welcome-section.hidden {
    display: none;
}

/* Hide everything in welcome section except h1 */
.welcome-section .tagline,
.welcome-section .description,
.welcome-section .cta-button {
    display: none;
}

.cta-button {
    display: none;
}

/* ==================== FIXED BUTTONS ==================== */
.fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    font-size: 20px;
    color: white;
}

.fullscreen-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
}


/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        max-height: 88vh;
    }

    .card {
        padding: 30px 20px;
    }

    h1 {
        font-size: 6em;
        letter-spacing: -4px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 20px;
        padding: 2px;
    }

    input[type="text"] {
        border-radius: 20px 20px 0 0;
        padding: 16px 20px;
    }

    #searchBtn {
        width: 100% !important;
        padding: 16px 24px !important;
        border-radius: 0 0 20px 20px !important;
    }

    .options {
        flex-direction: column;
        gap: 10px;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    h1 {
        font-size: 4em;
        letter-spacing: -2px;
    }
}

/* ==================== SCROLL INDICATOR ==================== */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    z-index: 10;
    text-decoration: none;
}

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

.scroll-indicator:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%) scale(1.2);
}

/* Scroll up indicator */
.scroll-indicator-up {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounceUp 2s infinite;
    z-index: 10;
    text-decoration: none;
}

.scroll-indicator-up:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%) scale(1.2);
}

@keyframes bounceUp {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ==================== NAVIGATION ARROWS ==================== */
.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.nav-arrow-left {
    left: 40px;
}

.nav-arrow-right {
    right: 40px;
}

.nav-arrow:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-arrow span {
    display: block;
    line-height: 1;
}

@media (max-width: 768px) {
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    
    .nav-arrow-left {
        left: 20px;
    }
    
    .nav-arrow-right {
        right: 20px;
    }
}

/* ==================== CAROUSEL SYSTEM ==================== */
.container {
    position: relative;
    overflow: hidden; /* IMPORTANT: Add this */
    min-height: 100vh;
}

.carousel-page {
    display: none;
    animation: fadeSlide 0.6s ease-out;
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;  /* ADD THIS */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;  /* ADD THIS */
}

.carousel-page.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: auto; /* IMPORTANT: Re-enable interaction for active page */
    position: relative; /* IMPORTANT: Make active page flow normally */
}

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

/* ==================== MISSION PAGE ==================== */
.mission-page {
    width: 100%;
    padding: 80px 60px;
    overflow-y: auto; /* ← ADD THIS */
    max-height: 100vh; /* ← ADD THIS */
}

.mission-content {
    width: 100%;
    max-width: 900px;
}

.mission-header {
    margin-bottom: 60px;
}

.mission-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    font-weight: 500;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.mission-title {
    font-size: 4em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
    margin: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(139, 92, 246, 0.7) 50%,
        rgba(59, 130, 246, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mission-body {
    color: rgba(255, 255, 255, 0.7);
}

.mission-intro {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 50px;
    color: rgba(255, 255, 255, 0.6);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.mission-item {
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    transition: all 0.4s ease;
}

.mission-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.mission-icon {
    font-size: 36px;
    margin-bottom: 20px;
}

.mission-item h3 {
    font-size: 1.3em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 12px;
}

.mission-item p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .mission-page {
        padding: 40px 30px;
    }
    
    .mission-title {
        font-size: 2.5em;
    }
    
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mission-intro {
        font-size: 16px;
    }
}

/* ==================== ABOUT SECTION ==================== */
.about-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
    scroll-margin-top: 0;
    margin-top: 0;
    z-index: 10;
}

.about-container {
    max-width: 1200px;
    width: 100%;
}

.about-header {
    text-align: center;
    margin-bottom: 60px;
}

.about-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    font-weight: 500;
    display: block;
    margin-bottom: 20px;
}

.about-header h2 {
    font-size: 3em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.about-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
}

.about-card:hover::before {
    opacity: 1;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.about-card h3 {
    font-size: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.about-card p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.about-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.about-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateX(5px);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.5);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    background: rgba(139, 92, 246, 0.4);
    transform: scale(1.1);
}

/* ==================== MODELS PAGE ==================== */
#modelsPage {
    overflow: hidden !important;
    max-height: 100vh !important;
    padding: 40px 20px 80px 20px;
    position: relative;
}

.models-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px; /* Extra bottom padding */
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}



.models-header {
    text-align: center;
    margin-bottom: 50px;
}

.models-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
    text-transform: uppercase;
}

.models-title {
    font-size: 3.5em;
    font-weight: 300;
    margin: 0 0 20px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.models-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.model-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.model-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

.model-card:hover::before {
    transform: scaleX(1);
}

.model-card.selected {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.6);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.model-card.selected::before {
    transform: scaleX(1);
    height: 4px;
}

.model-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.7);
}

.model-badge.recommended {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(59, 130, 246, 0.3));
    color: white;
}

.model-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    margin-top: 20px;
}

.model-icon {
    font-size: 36px;
    line-height: 1;
}

.model-name {
    font-size: 1.4em;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.model-description {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 24px;
    min-height: 60px;
}

.model-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.model-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.model-price {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.models-cta {
    text-align: center;
    margin-top: 40px;
}

.models-cta .btn {
    padding: 18px 36px;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#selectedModelName {
    font-weight: 600;
    color: #8b5cf6;
}

@media (max-width: 768px) {
    .models-title {
        font-size: 2.5em;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .model-card {
        padding: 24px;
    }
}

/* ==================== NEW SHOWCASE STYLE ==================== */
.models-showcase {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr 250px;
    grid-template-rows: auto 1fr 140px;
    gap: 0;
    padding: 40px 40px 30px 40px;
    position: relative;
    overflow: hidden;
}

/* Header - Top Left */
.showcase-header {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.showcase-label {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.showcase-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    line-height: 0.9;
    letter-spacing: -2px;
    text-transform: uppercase;
    margin: 0;
}

/* Canvas - Center */
.showcase-canvas-wrapper {
    grid-column: 1 / 4;
    grid-row: 1 / 3;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

#modelCanvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#modelCanvas:active {
    cursor: grabbing;
}

/* Loading Indicator */
.loading-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 5;
    pointer-events: none;
}

.spinner-3d {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(167, 139, 250, 0.2);
    border-top-color: #a78bfa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Stats - Right Side */
.showcase-stats {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.stats-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.stat-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    flex: 1;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
}

/* Bottom Info Panel */
.showcase-info {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 30px;
    z-index: 10;
    padding-bottom: 10px;
}

.info-left {
    flex: 1;
}

.model-description-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin-bottom: 10px;
    max-width: 400px;
}

.model-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #fbbf24;
}

.rating-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}


/* Model Thumbnails - Bottom Center */
.model-thumbnails {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 12px;
    z-index: 10;
    padding-bottom: 10px;
}

.thumbnail-btn {
    width: 65px;
    height: 65px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.thumbnail-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-5px);
}

.thumbnail-btn.active {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(236, 72, 153, 0.3));
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.4);
}

.thumb-icon {
    font-size: 1.8rem;
}

/* Controls Hint - Bottom Right */
.controls-hint-bottom {
    grid-column: 3 / 4;
    grid-row: 3 / 4;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    z-index: 10;
}

/* Responsive */
@media (max-width: 1024px) {
    .models-showcase {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto auto auto;
        gap: 20px;
        padding: 20px;
    }
    
    .showcase-header {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    
    .showcase-canvas-wrapper {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        height: 400px;
    }
    
    .showcase-stats {
        grid-column: 1 / 2;
        grid-row: 3 / 4;
        flex-direction: row;
        justify-content: space-around;
    }
    
    .showcase-info {
        grid-column: 1 / 2;
        grid-row: 4 / 5;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .model-thumbnails {
        grid-column: 1 / 2;
        grid-row: 5 / 6;
    }
    
    .controls-hint-bottom {
        display: none;
    }
    
    .showcase-title {
        font-size: 2.5rem;
    }
}

/* ==================== MOBILE FIX - SIMPLE & WORKING ==================== */

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    body {
        padding: 0 !important;
    }
    
    .container {
        padding: 20px 15px !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    .carousel-page {
        min-height: 100vh !important;
        max-height: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        position: relative !important;
        padding-bottom: 60px !important;
    }
    
    .card {
        padding: 20px 15px !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* TITLE */
    h1 {
        font-size: 3.5em !important;
        letter-spacing: -2px !important;
        margin: 20px 0 30px 0 !important;
    }
    
    /* SEARCH BOX */
    .search-box {
        flex-direction: column !important;
        border-radius: 20px !important;
        padding: 2px !important;
        margin-bottom: 20px !important;
    }
    
    input[type="text"] {
        border-radius: 20px 20px 0 0 !important;
        padding: 14px 18px !important;
        font-size: 14px !important;
    }
    
    #searchBtn {
        width: 100% !important;
        padding: 14px 20px !important;
        border-radius: 0 0 20px 20px !important;
    }
    
    /* OPTIONS */
    .options {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }
    
    .option-group {
        width: 100% !important;
    }
    
    select {
        width: 100% !important;
    }
    
    /* MODELS PAGE - SCROLLABLE */
    #modelsPage {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: none !important;
        min-height: 100vh !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .models-showcase {
        display: block !important;
        padding: 20px 15px 80px 15px !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }
    
    .showcase-header {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .showcase-label {
        font-size: 9px !important;
        margin-bottom: 10px !important;
    }
    
    .showcase-title {
        font-size: 2rem !important;
        line-height: 1 !important;
        margin-bottom: 20px !important;
    }
    
    .showcase-canvas-wrapper {
        width: 100% !important;
        height: 300px !important;
        margin: 20px 0 !important;
        position: relative !important;
    }
    
    #modelCanvas {
        width: 100% !important;
        height: 100% !important;
    }
    
    .showcase-stats {
        display: flex !important;
        justify-content: space-around !important;
        margin: 20px 0 !important;
        padding: 15px 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .stats-title {
        display: block !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    
    .stat-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
        margin-bottom: 5px !important;
    }
    
    .stat-value {
        font-size: 0.85rem !important;
    }
    
    .stat-dot {
        width: 6px !important;
        height: 6px !important;
        margin-bottom: 5px !important;
    }
    
    .showcase-info {
        text-align: center !important;
        padding: 20px 0 !important;
        margin: 20px 0 !important;
    }
    
    .info-left {
        width: 100% !important;
    }
    
    .model-description-text {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }
    
    .model-rating {
        font-size: 0.9rem !important;
        justify-content: center !important;
        margin-bottom: 20px !important;
    }
    
    .model-thumbnails {
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        margin: 20px 0 !important;
        flex-wrap: wrap !important;
    }
    
    .thumbnail-btn {
        width: 55px !important;
        height: 55px !important;
    }
    
    .thumb-icon {
        font-size: 1.5rem !important;
    }
    
    .controls-hint-bottom {
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        font-size: 0.7rem !important;
        margin-top: 20px !important;
        padding-bottom: 20px !important;
    }
    
    /* MISSION PAGE */
    .mission-page {
        padding: 30px 20px 80px 20px !important;
        overflow-y: auto !important;
        max-height: none !important;
    }
    
    .mission-title {
        font-size: 2em !important;
    }
    
    .mission-intro {
        font-size: 14px !important;
    }
    
    .mission-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* ABOUT SECTION */
    .about-section {
        padding: 40px 20px !important;
        min-height: 100vh !important;
    }
    
    .about-header h2 {
        font-size: 2em !important;
    }
    
    .about-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* NAVIGATION */
    .nav-arrow {
        width: 45px !important;
        height: 45px !important;
        font-size: 22px !important;
    }
    
    .nav-arrow-left {
        left: 10px !important;
    }
    
    .nav-arrow-right {
        right: 10px !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 3em !important;
    }
    
    .showcase-title {
        font-size: 1.6rem !important;
    }
    
    .showcase-canvas-wrapper {
        height: 250px !important;
    }
    
    .thumbnail-btn {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 380px) {
    h1 {
        font-size: 2.5em !important;
    }
    
    .showcase-title {
        font-size: 1.4rem !important;
    }
    
    .showcase-canvas-wrapper {
        height: 220px !important;
    }
}


