/* Pulse AI - Django AI's Telegram Extension */
/* Dark theme inspired by VIP Hub */

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

:root {
    --bg: #0b0f19;
    --surface: #121826;
    --surface-2: #1b2233;
    --text: #e5e7eb;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-2: #8b5cf6;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --border: #1f2937;
    --card: #111827;
    --success: #22c55e;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 48px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Language Selector */
.lang-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    gap: 4px;
    background: var(--surface);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.lang-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text);
}

.lang-btn.active {
    background: var(--accent);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--accent);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-pulse {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--surface-2);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
}

.hero-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Demo Window */
.demo-window {
    max-width: 480px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid var(--border);
}

.demo-header {
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
}

.demo-dot:first-child { background: #ef4444; opacity: 1; }
.demo-dot:nth-child(2) { background: #f59e0b; opacity: 1; }
.demo-dot:nth-child(3) { background: #22c55e; opacity: 1; }

.demo-title {
    margin-left: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.demo-content {
    padding: 20px;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    min-height: 280px;
}

.chat-message {
    margin-bottom: 12px;
    display: flex;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.bot {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.user .message-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.bot .message-bubble {
    background: var(--surface-2);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

/* Features Section */
.features {
    padding: 100px 0;
    background: var(--surface);
}

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

.feature-card {
    background: var(--card);
    padding: 32px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15);
}

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: var(--bg);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    padding: 32px;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    min-width: 200px;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--accent);
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background: var(--surface);
}

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

.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.pricing-card.featured {
    border-color: var(--accent);
    border-width: 2px;
    background: linear-gradient(180deg, var(--card) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 6px 20px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text);
}

.price {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 24px;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

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

.pricing-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text);
}

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

.pricing-features li.disabled {
    color: var(--text-muted);
    opacity: 0.6;
}

.pricing-card .btn {
    width: 100%;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: var(--bg);
}

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

.faq-item {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.faq-item h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Footer */
.footer {
    background: var(--card);
    color: var(--text-muted);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.footer-column h4 {
    color: var(--text);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
}

/* Mobile First - Base styles are mobile */

/* Tablet and up */
@media (min-width: 768px) {
    .hero {
        padding: 180px 0 120px;
    }

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

    .section-title {
        font-size: 2.5rem;
    }

    .features, .how-it-works, .pricing, .faq, .cta {
        padding: 100px 0;
    }
}

/* Mobile specific overrides */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }

    .lang-selector {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        z-index: 300;
    }

    .nav-container {
        padding: 12px 16px;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

    .nav-links .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .hero-title {
        font-size: 1.875rem;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .hero-cta {
        margin-bottom: 40px;
    }

    .hero-cta .btn-lg {
        width: 100%;
        max-width: 280px;
    }

    .demo-window {
        margin: 0 -8px;
        border-radius: 12px;
    }

    .demo-content {
        padding: 16px;
        min-height: 220px;
    }

    .message-bubble {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .features, .how-it-works, .pricing, .faq, .cta {
        padding: 60px 0;
    }

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

    .feature-card {
        padding: 24px;
    }

    .feature-icon {
        font-size: 2rem;
    }

    .feature-card h3 {
        font-size: 1.125rem;
    }

    .steps {
        flex-direction: column;
        gap: 16px;
    }

    .step {
        padding: 24px;
        min-width: unset;
        width: 100%;
    }

    .step-number {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .step-arrow {
        transform: rotate(90deg);
        font-size: 1.5rem;
    }

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

    .pricing-card {
        padding: 24px;
    }

    .price {
        font-size: 2.75rem;
    }

    .faq-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .faq-item {
        padding: 20px;
    }

    .cta h2 {
        font-size: 1.75rem;
    }

    .cta p {
        font-size: 1rem;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 32px;
    }

    .footer-brand {
        text-align: center;
    }

    .footer-brand .logo {
        justify-content: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 24px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }

    /* Touch-friendly tap targets */
    .btn, .lang-btn {
        min-height: 44px;
    }

    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Legal Pages */
.legal-content {
    padding: 140px 0 80px;
    min-height: 100vh;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--text);
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 48px;
}

.legal-section {
    margin-bottom: 40px;
}

.legal-section h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.legal-section h3 {
    font-size: 1.125rem;
    color: var(--text);
    margin: 20px 0 12px;
}

.legal-section p {
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.7;
}

.legal-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 16px;
}

.legal-section li {
    color: var(--text-muted);
    padding: 8px 0 8px 24px;
    position: relative;
    line-height: 1.6;
}

.legal-section li::before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 8px;
}

.legal-section a {
    color: var(--accent);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.legal-section strong {
    color: var(--text);
}

@media (max-width: 767px) {
    .legal-content {
        padding: 100px 0 60px;
    }

    .legal-content h1 {
        font-size: 1.75rem;
    }

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .legal-updated {
        margin-bottom: 32px;
    }
}

/* ============================================
   Signup Modal
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--text);
    background: var(--surface-2);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text);
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Signup Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}

.form-group input {
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-error {
    color: #ef4444;
    font-size: 0.8rem;
    display: none;
}

.turnstile-container {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-loading {
    display: inline-flex;
    align-items: center;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

/* Signup Success */
.signup-success {
    text-align: center;
    padding: 20px 0;
}

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

.signup-success h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text);
}

.signup-success p {
    color: var(--text-muted);
    margin-bottom: 8px;
}

.signup-success strong {
    color: var(--accent);
}

.success-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
}

@media (max-width: 480px) {
    .modal-content {
        padding: 24px;
        margin: 10px;
    }

    .modal-header h2 {
        font-size: 1.25rem;
    }
}
