/* Demo Page Styles */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent-blue: #0ea5e9;
    --accent-blue-light: #38bdf8;
    --accent-green: #22c55e;
    --accent-purple: #a855f7;
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 60px rgba(14, 165, 233, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

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

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

.logo-icon svg {
    width: 100%;
    height: 100%;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-glow-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    bottom: -100px;
    right: -100px;
}

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

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 100px;
    color: var(--accent-blue-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.demo-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Demo Selection Cards */
.demo-selection {
    padding: 40px 0 80px;
}

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

.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.demo-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.demo-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.demo-card:hover::before {
    opacity: 1;
}

.demo-card.active {
    border-color: var(--accent-blue);
    background: rgba(14, 165, 233, 0.05);
}

.demo-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.demo-card-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.demo-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.demo-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.demo-duration {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Demo Player Section */
.demo-player-section {
    padding: 0 0 100px;
}

.demo-player-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* iPhone Mockup */
.iphone-mockup {
    position: relative;
    display: flex;
    justify-content: center;
}

.iphone-frame {
    width: 320px;
    height: 660px;
    background: #1c1c1e;
    border-radius: 50px;
    padding: 12px;
    position: relative;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.dynamic-island {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 34px;
    background: #000;
    border-radius: 20px;
    z-index: 10;
}

.iphone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1a1a24 0%, #0f0f15 100%);
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.iphone-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* App Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 60px 20px 16px;
    border-bottom: 1px solid var(--border-color);
}

.app-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    border-radius: 8px;
}

.app-title {
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    margin-left: 10px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-green);
    text-transform: uppercase;
}

.status-badge.listening {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
    color: var(--accent-blue-light);
}

.status-badge.speaking {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.3);
    color: var(--accent-purple);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.status-badge.listening .status-dot,
.status-badge.speaking .status-dot {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Chat Container */
.chat-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Dark scrollbar for chat container */
.chat-container::-webkit-scrollbar {
    width: 6px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}

.chat-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: messageIn 0.3s ease;
}

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

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-message.assistant.speaking {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.chat-message .speaker-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.7;
}

/* Voice Indicator */
.voice-indicator {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.voice-indicator.active {
    display: flex;
}

.voice-waves {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
}

.voice-waves span {
    width: 4px;
    height: 20px;
    background: var(--accent-blue);
    border-radius: 2px;
    animation: wave 0.5s ease-in-out infinite;
}

.voice-waves span:nth-child(1) { animation-delay: 0s; }
.voice-waves span:nth-child(2) { animation-delay: 0.1s; }
.voice-waves span:nth-child(3) { animation-delay: 0.2s; }
.voice-waves span:nth-child(4) { animation-delay: 0.1s; }
.voice-waves span:nth-child(5) { animation-delay: 0s; }

@keyframes wave {
    0%, 100% { height: 20px; }
    50% { height: 35px; }
}

.voice-indicator.user-speaking .voice-waves span {
    background: var(--accent-blue);
}

.voice-indicator.assistant-speaking .voice-waves span {
    background: var(--accent-purple);
}

.speaking-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Home Indicator */
.home-indicator {
    width: 140px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    margin: 10px auto 8px;
}

/* Controls Panel */
.controls-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
}

.demo-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.demo-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.playback-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.control-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.control-btn:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

#restart-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-blue-light));
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Transcript Panel */
.transcript-panel h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.transcript-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.transcript-placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.transcript-entry {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.transcript-entry:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.transcript-entry .speaker {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.transcript-entry.user .speaker {
    color: var(--accent-blue-light);
}

.transcript-entry.assistant .speaker {
    color: var(--accent-purple);
}

.transcript-entry .text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 8px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.footer-social a {
    color: var(--text-secondary);
    transition: color 0.2s, transform 0.2s;
}

.footer-social a:hover {
    color: var(--accent-blue);
    transform: translateY(-2px);
}

.footer-social svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
    .demo-player-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .iphone-mockup {
        order: -1;
    }
}

@media (max-width: 600px) {
    .demo-hero h1 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .iphone-frame {
        width: 280px;
        height: 580px;
    }
}