/* ============================================
   AI Girlfriend Template - Styles
   ============================================ */

:root {
    /* Colors - Romantic/Modern palette */
    --primary: #ff4d6d;
    --primary-dark: #c9184a;
    --secondary: #9d4edd;
    --accent: #ff758f;
    --bg-dark: #10002b;
    --bg-card: #240046;
    --bg-light: #3c096c;
    --text-primary: #ffffff;
    --text-secondary: #b8b8d0;
    --text-muted: #8888a0;
    --success: #00d4aa;
    --warning: #ffd93d;

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 1200px;
    --section-padding: 80px;
    --card-radius: 16px;
    --btn-radius: 12px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 157, 0.5);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 18px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   Header
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-cta {
    padding: 10px 24px;
}

/* Language Switcher */
.lang-switch {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    max-height: 300px;
    overflow-y: auto;
}

.lang-switch:hover .lang-dropdown,
.lang-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: background var(--transition-fast);
}

.lang-option:hover {
    background: var(--bg-light);
}

.lang-option.active {
    background: var(--primary);
    color: white;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(155, 89, 182, 0.3) 0%, transparent 50%),
                radial-gradient(ellipse at 30% 70%, rgba(255, 107, 157, 0.2) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 30%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
}

.trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 14px;
    color: var(--text-secondary);
}

.hero-cta {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 20px rgba(255, 107, 157, 0.4); }
    50% { box-shadow: 0 4px 40px rgba(255, 107, 157, 0.6); }
}

/* Hero Visual - Avatar */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 350px;
    height: 350px;
}

.avatar-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.5;
    filter: blur(40px);
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.avatar-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    box-shadow: 0 0 60px rgba(255, 107, 157, 0.3);
}

.avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-pulse {
    position: absolute;
    inset: -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: avatar-pulse 2s ease-out infinite;
}

@keyframes avatar-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ============================================
   Section Titles
   ============================================ */

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 48px;
}

/* ============================================
   Chat Demo Section
   ============================================ */

.chat-demo-section {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
}

.chat-demo-wrapper {
    max-width: 500px;
    margin: 0 auto;
}

.chat-demo {
    position: relative;
    background: var(--bg-dark);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-info {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-weight: 600;
    font-size: 16px;
}

.chat-status {
    font-size: 13px;
    color: var(--success);
}

.chat-messages {
    padding: 20px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.4;
    animation: msg-appear 0.3s ease;
}

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

.chat-msg-ai {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg-user {
    background: var(--bg-light);
    color: var(--text-primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg-blur {
    filter: blur(4px);
    user-select: none;
}

.chat-blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(transparent, var(--bg-dark) 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 24px;
}

.chat-unlock {
    text-align: center;
}

.unlock-text {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
}

/* ============================================
   Characters Gallery
   ============================================ */

.characters-section {
    padding: var(--section-padding) 0;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.character-card {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.character-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.character-media {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: var(--bg-light);
}

.character-media img,
.character-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.character-video {
    /* Ensure video plays smoothly as GIF */
    pointer-events: none;
}

.character-card:hover .character-media img,
.character-card:hover .character-media video {
    transform: scale(1.05);
}

.character-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 2;
}

.character-card:hover .character-overlay {
    opacity: 1;
}

/* Video play indicator */
.character-media::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
}

.character-media:has(video)::after {
    opacity: 1;
    animation: video-pulse 2s ease-in-out infinite;
}

@keyframes video-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.character-info {
    padding: 20px;
}

.character-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.character-personality {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.character-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.characters-mobile-scroll {
    display: none;
}

/* ============================================
   Features Section
   ============================================ */

.features-section {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-dark);
    padding: 32px;
    border-radius: var(--card-radius);
    text-align: center;
    transition: transform var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   Pricing Section
   ============================================ */

.pricing-section {
    padding: var(--section-padding) 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--card-radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.pricing-popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.pricing-price {
    margin-bottom: 24px;
}

.price-amount {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-period {
    color: var(--text-muted);
    font-size: 14px;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.pricing-features li:last-child {
    border-bottom: none;
}

/* ============================================
   Testimonials Section
   ============================================ */

.testimonials-section {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-dark);
    padding: 28px;
    border-radius: var(--card-radius);
}

.testimonial-stars {
    margin-bottom: 12px;
}

.star {
    color: var(--warning);
    font-size: 18px;
}

.testimonial-text {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================
   FAQ Section
   ============================================ */

.faq-section {
    padding: var(--section-padding) 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border-radius: var(--card-radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-main);
}

.faq-icon {
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   SEO Content Section
   ============================================ */

.seo-content-section {
    padding: var(--section-padding) 0;
    background: var(--bg-card);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--text-primary);
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.seo-content ul, .seo-content ol {
    color: var(--text-secondary);
    margin: 16px 0;
    padding-left: 24px;
}

.seo-content li {
    margin-bottom: 8px;
}

.seo-content a {
    color: var(--primary);
    text-decoration: underline;
}

.seo-content a:hover {
    color: var(--accent);
}

/* ============================================
   Final CTA Section
   ============================================ */

.final-cta-section {
    padding: var(--section-padding) 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.final-cta-content {
    text-align: center;
}

.final-cta-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 24px;
}

.final-cta-section .btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.final-cta-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    padding: 40px 0;
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-logo {
    height: 32px;
    width: auto;
}

.footer-logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-disclaimer {
    color: var(--text-muted);
    font-size: 13px;
    max-width: 600px;
}

.footer-disclaimer p {
    margin-bottom: 8px;
}

/* ============================================
   Popup
   ============================================ */

.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.popup {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--card-radius);
    max-width: 420px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.popup-overlay.active .popup {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.popup-close:hover {
    background: var(--primary);
    color: white;
}

.popup-emoji {
    font-size: 64px;
    margin-bottom: 16px;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.popup-subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ============================================
   Sticky CTA (Mobile)
   ============================================ */

.sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 900;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-subtitle {
        margin: 0 auto 24px;
    }

    .trust-bar {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .avatar-container {
        width: 280px;
        height: 280px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .header-cta {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .avatar-container {
        width: 220px;
        height: 220px;
    }

    .characters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .character-card {
        font-size: 14px;
    }

    .character-name {
        font-size: 1rem;
    }

    .character-desc {
        display: none;
    }

    .pricing-popular {
        transform: none;
    }

    .sticky-cta {
        display: block;
    }

    body {
        padding-bottom: 80px;
    }

    .final-cta-section {
        padding-bottom: 100px;
    }
}

@media (max-width: 480px) {
    .characters-grid {
        grid-template-columns: 1fr;
    }

    .character-desc {
        display: block;
    }

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

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