/* 
 * DavinciOpen - High-End Glassmorphism Design 
 * Theme: Dark Mode (#050505) + Genius Purple (#7000ff) + Neon Cyan (#00d2d3)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;900&display=swap');

:root {
    /* Color Palette */
    --bg-color: #050505;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a0525 0%, #050505 60%);

    /* Glassmorphism Variables */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --glass-blur: blur(20px);

    /* Text & Accents */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-color: #7000ff;
    /* Genius Purple */
    --accent-glow: 0 0 30px rgba(112, 0, 255, 0.4);
    --secondary-accent: #00d2d3;
    /* Neon Cyan */
    --secondary-glow: 0 0 20px rgba(0, 210, 211, 0.4);

    /* UI Properties */
    --border-radius-xl: 32px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --transition-speed: 0.3s;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: auto;
    /* Allow interaction */
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1rem 0;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 2rem;
}

p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Layout Components */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(90deg, #7000ff, #00d2d3);
    color: white;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.top-bar-content {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.9rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    position: sticky;
    top: 40px;
    /* Below Top Bar */
    z-index: 1000;
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-icon-btn {
    text-decoration: none;
    font-size: 1.5rem;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-icon-small {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
}

#nav-login-btn {
    padding: 8px 20px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.2);
    color: white;
    font-weight: 600;
}

#nav-login-btn:hover {
    background: var(--accent-color);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.5);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    letter-spacing: -1px;
    background: linear-gradient(90deg, #fff, var(--secondary-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 600;
    transition: var(--transition-speed);
}

.lang-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #0a0a0a;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: none;
    flex-direction: column;
    min-width: 140px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    /* Higher than nav */
    pointer-events: auto;
}

.lang-switcher:hover .lang-dropdown,
.lang-dropdown:hover {
    display: flex;
}

.lang-option {
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--border-radius-md);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(112, 0, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.btn-glow {
    background: linear-gradient(135deg, var(--accent-color), #5000aa);
    color: white;
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.3);
}

/* Sections */
#landing-section {
    text-align: center;
    padding: 60px 0;
    position: relative;
}

.content-section {
    padding: 80px 20px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.5) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
}

.section-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Countdown Timer (Moved to Top Bar, styles kept minimal if needed) */
.countdown-timer {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* Infinite Marquee */
.marquee-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    margin-bottom: 30px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 0;
    /* Removed gap, handled by padding in content */
    margin-bottom: 15px;
}

.marquee-content {
    display: flex;
    gap: 20px;
    padding-right: 20px;
    /* Add padding to simulate gap for seamless loop */
}

.review-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 20px;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.review-card span {
    color: #ffd700;
    /* Gold Stars */
}

/* Animations */
.marquee-left .marquee-content {
    animation: scroll-left 40s linear infinite;
}

.marquee-right .marquee-content {
    animation: scroll-right 40s linear infinite;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

@keyframes scroll-right {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.pricing-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    position: relative;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.pricing-card.featured {
    border: 1px solid var(--accent-color);
    box-shadow: 0 0 50px rgba(112, 0, 255, 0.15);
    background: linear-gradient(180deg, rgba(112, 0, 255, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
}

.badge-deal {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-accent);
    color: #000;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    box-shadow: 0 0 20px var(--secondary-accent);
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 20px 0;
    color: white;
}

.price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 40px;
    text-align: left;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li::before {
    content: "✓";
    color: var(--secondary-accent);
    font-weight: bold;
}

/* App Interface */
.app-card {
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-xl);
    padding: 40px;
    margin-top: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 60px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(112, 0, 255, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.8;
}

textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    color: white;
    font-family: inherit;
    font-size: 1.1rem;
    resize: vertical;
    margin-top: 20px;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* History Grid */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.history-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    aspect-ratio: 1;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s;
}

.history-item:hover {
    transform: scale(1.03);
    border-color: var(--accent-color);
    z-index: 10;
}

.history-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-gradient {
    background: linear-gradient(90deg, var(--secondary-accent), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.margin-top {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Simplified for now */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 10px;
    }

    .container {
        padding: 10px;
    }
}

/* Modal Fixes */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    /* Centering handled by flexbox in overlay, ensuring transform doesn't conflict */
}

#auth-modal .modal {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: white;
}

/* Wheel Styles */
.wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.wheel {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    /* Ease-Out for spin */
    background: conic-gradient(#ff4757 0deg 60deg,
            #2ed573 60deg 120deg,
            #ffa502 120deg 180deg,
            #ff4757 180deg 240deg,
            #2ed573 240deg 300deg,
            #ffa502 300deg 360deg);
}

.segment {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 50%;
    transform-origin: bottom left;
    transform: translateX(-50%) rotate(calc(60deg * var(--i) + 30deg));
    /* +30deg to center text in segment */
    background: transparent;
    clip-path: none;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20px;
}

.segment span {
    transform: rotate(90deg);
    /* Text orientation */
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px black;
}

.wheel-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 2rem;
    color: white;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.modal.wheel-modal-content {
    background: linear-gradient(135deg, #2c3e50, #000);
}

/* --- NEW PLAYGROUND STYLES --- */

/* Magic Input Hero */
.hero-interactive {
    position: relative;
    max-width: 800px;
    margin: 40px auto 60px;
    text-align: center;
}

.magic-input-container {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Static thin border */
    border-radius: 24px;
    padding: 0;
    /* Remove padding here, textarea has it */
    overflow: hidden;
    /* Changed to visible if we want glow outside? No, requirement says sharp. */
    margin-bottom: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Running Light Effect */
.magic-input-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    /* width of the running light */
    background: conic-gradient(from var(--angle), transparent 80%, #00d2d3 95%, #fff 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotate-light 4s linear infinite;
    z-index: 5;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes rotate-light {
    to {
        --angle: 360deg;
    }
}

.magic-input-container textarea {
    position: relative;
    z-index: 2;
    background: transparent;
    /* removed bg */
    border: none;
    width: 100%;
    height: 150px;
    padding: 25px;
    font-size: 1.2rem;
    color: white;
    resize: none;
    font-weight: 300;
}

.magic-input-container textarea:focus {
    outline: none;
    background: transparent;
}

.input-footer {
    position: relative;
    z-index: 2;
    background: transparent;
    /* Changed from black to transparent for glass effect */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 15px;
    border-radius: 0 0 24px 24px;
    margin-top: -5px;
    /* overlap */
}

.helper-btns {
    display: flex;
    gap: 15px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--secondary-accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.btn-text:hover {
    color: white;
    text-shadow: 0 0 10px var(--secondary-accent);
}

.upload-trigger {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 5px 10px;
    border: 1px dashed var(--glass-border);
    border-radius: 10px;
}

.upload-trigger:hover {
    border-color: var(--accent-color);
    color: white;
}

.btn-large {
    font-size: 1.3rem;
    padding: 18px 50px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(112, 0, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(112, 0, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(112, 0, 255, 0);
    }
}

/* --- COMMUNITY SHOWCASE --- */
.showcase-section {
    padding: 60px 0;
    text-align: center;
    position: relative;
    z-index: 5;
}

.showcase-scroller {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 5px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.showcase-scroller::-webkit-scrollbar {
    display: none;
}

.showcase-item {
    flex: 0 0 auto;
    width: 280px;
    height: 280px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.showcase-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(112, 0, 255, 0.3);
    border-color: var(--accent-color);
    z-index: 10;
}

.showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.showcase-item:hover img {
    transform: scale(1.1);
}

/* Quick Action Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto 60px;
}

.action-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-md);
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.action-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-title {
    font-weight: 700;
    color: white;
    font-size: 1rem;
}

.action-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Auth Modal Split */
.auth-split {
    display: flex;
    gap: 30px;
    align-items: center;
}

.auth-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    position: relative;
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 0.8rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    height: 100px;
    width: 1px;
    background: var(--glass-border);
    z-index: -1;
}

.auth-divider span {
    background: #1a1a1a;
    /* Match modal bg */
    padding: 5px 0;
}

.auth-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: var(--border-radius-md);
    color: white;
    width: 100%;
}

.small-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0;
}

@media (max-width: 768px) {
    .auth-split {
        flex-direction: column;
    }

    .auth-divider {
        width: 100%;
        height: 40px;
    }

    .auth-divider::before {
        width: 100%;
        height: 1px;
        top: 50%;
    }

    .auth-divider span {
        padding: 0 10px;
    }
}

/* Unification Updates */
.btn-text,
.upload-trigger span,
.btn {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-text {
    font-size: 0.8rem;
    font-weight: 600;
}

#nav-login-btn {
    margin-right: 15px;
}

.hidden {
    display: none !important;
}