/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
   :root {
    /* Color Palette - Premium Dark Theme */
    --bg-base: #0a0c10;
    --bg-surface: #12161f;
    --bg-surface-glass: rgba(22, 28, 41, 0.4);
    
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899; /* Pink */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(236, 72, 153, 0.5));
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-main);
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* ==========================================================================
   Utility Classes & Layout
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.x-small { font-size: 0.75rem; }

.d-inline-block { display: inline-block; }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-lg { margin-top: var(--space-lg); }

.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-md { max-width: 800px; }

/* Dynamic Background Glows */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.4;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

.glow-2 {
    top: 30%;
    right: -20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
}

/* Glassmorphism */
.glass-effect {
    background: var(--bg-surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1200px;
    z-index: 100;
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    transition: background var(--transition-normal), border var(--transition-normal);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2px;
}

.logo-text-primary { color: var(--text-main); }
.logo-text-secondary { color: var(--primary-color); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-normal);
}

.btn-premium:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffd700;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--space-xl) * 2) 0 var(--space-xl);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    z-index: 10;
}

.badge-new {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

/* Downloader Form */
.downloader-box {
    padding: 1rem;
    border-radius: 20px;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.download-form {
    display: flex;
    gap: 0.75rem;
    position: relative;
}

.input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-icon {
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

#video-url {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 1.25rem 1rem;
    font-size: 1.05rem;
    font-family: var(--font-body);
    outline: none;
}

#video-url::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

.btn-paste {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0 1.25rem;
    cursor: pointer;
    font-size: 1.25rem;
    transition: color var(--transition-fast);
}

.btn-paste:hover {
    color: var(--text-main);
}

.btn-download {
    background: var(--gradient-primary);
    border: none;
    border-radius: 14px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 2.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-download span {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    opacity: 0;
    z-index: 1;
    transition: opacity var(--transition-normal);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-download:hover::before {
    opacity: 1;
}

.btn-download:active {
    transform: translateY(0);
}

.form-feedback {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    text-align: left;
    min-height: 20px;
    padding-left: 1rem;
    display: none;
}

.form-feedback.error {
    color: #ef4444;
    display: block;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ==========================================================================
   Sections General
   ========================================================================== */
.section {
    padding: var(--space-xl) 0;
}

.bg-darker {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   How To Use
   ========================================================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-highlight);
}

.step-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--bg-surface);
}

.step-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.step-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.step-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   Supported Sources
   ========================================================================== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.platform-card {
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-normal);
}

.platform-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.platform-icon {
    font-size: 3rem;
    transition: transform var(--transition-fast);
}

.platform-card:hover .platform-icon {
    transform: scale(1.1);
}

/* Platform Brand Colors */
.telegram { color: #0088cc; }
.twitter { color: #ffffff; }
.onlyfans { color: #00aff0; }
.vk { color: #4a76a8; }
.youtube { color: #ff0000; }
.istock { color: #000000; text-shadow: 0 0 1px #fff; } /* Adjust for dark background */

.platform-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    overflow: hidden;
    transition: background-color var(--transition-normal);
}

.faq-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-highlight);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-icon {
    transition: transform var(--transition-normal);
    color: var(--primary-color);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    border-top: 1px solid var(--border-glass);
    padding-top: var(--space-xl);
    background: #050608;
    position: relative;
    z-index: 10;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: var(--space-xl);
}

.footer-brand p {
    max-width: 350px;
    margin-top: 1rem;
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    padding: 1.5rem;
    margin: 0 -1rem 1rem; /* slight negative margin to stretch visually */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ==========================================================================
   Modals (Auth & Limit)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid var(--border-highlight);
    width: 90%;
    max-width: 450px;
    border-radius: 20px;
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.close-modal:hover {
    color: var(--text-main);
}

/* Auth Specifics */
.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-glass);
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 1rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color var(--transition-fast);
}

.auth-tab.active {
    color: var(--text-main);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px 3px 0 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.input-group-auth {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group-auth label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.input-group-auth input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
    outline: none;
}

.input-group-auth input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-error {
    color: #ef4444;
    font-size: 0.85rem;
    text-align: center;
    min-height: 20px;
}

/* Auth Navbar Details */
.auth-box {
    display: flex;
    align-items: center;
}

.user-info-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.token-badge {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #ffd700;
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
}

/* Limit Modal Specifics */
.limit-content {
    text-align: center;
    max-width: 500px;
}

.limit-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.limit-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: white;
}

.limit-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.limit-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ==========================================================================
   Animations & Responsive
   ========================================================================== */

/* Initial Load Animations */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-1 { animation-delay: 100ms; }
.stagger-2 { animation-delay: 200ms; }
.stagger-3 { animation-delay: 300ms; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal Animations - To be handled by JS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title { font-size: 3.5rem; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 3rem;
        --space-xl: 4rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-radius: 1rem;
        border: 1px solid var(--border-glass);
        margin-top: 0.5rem;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-normal);
        text-align: center;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .mobile-menu-toggle { display: block; }
    
    .download-form { flex-direction: column; }
    .btn-download { padding: 1.25rem; }
    
    .footer-top { grid-template-columns: 1fr; }
}
