/* MyPhoneGenie — Main Styles */
:root {
    --primary: #6C3CE1;
    --primary-dark: #5429C4;
    --primary-light: #8B5CF6;
    --accent: #F59E0B;
    --bg: #0F0F1A;
    --bg-card: #1A1A2E;
    --bg-card-hover: #222240;
    --text: #F1F1F6;
    --text-muted: #9CA3AF;
    --border: #2D2D4A;
    --success: #10B981;
    --radius: 12px;
    --radius-lg: 20px;
}

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

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

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

.hidden { display: none !important; }

/* =============================================
   HERO
   ============================================= */
.hero {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(180deg, #1a1035 0%, var(--bg) 100%);
}

.hero-badge {
    display: inline-block;
    background: rgba(108, 60, 225, 0.2);
    color: var(--primary-light);
    padding: 6px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(108, 60, 225, 0.3);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 30%, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 36px;
}

.hero-sub strong {
    color: var(--accent);
}

.hero-cta {
    margin-top: 8px;
}

/* =============================================
   LIVE DEMO SECTION — THE STAR
   ============================================= */
.live-demo-section {
    padding: 80px 0 60px;
    text-align: center;
    border-top: 2px solid var(--primary);
    background: linear-gradient(180deg, rgba(108, 60, 225, 0.06) 0%, var(--bg) 60%);
    position: relative;
}

.live-demo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.demo-header {
    margin-bottom: 36px;
}

.demo-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 40%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-instructions {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Primary Demo Button */
.demo-actions {
    margin-bottom: 24px;
}

.btn-demo-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--accent), #E08A00);
    color: #000;
    border: none;
    padding: 20px 44px;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    box-shadow: 0 6px 30px rgba(245, 158, 11, 0.35);
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-demo-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(245, 158, 11, 0.5);
}

.btn-demo-main:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    animation: none;
}

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

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 6px 30px rgba(245, 158, 11, 0.35); }
    50% { box-shadow: 0 6px 40px rgba(245, 158, 11, 0.55); }
}

.demo-hint {
    margin-top: 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Two-button demo layout */
.demo-actions-two {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    align-items: stretch;
}

.btn-demo-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 20px 36px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(108, 60, 225, 0.25);
}

.btn-demo-secondary .btn-icon {
    display: flex;
    align-items: center;
}

@media (max-width: 640px) {
    .demo-actions-two { flex-direction: column; align-items: center; }
    .btn-demo-secondary { padding: 16px 24px; font-size: 1rem; }
}

/* Demo Active Indicator */
.demo-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px 24px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 100px;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.demo-indicator-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.demo-indicator span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--success);
}

/* Chat Widget — appears after demo loads */
.chat-widget-wrapper {
    max-width: 640px;
    margin: 0 auto 32px;
}

.chat-widget-wrapper.chat-appear {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-widget {
    background: #12121F;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--primary);
    box-shadow: 0 8px 40px rgba(108, 60, 225, 0.2);
}

.chat-messages {
    height: 340px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.msg { display: flex; }
.msg.bot { justify-content: flex-start; }
.msg.user { justify-content: flex-end; }

.msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.msg.bot .msg-bubble {
    background: var(--bg-card);
    color: var(--text);
    border-bottom-left-radius: 4px;
}

.msg.user .msg-bubble {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.msg.bot .msg-bubble.typing {
    color: var(--text-muted);
    padding: 12px 20px;
}

/* Typing animation dots */
.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-row {
    display: flex;
    border-top: 1px solid var(--border);
}

.chat-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 16px 20px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.chat-input-row input::placeholder { color: #555; }

.chat-input-row button {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-input-row button:hover { background: var(--primary-dark); }

/* Voice buttons — mic and speaker */
.voice-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 12px;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

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

.mic-btn.recording {
    color: #EF4444;
    animation: mic-pulse 1s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { color: #EF4444; }
    50% { color: #FCA5A5; }
}

.speaker-btn.active { color: var(--success); }
.speaker-btn:not(.active) { color: var(--text-muted); opacity: 0.5; }

/* Loading Status */
.demo-status {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--primary-light);
    font-size: 0.95rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top: 2px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Phone Demo Box */
.phone-demo-box {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 520px;
    margin: 24px auto 32px;
    padding: 16px 24px;
    background: rgba(108, 60, 225, 0.08);
    border: 1px solid rgba(108, 60, 225, 0.25);
    border-radius: var(--radius);
    text-align: left;
}

.phone-demo-icon {
    color: var(--primary-light);
    flex-shrink: 0;
}

.phone-demo-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.phone-demo-text strong {
    color: var(--text);
}

.phone-number {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

.phone-number:hover {
    text-decoration: underline;
}

/* Secondary Options — URL input and industry picker */
.demo-secondary {
    max-width: 520px;
    margin: 0 auto;
    margin-top: 16px;
}

.secondary-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.secondary-divider::before,
.secondary-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.secondary-divider span {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.secondary-options {
    /* slightly dimmer to show secondary status */
}

.url-input-group {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.url-input-group:focus-within {
    border-color: var(--primary);
}

.url-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 14px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.url-input-group input::placeholder { color: #555; }

.url-options {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.url-options span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    color: var(--primary-light);
    border: 1px solid var(--primary);
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover { background: rgba(108, 60, 225, 0.1); }

.btn-lg { padding: 18px 40px; font-size: 1.15rem; }

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #E08A00);
    color: #000;
    border: none;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(245, 158, 11, 0.4); }
.btn-accent:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* =============================================
   HOW IT WORKS
   ============================================= */
.how-it-works {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.how-it-works h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 48px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.step {
    text-align: center;
    padding: 24px 16px;
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

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

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

/* =============================================
   PRICING
   ============================================= */
.pricing {
    padding: 80px 0;
    border-top: 1px solid var(--border);
}

.pricing .container {
    max-width: 1240px;
}

.pricing h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.pricing .section-sub {
    text-align: center;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.trial-note {
    text-align: center;
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: -16px;
    margin-bottom: 12px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
    max-width: 1200px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px;
    text-align: center;
    position: relative;
    transition: border-color 0.2s, transform 0.2s;
}

.price-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.price-card.featured:hover {
    transform: scale(1.03) translateY(-4px);
}

.price-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(108, 60, 225, 0.12) 0%, var(--bg-card) 50%);
    transform: scale(1.03);
    box-shadow: 0 8px 32px rgba(108, 60, 225, 0.2);
}

.price-card.premium {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-card) 50%);
}

.price-card.premium h3 {
    color: var(--accent);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
}

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

.price-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 28px;
}

.price-card li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.price-card li::before {
    content: "\2713  ";
    color: var(--success);
    font-weight: 700;
}

.price-card .btn-primary {
    width: 100%;
}

/* =============================================
   INDUSTRIES
   ============================================= */
.industries {
    padding: 80px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.industries h2 {
    font-size: 1.8rem;
    margin-bottom: 32px;
}

.industry-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.industry-tags span {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: all 0.2s;
    cursor: default;
}

.industry-tags span:hover {
    border-color: var(--primary);
    color: var(--text);
}

.industry-tags span:last-child {
    background: rgba(108, 60, 225, 0.15);
    border-color: var(--primary);
    color: var(--primary-light);
    cursor: pointer;
}

/* =============================================
   FINAL CTA
   ============================================= */
.final-cta {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, #1a1035 100%);
    border-top: 1px solid var(--border);
}

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

.final-cta p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 32px;
}

/* =============================================
   FOOTER
   ============================================= */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary-light);
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links {
    margin-top: 12px;
    margin-bottom: 4px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-parent {
    margin-top: 4px;
}

.footer-parent a {
    color: var(--primary-light);
    text-decoration: none;
}

/* =============================================
   INDUSTRY PICKER MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.hidden { display: none; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

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

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-align: center;
}

.modal-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 24px;
}

.industry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.industry-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 8px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.industry-btn:hover {
    border-color: var(--primary);
    color: var(--text);
    background: rgba(108, 60, 225, 0.1);
}

.industry-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.industry-btn.loading {
    border-color: var(--primary-light);
    color: var(--primary-light);
    opacity: 1;
}

/* =============================================
   INDUSTRY "OTHER" — Custom Input
   ============================================= */
.industry-btn-other {
    background: rgba(108, 60, 225, 0.15) !important;
    border-color: var(--primary) !important;
    color: var(--primary-light) !important;
}

.custom-industry-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.custom-industry-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-align: left;
}

.custom-industry-row {
    display: flex;
    gap: 0;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.custom-industry-row:focus-within {
    border-color: var(--primary);
}

.custom-industry-row input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}

.custom-industry-row input::placeholder { color: #555; }

.custom-industry-row .btn-primary {
    border-radius: 0;
    padding: 12px 20px;
}

.custom-industry-error {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #EF4444;
    text-align: left;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 640px; margin-left: auto; margin-right: auto; }
    .price-card.featured { transform: none; }
}

@media (max-width: 768px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
    .price-card.featured { transform: none; }
    .url-input-group { flex-direction: column; }
    .url-input-group .btn-primary { border-radius: 0; }
    .industry-grid { grid-template-columns: repeat(2, 1fr); }
    .btn-demo-main { padding: 18px 28px; font-size: 1.1rem; }
    .demo-header h2 { font-size: 1.6rem; }
    .chat-messages { height: 280px; }
}

@media (max-width: 480px) {
    .steps-grid { grid-template-columns: 1fr; }
    .hero { padding: 60px 0 40px; }
    .industry-grid { grid-template-columns: 1fr 1fr; }
    .modal-content { padding: 24px 16px; }
    .btn-demo-main { padding: 16px 20px; font-size: 1rem; }
    .chat-messages { height: 260px; }
}
