/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-input-hover: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --accent-cyan: #06B6D4;
    --accent-emerald: #10B981;
    --accent-amber: #F59E0B;
    --accent-rose: #F43F5E;
    --gradient-primary: linear-gradient(135deg, #6C5CE7 0%, #A855F7 50%, #EC4899 100%);
    --gradient-secondary: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 50%, #F43F5E 100%);
    --gradient-warm: linear-gradient(135deg, #F59E0B 0%, #EF4444 50%, #EC4899 100%);
    --sidebar-width: 76px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-xs: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

@keyframes interactiveBgProfile {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(-45deg, #ffffff, #eff6ff, #f0fdf4, #f8fafc);
    background-size: 400% 400%;
    animation: interactiveBgProfile 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ===== PARTICLE CANVAS ===== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    z-index: 100;
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* PRO Badge */
.pro-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899);
    color: white;
    padding: 2px 5px;
    border-radius: 6px;
    margin-top: 2px;
    line-height: 1.4;
}

.sidebar-feature-btn.pro-feature {
    position: relative;
}

/* Pro Tools Shortcut Row */
.pro-tool-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.pro-tool-shortcut:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}


/* Billing Toggle */
.billing-toggle-label input:checked~.billing-toggle-track {
    background-color: #8B5CF6;
}

.billing-toggle-label input:checked~.billing-toggle-thumb {
    transform: translateX(24px);
}

.sidebar-credits {
    display: flex;
    align-items: center;
    background: var(--bg-hover);
    padding: 6px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: default;
    border: 1px solid var(--border-color);
}

.sidebar-credits .credits-icon {
    font-size: 14px;
    margin-right: 4px;
}

.sidebar-credits .credits-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.sidebar-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
}

.sidebar-btn.active {
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.12);
}

.sidebar-btn.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--accent-purple);
    border-radius: 0 3px 3px 0;
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.sidebar-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

/* Sidebar Feature Tools */
.sidebar-chat-btn {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-purple);
    flex-direction: column;
    gap: 4px;
}

.sidebar-chat-btn:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
}

.sidebar-btn-text {
    font-size: 10px;
    font-weight: 600;
}

.sidebar-divider {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    align-items: center;
    overflow-y: auto;
    scrollbar-width: none;
    max-height: calc(100vh - 180px);
}

.sidebar-features::-webkit-scrollbar {
    display: none;
}

.sidebar-feature-btn {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.sidebar-feature-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.05);
}

.sidebar-feature-icon {
    font-size: 20px;
    transition: var(--transition);
}

.sidebar-feature-btn:hover .sidebar-feature-icon {
    transform: scale(1.1) translateY(-2px);
}

.sidebar-feature-title {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sidebar-history-btn {
    margin-bottom: 5px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    position: relative;
    z-index: 10;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.brand-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.4));
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #8B5CF6, #A855F7, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.upgrade-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 24px;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-xs);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 24px 80px;
    gap: 32px;
}

/* ===== INTERACTIVE LOGO ===== */
.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 8px;
}

.logo-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}

.logo-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: ringRotate 6s linear infinite;
}

.ring-1 {
    width: 100px;
    height: 100px;
    border-top-color: var(--accent-purple);
    border-right-color: var(--accent-pink);
    animation-duration: 4s;
}

.ring-2 {
    width: 115px;
    height: 115px;
    border-bottom-color: var(--accent-cyan);
    border-left-color: var(--accent-emerald);
    animation-duration: 6s;
    animation-direction: reverse;
}

.ring-3 {
    width: 88px;
    height: 88px;
    border-top-color: var(--accent-amber);
    border-left-color: var(--accent-rose);
    animation-duration: 8s;
}

.logo-icon {
    position: relative;
    z-index: 2;
    width: 72px;
    height: 72px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow), 0 0 60px rgba(139, 92, 246, 0.1);
    transition: var(--transition);
}

.logo-icon img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.5));
}

.logo-container:hover .logo-icon {
    transform: scale(1.1);
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.4), 0 0 100px rgba(236, 72, 153, 0.2);
}

.logo-container:hover .ring-1 {
    animation-duration: 2s;
}

.logo-container:hover .ring-2 {
    animation-duration: 3s;
}

.logo-container:hover .ring-3 {
    animation-duration: 4s;
}

.logo-spark {
    animation: sparkle 2s ease-in-out infinite;
}

.logo-star {
    animation: twinkle 1.5s ease-in-out infinite;
}

.star-1 {
    animation-delay: 0s;
}

.star-2 {
    animation-delay: 0.5s;
}

.star-3 {
    animation-delay: 1s;
}

/* ===== AI AVATAR VIDEO (Right Side) ===== */
/* Existing unused ai-avatar-video class, we can leave or reuse */
.ai-avatar-video {
    position: fixed;
    right: 2%;
    bottom: 5%;
    width: 350px;
    height: auto;
    z-index: 50;
    pointer-events: none;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.2));
    transition: opacity 0.5s ease-in-out;
}

/* ===== NEW AI AVATAR VIDEO CONTAINER (Near Chat) ===== */
.ai-avatar-container {
    position: absolute;
    bottom: -80px;
    right: -240px;
    width: 250px;
    height: 250px;
    z-index: 10;
    pointer-events: auto;
    /* Let clicks pass to the video/button */
}

/* Close Avatar Button */
.close-avatar-btn {
    position: absolute;
    top: -15px;
    right: 0px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
}

.close-avatar-btn:hover {
    background: rgba(236, 72, 153, 0.8);
    border-color: rgba(236, 72, 153, 1);
    transform: scale(1.1);
}

/* Mute Avatar Button */
.mute-avatar-btn {
    position: absolute;
    top: -15px;
    right: 38px;
    /* Placed next to the close button */
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: var(--transition);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
}

/* Show custom controls when the native controls are enabled */
.show-custom-controls .close-avatar-btn,
.show-custom-controls .mute-avatar-btn {
    opacity: 1;
    pointer-events: auto;
}

.mute-avatar-btn:hover {
    background: rgba(16, 185, 129, 0.8);
    /* Turns emerald green on hover */
    border-color: rgba(16, 185, 129, 1);
    transform: scale(1.1);
}

.ai-avatar-video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Don't crop, show full human with transparency */
    mix-blend-mode: screen;
    /* Removes black background */
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.5));
    transition: var(--transition);
}


/* ===== AI MASCOT ===== */
.ai-mascot {
    position: relative;
    width: 70px;
    height: 70px;
    margin: -10px auto 10px;
    cursor: pointer;
    z-index: 20;
    animation: floatMascot 4s ease-in-out infinite;
}

@keyframes floatMascot {

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

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

.ai-mascot svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 15px rgba(139, 92, 246, 0.4));
    transition: var(--transition);
}

.ai-mascot:hover svg {
    filter: drop-shadow(0 10px 25px rgba(139, 92, 246, 0.8));
    transform: scale(1.05);
}

.robo-arm-right {
    transform-origin: 80px 50px;
}

.ai-mascot:hover .robo-arm-right {
    animation: waveArm 0.8s ease-in-out infinite;
}

@keyframes waveArm {

    0%,
    100% {
        transform: rotate(-30deg);
    }

    50% {
        transform: rotate(20deg);
    }
}

.mascot-tooltip {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: var(--gradient-primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.mascot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #A855F7 transparent transparent transparent;
}

.ai-mascot:hover .mascot-tooltip {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}

/* ===== SIDE MASCOTS (DECORATIVE) ===== */
.side-mascot {
    position: absolute;
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    top: 50%;
    z-index: 10;
    pointer-events: none;
    /* Let clicks pass through to background */
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .side-mascot {
        opacity: 0.4;
        /* Fade them out on smaller screens so they don't distract */
    }
}

@media (max-width: 768px) {
    .side-mascot {
        display: none;
        /* Completely hide on mobile to save space */
    }
}

.left-mascot {
    left: 5%;
    animation: floatLeftMascot 6s ease-in-out infinite;
}

.right-mascot {
    right: 5%;
    animation: floatRightMascot 7s ease-in-out infinite reverse;
}

@keyframes floatLeftMascot {

    0%,
    100% {
        transform: translate(0, 0) rotate(-5deg);
    }

    33% {
        transform: translate(10px, -20px) rotate(5deg);
    }

    66% {
        transform: translate(-5px, 15px) rotate(-2deg);
    }
}

@keyframes floatRightMascot {

    0%,
    100% {
        transform: translate(0, 0) rotate(5deg);
    }

    33% {
        transform: translate(-10px, -25px) rotate(-5deg);
    }

    66% {
        transform: translate(5px, 20px) rotate(2deg);
    }
}

.side-mascot svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.1));
    transition: var(--transition);
}

.left-bot {
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
}

.right-drone {
    filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.3));
}

/* Core rotation for the drone */
.right-drone ellipse {
    transform-origin: 50px 50px;
    animation: spinRing 4s linear infinite;
}

@keyframes spinRing {
    from {
        transform: rotate(0deg) scale(1.1);
    }

    to {
        transform: rotate(360deg) scale(1.1);
    }
}

/* ===== FLOATING 3D FEATURE CARDS ===== */
.floating-cards-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}

.f-icon {
    position: absolute;
    width: 100px;
    height: 100px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatFeatureCard 6s ease-in-out infinite;
    text-align: center;
}

.f-icon:hover {
    transform: translateY(-10px) scale(1.05) !important;
    z-index: 10;
}

.f-svg {
    width: 44px;
    height: 44px;
    filter: drop-shadow(0 6px 10px rgba(139, 92, 246, 0.3)) drop-shadow(0 4px 5px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.f-icon:hover .f-svg {
    filter: drop-shadow(0 10px 15px rgba(139, 92, 246, 0.5)) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.15));
    transform: scale(1.1);
}

.f-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* Specific Card Placements - Scattered across entire screen */
/* 
    Left Mascot is at: left: 5% (middle height approx, ~50% top)
    Right Mascot is at: right: 5% (middle height approx, ~50% top)
    Avatar is at: bottom right of center
*/
.f-card-1 {
    /* Top Left */
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.f-card-2 {
    /* Middle Left */
    top: 38%;
    left: 15%;
    animation-delay: 1.2s;
}

.f-card-3 {
    /* Bottom Left */
    top: 70%;
    left: 8%;
    animation-delay: 2.4s;
}

.f-card-4 {
    /* Top Right (fills empty space near Upgrade) */
    top: 15%;
    right: 10%;
    animation-delay: 0.6s;
}

.f-card-5 {
    /* Middle/Bottom Right (avoids right mascot & avatar) */
    top: 68%;
    right: 12%;
    animation-delay: 1.8s;
}

.f-card-6 {
    /* Top Center-Left */
    top: 8%;
    left: 32%;
    animation-delay: 0.3s;
}

.f-card-7 {
    /* Top Center-Right */
    top: 8%;
    right: 32%;
    animation-delay: 1.5s;
}

.f-card-8 {
    /* Bottom Center-Left (pushed left to dodge chat input) */
    top: 85%;
    left: 15%;
    animation-delay: 2.1s;
}

@keyframes floatFeatureCard {

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

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

/* ===== CHAT HISTORY & WRAPPER ===== */
.chat-interface-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.chat-history {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    max-height: 40vh;
    padding-bottom: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align messages to the bottom */
    gap: 16px;
    padding: 10px;
    scrollbar-width: none;
    z-index: 20;

    /* Upward absolute expansion by default */
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
}

/* ===== CHAT MODE LAYOUT ===== */
body.chat-mode .hero {
    justify-content: flex-start;
    padding-top: 20px;
}

body.chat-mode .ai-mascot {
    margin-top: 0;
    margin-bottom: 5px;
    transform: scale(0.85);
}

body.chat-mode .chat-interface-wrapper {
    flex: 1;
    justify-content: flex-end;
    min-height: 0;
    margin-bottom: 20px;
}

body.chat-mode .chat-history {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    max-height: none;
    height: auto;
    min-height: 0;
    flex: 1 1 0;
    background: rgba(30, 30, 45, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-history::-webkit-scrollbar {
    display: none;
}

.chat-message {
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 15px;
    line-height: 1.5;
    max-width: 80%;
    animation: messagePopIn 0.3s ease-out forwards;
    font-family: 'Inter', sans-serif;
}

@keyframes messagePopIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-message.ai {
    align-self: flex-start;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-bottom-left-radius: 4px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.1);
}

/* ===== HERO TITLE ===== */
.hero-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.title-gradient {
    background: linear-gradient(135deg, #E2E8F0 0%, #CBD5E1 30%, #C4B5FD 60%, #F9A8D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== INPUT CONTAINER ===== */
.input-container {
    width: 100%;
    max-width: 680px;
}

.input-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius);
    padding: 16px 20px;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

.input-wrapper:focus-within {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: var(--shadow-card), 0 0 40px rgba(139, 92, 246, 0.1);
}

#questionInput {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    resize: none;
    min-height: 24px;
    max-height: 200px;
}

#questionInput::placeholder {
    color: var(--text-muted);
}

.input-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.input-actions-left,
.input-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.input-action-btn:hover {
    background: var(--bg-input-hover);
    color: var(--text-primary);
}

.model-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-input);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.model-selector:hover {
    background: var(--bg-input-hover);
}

.model-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 8px var(--accent-emerald);
}

.model-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0.5;
}

.send-btn.active {
    opacity: 1;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.send-btn:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* ===== FEATURE CARDS GRID ===== */
.feature-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 16px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--border-radius);
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: var(--transition);
    opacity: 0.5;
}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(255, 255, 255, 0.05);
    background: rgba(40, 40, 70, 0.8);
}

.feature-card-icon {
    font-size: 32px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: var(--transition);
}

.feature-card:hover .feature-card-icon {
    transform: scale(1.15) translateY(-2px);
}

.feature-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: 0.02em;
}

.feature-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gradient-secondary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
}

.feature-badge.badge-hot {
    background: var(--gradient-warm);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Specific Card Glows on Hover */
.feature-card.card-video:hover::before {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    opacity: 1;
}

.feature-card.card-image:hover::before {
    background: linear-gradient(135deg, #F59E0B, #EC4899);
    opacity: 1;
}

.feature-card.card-poster:hover::before {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
    opacity: 1;
}

.feature-card.card-web:hover::before {
    background: linear-gradient(135deg, #10B981, #06B6D4);
    opacity: 1;
}

.feature-card.card-interior:hover::before {
    background: linear-gradient(135deg, #8B5CF6, #6366F1);
    opacity: 1;
}

.feature-card.card-ugc:hover::before {
    background: linear-gradient(135deg, #F43F5E, #F97316);
    opacity: 1;
}

.feature-card.card-invite:hover::before {
    background: linear-gradient(135deg, #E879F9, #C084FC);
    opacity: 1;
}

.feature-card.card-linkedin:hover::before {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    opacity: 1;
}

/* ===== ANIMATIONS ===== */
@keyframes glowPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes ringRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes sparkle {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.3) rotate(45deg);
        opacity: 1;
    }
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ENTRANCE ANIMATIONS ===== */
.logo-container {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.hero-title {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.input-container {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.action-chips {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.7s both;
}

/* ===== RESPONSIVE ===== */

/* --- Tablets in landscape / small laptops (up to 1024px) --- */
@media (max-width: 1024px) {

    .hero-title {
        font-size: 36px !important;
    }

    .hero-subtitle {
        font-size: 15px !important;
    }

    .chat-container {
        max-width: 680px;
    }

    .upgrade-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* --- Tablets / iPad portrait (up to 768px) --- */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
    }

    .top-bar {
        padding: 10px 16px;
    }

    .brand-tagline {
        display: none;
    }

    .brand-name {
        font-size: 14px;
    }

    .upgrade-btn span:first-child {
        display: none;
    }

    .upgrade-btn {
        padding: 7px 12px;
        font-size: 12px;
    }

    .hero {
        padding: 0 16px 80px;
        gap: 24px;
    }

    .hero-title {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }

    .hero-subtitle {
        font-size: 14px !important;
        padding: 0 8px;
    }

    .action-chips {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .chip {
        padding: 6px 14px;
        font-size: 12px;
    }

    .logo-container {
        width: 90px;
        height: 90px;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
    }

    .logo-icon svg {
        width: 34px;
        height: 34px;
    }

    .ring-1 {
        width: 76px;
        height: 76px;
    }

    .ring-2 {
        width: 88px;
        height: 88px;
    }

    .ring-3 {
        width: 68px;
        height: 68px;
    }

    .chat-container {
        width: 100%;
        max-width: 100%;
        padding: 0 8px;
    }

    .chat-input-wrapper {
        border-radius: 16px;
        padding: 12px 14px;
    }

    .chat-input {
        font-size: 14px;
    }

    .send-btn {
        width: 40px;
        height: 40px;
    }

    /* Forms — make them full screen on mobile */
    .form-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .form-page {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 92vh;
        overflow-y: auto;
    }

    .form-header {
        padding: 28px 20px 20px;
    }

    .form-body {
        padding: 20px;
        gap: 16px;
    }

    /* Birthday form grid — stack columns on mobile */
    #aiBirthdayForm>div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    /* Style options grid — 2 columns on mobile */
    #aiBirthdayForm .style-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .form-submit-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .toggle-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* --- Small phones (up to 480px) --- */
@media (max-width: 480px) {
    .top-bar {
        padding: 8px 12px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

    .brand-icon img {
        width: 20px;
        height: 20px;
    }

    .brand-name {
        font-size: 13px;
    }

    .hero {
        padding: 0 12px 100px;
        gap: 20px;
    }

    .hero-title {
        font-size: 22px !important;
    }

    .hero-subtitle {
        font-size: 13px !important;
    }

    .logo-container {
        width: 80px;
        height: 80px;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }

    .logo-icon svg,
    .logo-icon img {
        width: 28px;
        height: 28px;
    }

    .ring-1 {
        width: 64px;
        height: 64px;
    }

    .ring-2 {
        width: 76px;
        height: 76px;
    }

    .ring-3 {
        width: 56px;
        height: 56px;
    }

    .action-chips {
        gap: 6px;
    }

    .chip {
        padding: 5px 12px;
        font-size: 11px;
    }

    .chat-input-wrapper {
        padding: 10px 12px;
        border-radius: 14px;
    }

    .chat-input {
        font-size: 13px;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }

    /* Full-height modal on tiny phones */
    .form-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .form-page {
        border-radius: 16px 16px 0 0;
        max-height: 95vh;
    }

    .form-title {
        font-size: 18px !important;
    }

    .form-body {
        padding: 16px;
        gap: 14px;
    }

    .form-input,
    .form-select,
    .form-textarea {
        font-size: 13px;
        padding: 10px 12px;
    }

    .form-submit-btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    /* Style grid — single column on tiny screens */
    #aiBirthdayForm .style-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* Footer responsive */
    footer {
        padding: 16px 12px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }
}


/* ===== LOGIN PANEL ===== */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.login-panel {
    position: absolute;
    left: var(--sidebar-width);
    top: 0;
    bottom: 0;
    width: 380px;
    background: rgba(20, 20, 40, 0.97);
    backdrop-filter: blur(30px);
    border-right: 1px solid rgba(139, 92, 246, 0.15);
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.login-overlay.active .login-panel {
    transform: translateX(0);
}

.login-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 5;
}

.login-close-btn:hover {
    background: rgba(244, 63, 94, 0.15);
    border-color: rgba(244, 63, 94, 0.3);
    color: var(--accent-rose);
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #E2E8F0, #C4B5FD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 13px;
    color: #cbd5e1;
}

/* Gmail Button */
.gmail-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.gmail-signin-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.15);
}

.gmail-signin-btn:active {
    transform: translateY(0);
}

/* Divider */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.login-divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.03em;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s;
}

.form-input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-input-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.form-input-wrapper input:focus {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

.form-input-wrapper input:focus~.form-input-icon,
.form-input-wrapper:focus-within .form-input-icon {
    color: var(--accent-purple);
}

.password-toggle {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #e2e8f0;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transition: var(--transition);
    position: relative;
}

.remember-me input:checked+.checkmark {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
}

.remember-me input:checked+.checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.forgot-link {
    font-size: 12px;
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: var(--accent-pink);
}

/* Submit Button */
.login-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border-radius: 12px;
    border: none;
    background: var(--gradient-primary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25);
    margin-top: 4px;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.4);
}

.login-submit-btn:active {
    transform: translateY(0);
}

/* Login Footer */
.login-footer {
    text-align: center;
}

.login-footer p {
    font-size: 13px;
    color: #cbd5e1;
}

.signup-link {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.signup-link:hover {
    color: var(--accent-pink);
}

/* Login panel entrance animation for children */
.login-overlay.active .login-header {
    animation: fadeInUp 0.5s ease 0.2s both;
}

.login-overlay.active .gmail-signin-btn {
    animation: fadeInUp 0.5s ease 0.3s both;
}

.login-overlay.active .login-divider {
    animation: fadeInUp 0.5s ease 0.35s both;
}

.login-overlay.active .login-form {
    animation: fadeInUp 0.5s ease 0.4s both;
}

.login-overlay.active .login-footer {
    animation: fadeInUp 0.5s ease 0.5s both;
}

/* Logged-in state for avatar */
.sidebar-avatar.logged-in {
    background: var(--accent-emerald);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.sidebar-avatar.logged-in::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-emerald);
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

/* Login responsive */
@media (max-width: 768px) {
    .login-panel {
        left: 0;
        width: 100%;
        padding: 24px 20px;
    }
}

/* ===== AI IMAGE FORM PAGE ===== */
.form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(5, 2, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 20px;
}

.form-overlay.active {
    display: flex;
    animation: formFadeIn 0.4s ease;
}

@keyframes formFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.form-page {
    position: relative;
    width: 100%;
    max-width: 560px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 250, 0.98));
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 24px;
    padding: 0;
    box-shadow:
        0 25px 80px rgba(139, 92, 246, 0.15),
        0 0 0 1px rgba(139, 92, 246, 0.1),
        inset 0 1px 0 rgba(0, 0, 0, 0.05);
    animation: formSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes formSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.form-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.form-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #EF4444;
    transform: rotate(90deg);
}

/* Form Header */
.form-header {
    text-align: center;
    padding: 40px 32px 24px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.form-brand {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.form-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #C084FC, #A855F7, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Form Body */
.form-body {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

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

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.form-label .required {
    color: #EF4444;
    margin-left: 2px;
}

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Select Dropdown */
.form-select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 12px 40px 12px 14px;
    background: var(--bg-input);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: var(--transition);
}

.form-select:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.form-select:focus {
    border-color: #A855F7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.form-select option {
    background: #1a0a30;
    color: #fff;
}

.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}



.form-textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: var(--transition);
}

.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea:focus {
    border-color: #A855F7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* Upload Area */
.form-upload-area {
    border: 2px dashed rgba(139, 92, 246, 0.25);
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(139, 92, 246, 0.03);
    position: relative;
    overflow: hidden;
}

.form-upload-area:hover {
    border-color: rgba(139, 92, 246, 0.5);
    background: rgba(139, 92, 246, 0.06);
}

.form-upload-area.drag-over {
    border-color: #A855F7;
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.upload-content svg {
    color: rgba(139, 92, 246, 0.5);
}

.upload-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.upload-preview {
    position: relative;
    display: inline-block;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 10px;
    object-fit: contain;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #EF4444;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    transition: var(--transition);
}

.preview-remove:hover {
    transform: scale(1.1);
}

/* Toggle Button Group */
.form-toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toggle-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.toggle-btn:hover {
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.06);
}

.toggle-btn.active {
    border-color: #A855F7;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(168, 85, 247, 0.1));
    color: #C084FC;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15), inset 0 0 10px rgba(139, 92, 246, 0.05);
}

/* Submit Button */
.form-submit-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #7C3AED, #A855F7, #EC4899);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.35);
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.form-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.form-submit-btn:hover::before {
    left: 100%;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(139, 92, 246, 0.45);
}

.form-submit-btn:active {
    transform: translateY(0);
}

/* Form responsive */
@media (max-width: 600px) {
    .form-page {
        border-radius: 18px;
    }

    .form-header {
        padding: 32px 20px 20px;
    }

    .form-body {
        padding: 20px;
    }

    .toggle-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ===== Invite Card Options ===== */
.style-card-option input:checked+.style-card-content {
    border-color: #A855F7 !important;
    background-color: rgba(168, 85, 247, 0.05);
}

.style-card-option input:checked+.style-card-content .radio-indicator {
    border-color: #A855F7 !important;
}

.style-card-option input:not(:checked)+.style-card-content .radio-dot {
    display: none !important;
}

.style-card-option input:checked+.style-card-content .radio-dot {
    display: block !important;
}