@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #121212;
    --text-light: #f5f5f5;
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: var(--text-light);
    overflow: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(236, 180, 231, 0.4) 0%, rgba(138, 43, 226, 0.2) 40%, transparent 80%);
    animation: rotateBg 20s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#splash-screen .logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: zoomIn 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

#splash-screen .slogan {
    font-size: 1.2rem;
    color: var(--text-light);
    opacity: 0;
    margin-top: 10px;
    font-weight: 500;
    animation: fadeInSlogan 1s ease forwards;
    animation-delay: 0.8s;
}

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

@keyframes zoomIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: scale(1.2); opacity: 1; }
}

/* Floating Header */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    padding: 10px 20px;
    z-index: 1050;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(20, 20, 35, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-group {
    display: flex;
    flex-direction: column;
}

.brand-logo {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 4px 10px rgba(0,0,0,0.5);
    line-height: 1;
}

.brand-slogan {
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
    text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
}

.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none; /* Handled via active class or initially hidden */
    justify-content: center;
    align-items: center;
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.5);
}
.header-back-btn.active-back {
    display: flex;
    animation: fadeInBtn 0.3s forwards;
}

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

.header-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-social-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 18px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.1);
    transition: background 0.3s;
}
.header-social-icon:hover {
    background: rgba(255,255,255,0.2);
}

.video-mute-btn {
    position: absolute;
    top: 90px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    z-index: 1000;
    color: white;
}

.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.glass-btn:active {
    transform: scale(0.95);
}

/* Main App Layout */
.app-container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.screens-wrapper {
    display: flex;
    width: 200vw; /* 2 screens */
    height: 100%;
    transition: transform var(--transition-speed) cubic-bezier(0.25, 1, 0.5, 1);
}

.screen {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Portfolio Screen (Reels format) */
#portfolio-screen {
    background: transparent;
}

.reels-container {
    width: 100%;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.reels-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.reel-item {
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    position: relative;
    background: transparent;
}

.reel-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 20px 80px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    pointer-events: none;
}

.reel-info .author {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.reel-info .title {
    font-size: 1rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.reel-info .hashtags {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.music-marquee {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    width: 60%;
}

.music-marquee ion-icon {
    font-size: 1.2rem;
    animation: spin 3s linear infinite;
}

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

/* Nav Buttons inside screens */
.cta-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    padding: 15px 30px;
    border-radius: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    z-index: 1000;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(106, 17, 203, 0.5);
    animation: pulseCTA 2.5s infinite;
    cursor: pointer;
}

@keyframes pulseCTA {
    0% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(106, 17, 203, 0.7); }
    50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 0 0 15px rgba(106, 17, 203, 0); }
    100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 0 0 rgba(106, 17, 203, 0); }
}



/* Vertical Scroll Indicator Dots */
.scroll-dots {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}
.scroll-dots .dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    animation: dotScroll 2s infinite;
}
.scroll-dots .dot:nth-child(1) { animation-delay: 0s; }
.scroll-dots .dot:nth-child(2) { animation-delay: 0.3s; }
.scroll-dots .dot:nth-child(3) { animation-delay: 0.6s; }
.scroll-dots .dot:nth-child(4) { animation-delay: 0.9s; }

@keyframes dotScroll {
    0%, 100% { background: rgba(255, 255, 255, 0.4); transform: scale(1); }
    50% { background: rgba(255, 255, 255, 1); transform: scale(1.3); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}

/* Chat-bot Screen */
#chatbot-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding-top: 75px;  /* Push widget below global header */
    padding-bottom: 20px;
}

/* Smartphone Frame styling (Mobile default = fullscreen) */
.smartphone-frame {
    width: 100%;
    height: 100%;
    max-height: none;
    border: none;
    border-radius: 0;
    position: relative;
    box-shadow: none;
    background: transparent;
    overflow: hidden;
}

.notch {
    display: none; /* Hidden on mobile */
}

.iframe-container {
    width: 100%;
    height: 100%;
    background: #fff; /* In case iframe is transparent */
}

.iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

/* Onboarding Hints */
.native-hint {
    position: absolute;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.native-hint.show {
    opacity: 1;
}

#swipe-hint {
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
}

#scroll-hint {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.hint-content {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: bounce 2s infinite;
}

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

/* Responsive Options */

/* Desktop & Tablet Landscape Side-by-Side (>= 850px) */
.desktop-order-hint {
    display: none;
}

@media screen and (min-width: 850px) and (min-height: 600px) {
    .app-header {
        padding: 15px 5%;
    }

    .screens-wrapper {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 30px;
        padding: 105px 20px 20px 20px;
        transform: translateX(0) !important; /* Disable swipe */
        box-sizing: border-box;
    }

    .screen {
        width: auto !important;
        height: 100%;
        max-height: 100%;
        flex: 1;
        position: static;
        border-radius: 20px;
    }

    #portfolio-screen {
        max-width: 400px;
        max-height: 100%;
        background: rgba(20, 20, 35, 0.4);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        border-radius: 30px;
        overflow: hidden;
    }

    #chatbot-screen {
        max-width: 420px;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .desktop-order-hint {
        display: flex;
        align-items: center;
        gap: 15px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        padding: 12px 20px;
        border-radius: 20px;
        margin-bottom: 20px;
        color: #fff;
        box-shadow: 0 5px 15px rgba(0,0,0,0.3);
        animation: floatHint 3s ease-in-out infinite;
        width: 100%;
        max-width: 375px;
    }

    .desktop-order-hint .hint-icon-wrap {
        width: 45px;
        height: 45px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        box-shadow: 0 4px 10px rgba(106, 17, 203, 0.4);
    }

    .desktop-order-hint h3 {
        font-size: 1.05rem;
        margin-bottom: 3px;
        font-weight: 700;
        background: linear-gradient(135deg, #fff, #e0e0e0);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .desktop-order-hint p {
        font-size: 0.8rem;
        color: #ddd;
        line-height: 1.2;
    }

    @keyframes floatHint {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }

    .smartphone-frame {
        width: 100%;
        max-width: 375px;
        height: auto;
        flex: 1;
        max-height: 800px;
        border: 12px solid #222;
        border-radius: 40px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 2px #444;
        background: #1e1e1e;
        display: flex;
        flex-direction: column;
    }

    .notch {
        display: block;
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 140px;
        height: 22px;
        background: #222;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        z-index: 10;
    }

    .cta-btn, .header-back-btn, .native-hint {
        display: none !important;
    }
}

/* Authentication Modal Styles */
.auth-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 45px rgba(0,0,0,0.5);
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-modal-overlay.active .auth-modal-content {
    transform: scale(1);
}

.close-auth-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.close-auth-btn:hover { opacity: 1; }

#auth-modal-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 5px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-tab.active {
    background: rgba(255,255,255,0.1);
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}
.auth-form input:focus {
    border-color: var(--primary-color);
}

.auth-submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(106, 17, 203, 0.4);
}
.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.6);
}

.auth-error-msg {
    color: #ff4d4d;
    font-size: 0.85rem;
    text-align: center;
}

.auth-success-msg {
    color: #00e676;
    font-size: 0.85rem;
    text-align: center;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #888;
    font-size: 0.85rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.auth-divider span {
    padding: 0 10px;
}

.auth-socials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}
.auth-social-btn:hover {
    background: rgba(255,255,255,0.1);
}

.auth-user-info {
    text-align: center;
}
.auth-user-info p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #e0e0e0;
}
.auth-user-info span {
    font-weight: bold;
    color: white;
}
