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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Navigation */
.navbar {
    background: white;
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
}

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

.nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3b82f6;
}

.nav-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.hero-guarantee {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 500px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 32px;
    opacity: 0.9;
}

.hero-benefits {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.hero-benefits span {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.9;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.primary-cta {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1e3a8a;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 18px 36px;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.primary-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.secondary-cta {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secondary-cta:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.hero-guarantee {
    font-size: 14px;
    opacity: 0.8;
    font-weight: 500;
}

/* Transformation Section */
.transformation-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.transformation-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: #2d3748;
}

.transformation-section .section-intro {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 60px;
    color: #4a5568;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.transformation-showcase {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.transformation-scene {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.transformation-scene:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.transformation-scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 20px 20px 0 0;
}

.transformation-scene.before::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.transformation-scene.after::before {
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
}

.scene-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.transformation-scene h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: #2d3748;
}

.scene-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #4a5568;
    font-style: italic;
}

.scene-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scene-details span {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.transformation-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.arrow-line {
    width: 2px;
    height: 60px;
    background: linear-gradient(180deg, #ff6b6b, #4ecdc4);
    border-radius: 1px;
}

.arrow-head {
    font-size: 24px;
    color: #4ecdc4;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.transformation-cta {
    text-align: center;
    margin-top: 60px;
}

.transformation-quote {
    font-size: 1.25rem;
    font-style: italic;
    color: #4a5568;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* How It Works Section */
.how-it-works-section {
    padding: 80px 0;
    background: white;
    /* Essential visibility */
    display: block;
    visibility: visible;
    opacity: 1;
    min-height: 200px;
}

.how-it-works-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: #2d3748;
}

.how-it-works-section .section-intro {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 60px;
    color: #4a5568;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.step-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.step-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 24px;
    flex-shrink: 0;
}

.step-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
}

.step-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4a5568;
}

/* Pricing Section */
.pricing-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.pricing-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: #2d3748;
}

.pricing-section .section-intro {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 60px;
    color: #4a5568;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.pricing-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.pricing-card.featured {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 8px;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
}

.pricing-header p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 32px;
}

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

.pricing-features li {
    padding: 8px 0;
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.pricing-cta {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pricing-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.pricing-cta.featured {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.pricing-cta.featured:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.pricing-note {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.pricing-note p {
    font-size: 1rem;
    color: #718096;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

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

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.primary-cta.large {
    padding: 20px 40px;
    font-size: 20px;
}

.cta-note {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 24px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-ctas {
        justify-content: center;
    }
    
    .transformation-showcase {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .transformation-arrow {
        display: none;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .primary-cta, .secondary-cta {
        padding: 14px 24px;
        font-size: 16px;
    }
    
    .transformation-section,
    .how-it-works-section,
    .pricing-section,
    .cta-section {
        padding: 60px 0;
    }
    
    .transformation-scene,
    .step-card,
    .pricing-card {
        padding: 30px 20px;
    }
}

/* AI Understanding Section */
.ai-understanding-section {
    padding: 80px 0;
    background: white;
}

.ai-understanding-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.understanding-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 48px;
}

.understanding-card {
    background: #f8fafc;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.understanding-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.understanding-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.understanding-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.understanding-list {
    list-style: none;
    padding: 0;
}

.understanding-list li {
    padding: 8px 0;
    color: #374151;
    font-weight: 500;
    position: relative;
    padding-left: 20px;
}

.understanding-list li::before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Social Proof Section */
.social-proof-section {
    padding: 80px 0;
    background: #f9fafb;
}

.social-proof-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 48px;
    font-style: italic;
}

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

.testimonial-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.testimonial-content p {
    font-size: 1.1rem;
    color: #374151;
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    font-size: 2rem;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.author-title {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Top bar */
.top-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
}

/* Main container */
.conversation-journal {
    flex: 1;
    padding: 24px 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto !important;
    scroll-behavior: smooth;
    position: relative;
    max-height: calc(100vh - 100px);
    min-height: 400px;
}

/* Welcome state */
.welcome-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 20px;
}

.welcome-mic {
    width: 100px;
    height: 100px;
    border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.welcome-subtitle {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 32px;
    max-width: 400px;
}

.start-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.start-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

/* Conversation journal */
.getting-started {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin: 20px 0;
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.getting-started h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.tip-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tip-icon {
    font-size: 1.2rem;
}

.tip-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.tip-description {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.topic-ideas {
    margin-top: 16px;
}

.topic-ideas h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topic-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.topic-tag {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: auto;
}

.topic-tag:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
}

.topic-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.topic-example {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
}

.manual-start {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.manual-start p {
    font-size: 0.9rem;
    color: #64748b;
}

.back-button {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: none;
}

.back-button:hover {
    background: #f1f5f9;
    color: #1d4ed8;
}

.back-button.show {
    display: block;
}

/* Enhanced Message Styling */
.message {
    margin-bottom: 24px;
    animation: slideInUp 0.3s ease-out;
    overflow: visible !important;
    position: relative;
    z-index: auto;
}

.message.user-message {
    margin-left: 10%;
}

.message.user-message .message-content {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: 16px 16px 4px 16px;
    padding: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    overflow: visible !important;
}

.message.user-message .message-content::before {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 0;
    height: 0;
    border-left: 12px solid #93c5fd;
    border-top: 12px solid transparent;
}

.message.user-message strong {
    color: #1e40af;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.message.warm-message {
    margin-right: 10%;
}

.message.warm-message .message-content {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px solid #e5e7eb;
    border-radius: 16px 16px 16px 4px;
    padding: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible !important;
}

/* Desktop: Make messages less wide while keeping alignment */
@media (min-width: 768px) {
    .message.user-message {
        margin-left: auto;
        margin-right: 0;
        max-width: 500px;
        width: 100%;
    }
    
    .message.warm-message {
        margin-left: 0;
        margin-right: auto;
        max-width: 500px;
        width: 100%;
    }
}

.message.warm-message .message-content::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 0;
    height: 0;
    border-right: 12px solid #e5e7eb;
    border-top: 12px solid transparent;
}

.message.warm-message strong {
    color: #374151;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message.warm-message strong::before {
    content: '🤖';
    font-size: 1rem;
}

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

/* Speed Controls - FIXED for both desktop and mobile */
.unified-speed-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1;
    isolation: isolate;
}

.unified-speed-controls.expanded::before {
    content: '';
    position: fixed;
    top: 60px; /* Below header */
    left: 0;
    right: 0;
    bottom: 120px; /* Above footer/mic area */
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483646;
    pointer-events: auto;
    backdrop-filter: blur(4px);
}

.unified-speed-controls.expanded {
    z-index: 1000 !important;
    position: relative;
    isolation: isolate;
}

.speed-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    justify-content: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.speed-toggle-btn:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.speed-toggle-btn .chevron {
    transition: transform 0.2s ease;
    font-size: 0.7rem;
    margin-left: 4px;
}

.speed-toggle-btn.expanded .chevron {
    transform: rotate(180deg);
}

/* Speed Dropdown - FIXED positioning */
.speed-buttons {
    display: none;
    position: fixed;
    z-index: 2147483647 !important;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    min-width: 140px;
    max-width: 140px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.unified-speed-controls.expanded .speed-buttons {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.unified-speed-btn {
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap;
    width: 100%;
    margin-bottom: 2px;
}

.unified-speed-btn:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #374151;
    transform: translateX(4px);
}

.unified-speed-btn.active {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.speed-dropdown-open .audio-controls-inner:not(.current-dropdown-container .audio-controls-inner) {
    pointer-events: none !important;
    filter: brightness(0.95) !important;
}

body.speed-dropdown-open .current-dropdown-container .audio-controls-inner {
    z-index: 999998 !important;
    position: relative !important;
}

/* Play Button */
.unified-play-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

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

.unified-play-btn.loading {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    cursor: not-allowed;
}

.unified-play-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.unified-play-btn:hover::before {
    left: 100%;
}

.unified-play-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.unified-play-btn.playing {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.9; 
        transform: scale(1.02);
    }
}

/* Audio controls container - FIXED overflow */
.audio-controls.unified-style {
    margin: 16px 0;
    padding: 0;
    overflow: visible !important;
    position: relative;
    z-index: 1;
}

.audio-controls-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: visible !important;
}

/* Feedback sections */
.feedback-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    overflow: visible !important;
    position: relative;
    z-index: auto;
}

.feedback-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.feedback-section p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.feedback-section p strong {
    color: #1e40af;
    font-weight: 600;
}

/* Enhanced Cantonese Display */
.feedback-cantonese-block {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: visible !important;
    z-index: 1;
}

.feedback-cantonese-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 12px 12px 0 0;
}

.cantonese-response-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    position: relative;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: visible !important;
    z-index: 1;
}

.cantonese-response-box:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

/* Force all containers to not interfere */
.feedback-cantonese-block,
.cantonese-response-box,
.audio-controls,
.audio-controls-inner,
.message,
.message-content,
.feedback-section {
    overflow: visible !important;
    transform: none !important;
    contain: none !important;
    position: relative;
    z-index: auto;
}

.family-response-header {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 12px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.cantonese-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.pronunciation-text {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 400;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 16px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    opacity: 0.8;
}

.meaning-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 16px;
    font-style: italic;
}

.cantonese-word {
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.cantonese-word:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.pronunciation-word {
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.pronunciation-word:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

/* Highlight effects */
.cantonese-word.highlighted,
.pronunciation-word.highlighted {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Mic button area */
.mic-area {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, white 0%, rgba(255, 255, 255, 0.95) 70%, transparent 100%);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 100;
}

.mic-button {
    width: 80px;
    height: 80px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    pointer-events: all;
    position: relative;
    z-index: 100;
}

.mic-button.pulse {
    animation: gentlePulse 2s infinite;
}

.mic-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mic-hint {
    color: #9ca3af;
    font-size: 0.85rem;
    text-align: center;
}

.mic-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.mic-button.recording {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: recordingPulse 2s infinite;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.05);
    }
}

/* Floating Text Input */
.text-input-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    z-index: 200;
}

.text-input-wrapper {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    align-items: center;
    gap: 8px;
    max-width: 300px;
}

.text-input-container.active .text-input-wrapper {
    display: flex;
}

.floating-text-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
    min-width: 200px;
}

.send-text-button {
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-text-button:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.toggle-input-mode {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #6b7280;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toggle-input-mode:hover {
    background: white;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.text-input-container.active .toggle-input-mode {
    background: #3b82f6;
    color: white;
}

/* Keyboard toggle for mobile */
.keyboard-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
}

.keyboard-button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.keyboard-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Simple feedback system */
.simple-feedback {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 300px;
}

.simple-feedback.show {
    opacity: 1;
    transform: translateX(0);
}

.simple-feedback.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.simple-feedback.success {
    border-left: 3px solid #10b981;
    color: #059669;
}

.simple-feedback.error {
    border-left: 3px solid #ef4444;
    color: #dc2626;
}

.simple-feedback.warning {
    border-left: 3px solid #f59e0b;
    color: #d97706;
}

.simple-feedback.info {
    border-left: 3px solid #3b82f6;
    color: #2563eb;
}

/* Recording indicator */
.recording-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
    min-width: 320px;
    max-width: 90vw;
}

.recording-indicator.show {
    opacity: 1;
}

.recording-indicator.fade-out {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
}

.recording-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
}

.status-pulse {
    animation: pulse 2s infinite;
}

.recording-timer {
    margin-left: auto;
    font-family: monospace;
    color: #059669;
    font-weight: bold;
}

.transcription-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.transcription-text {
    flex: 1;
    color: #374151;
    font-style: italic;
    /* Ensure visibility */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.transcription-status {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.recording-hint {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    margin-top: 8px;
}

/* Demo Play Button */
.demo-play-button {
    position: absolute !important;
    top: 20px !important;
    right: -80px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #ff0000 !important;
    border: 3px solid yellow !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    z-index: 9999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    animation: playPulse 2s infinite;
}

.demo-play-button:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.demo-play-button.playing {
    background: #ef4444;
    animation: playingPulse 1s infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes playingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Word Highlighting - Match app style */
.cantonese-word {
    display: inline;
    transition: all 0.2s ease;
    background: transparent;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 500;
}

.cantonese-word.highlighted {
    background: #fff3cd !important;
    color: #856404 !important;
}

.pronunciation-word {
    display: inline;
    transition: all 0.2s ease;
}

.pronunciation-word.highlighted {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
}

/* Hidden state */
.hidden {
    display: none !important;
}

/* Desktop specific */
@media (min-width: 769px) {
    .conversation-journal {
        padding-bottom: 150px; /* Increased bottom padding for desktop */
        max-width: 700px; /* Match top bar width for consistency */
        margin: 0 auto; /* Center the journal */
    }
    
    .keyboard-toggle {
        display: none;
    }
    
    .text-input-container {
        bottom: 130px;
        right: 16px;
    }
    
    .text-input-wrapper {
        max-width: calc(100vw - 100px);
    }
    
    .floating-text-input {
        min-width: 150px;
    }

    .unified-speed-controls.expanded {
        background: none !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .unified-speed-controls.expanded .speed-buttons {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        margin-top: 8px !important;
        z-index: 1000 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* ADD this rule to prevent flash: */
    .speed-buttons {
        opacity: 0 !important;
        visibility: hidden !important;
        transition: none !important; /* Disable CSS transitions */
    }

    .unified-speed-controls.expanded::before,
    .unified-speed-controls.expanded::after {
        display: none !important;
        content: none !important;
    }

    /* Prevent any container effects */
    .feedback-cantonese-block,
    .cantonese-response-box,
    .audio-controls,
    .audio-controls-inner {
        opacity: 1 !important;
        filter: none !important;
        position: relative !important;
        z-index: auto !important;
    }
    
    /* Ensure dropdown positions correctly */
    .speed-buttons {
        position: absolute !important;
        z-index: 1000 !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 8px;
    }
    
    .top-bar-content {
        padding: 0 16px;
    }
    
    .conversation-journal {
        padding-bottom: 120px;
    }
    
    .family-response-header {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    
    .cantonese-text {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .pronunciation-text {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .meaning-text {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    
    .audio-controls-inner {
        padding: 10px 12px;
        gap: 8px;
    }

    .unified-speed-controls.expanded .speed-buttons {
        display: block !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 2147483647 !important;
        min-width: 200px;
        max-width: 280px;
        background: white !important;
        border-radius: 20px !important;
        padding: 20px !important; 
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
        visibility: visible !important;
        opacity: 1 !important;
        animation: modalFadeIn 0.15s ease-out !important;
        animation-fill-mode: both !important;
    }
    
    .unified-speed-controls.expanded {
        background: none !important;
        box-shadow: none !important;
    }

    .unified-speed-controls.expanded::before {
        content: '';
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 100px;
        background: rgba(0, 0, 0, 0.3);
        z-index: 2147483646;
        pointer-events: auto;
    }
    
    /* Better button spacing and sizing */
    .unified-speed-btn {
        padding: 18px 24px !important; /* Increased padding */
        font-size: 16px !important;
        border-radius: 12px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        width: 100%;
        text-align: center !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
        display: block !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .unified-speed-btn:last-child {
        margin-bottom: 0 !important;
    }
    
    .unified-speed-btn:hover,
    .unified-speed-btn:active {
        background: #f1f5f9 !important;
    }
    
    .unified-speed-btn.active {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
        color: white !important;
    }
    
    .mic-button {
        width: 72px;
        height: 72px;
        font-size: 1.8rem;
        z-index: 100;
    }
    
    .recording-indicator {
        min-width: 280px;
        padding: 16px;
        margin: 16px;
    }
    
    .simple-feedback {
        right: 16px;
        max-width: calc(100vw - 32px);
    }

    /* Mobile body state when dropdown is open */
    body.speed-dropdown-open {
        overflow: hidden;
    }
    
}

/* index.html styles */
/* Onboarding Page Styles - Scoped to prevent conflicts */

.onboarding-view {
    margin: 0 auto;
    padding: 10px 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.onboarding-view .app-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.25);
}

.onboarding-view h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.onboarding-view .subtitle {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 40px;
    line-height: 1.4;
}

.onboarding-view .example-section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.onboarding-view .example-title {
    font-size: 15px;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 16px;
    text-align: center;
}

.onboarding-view .chat-message {
    margin-bottom: 16px;
}

.onboarding-view .message-label {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.onboarding-view .message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.onboarding-view .user-bubble {
    background: #f1f5f9;
    color: #1e293b;
}

.onboarding-view .ai-bubble {
    background: #eff6ff;
    color: #1e293b;
}

.onboarding-view .cantonese-response {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
}

.onboarding-view .cantonese-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.onboarding-view .pronunciation {
    font-size: 12px;
    color: #64748b;
    font-family: 'SF Mono', Monaco, monospace;
    margin-bottom: 8px;
}

.onboarding-view .meaning {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    margin-bottom: 12px;
}

.onboarding-view .audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.onboarding-view .play-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.onboarding-view .speed-control {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #475569;
}

.onboarding-view .steps-section {
    margin-bottom: 32px;
}

.onboarding-view .step {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    text-align: left;
}

.onboarding-view .step:last-child {
    margin-bottom: 0;
}

.onboarding-view .step-number {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    margin-right: 16px;
    flex-shrink: 0;
}

.onboarding-view .step-text {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.onboarding-view .start-button {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-bottom: 16px;
}

.onboarding-view .start-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.onboarding-view .privacy-note {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.onboarding-view .privacy-highlight {
    color: #3b82f6;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .onboarding-view h1 {
        font-size: 24px;
    }
    
    .onboarding-view .subtitle {
        font-size: 15px;
    }
    
    .onboarding-view {
        padding: 10px 10px;
    }
}

/* Video Demo Section */
.video-demo {
    max-width: 600px;
    margin: 0 auto 24px;
    padding: 0 20px;
}

.video-placeholder {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #cbd5e1;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-placeholder:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
}

.video-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.video-placeholder h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.video-placeholder p {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.play-video-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.play-video-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

@media (max-width: 768px) {
    .video-placeholder {
        padding: 30px 16px;
    }
    
    .video-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .video-placeholder h3 {
        font-size: 1.1rem;
    }
    
    .video-placeholder p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    
    .play-video-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Demo GIF styling */
.demo-gif {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
}

/* When GIF is present, hide the placeholder elements */
.video-placeholder.has-gif .video-icon,
.video-placeholder.has-gif .play-video-btn {
    display: none;
}

.video-placeholder.has-gif h3 {
    margin-bottom: 8px;
}

.video-placeholder.has-gif p {
    margin-bottom: 0;
}

/* Onboarding System */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.onboarding-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

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

.onboarding-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.onboarding-content p {
    font-size: 1.1rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 32px;
}

.onboarding-progress {
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.onboarding-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.onboarding-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.onboarding-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    color: white;
}

.onboarding-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.onboarding-btn.secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.onboarding-btn.secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Achievement Notifications */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    z-index: 1001;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.achievement-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.achievement-content p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Progress Dashboard */
.progress-dashboard {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.progress-stat {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
}

.progress-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 4px;
}

.progress-stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

.progress-achievements {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.achievement-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.achievement-badge.earned {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Responsive Design for Onboarding */
@media (max-width: 768px) {
    .onboarding-modal {
        padding: 24px;
        margin: 20px;
    }
    
    .onboarding-content h2 {
        font-size: 1.5rem;
    }
    
    .onboarding-content p {
        font-size: 1rem;
    }
    
    .onboarding-actions {
        flex-direction: column;
    }
    
    .achievement-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Demo Showcase Styles */
.demo-showcase {
    max-width: 900px;
    margin: 0 auto 40px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.demo-step {
    display: none;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 800px;
    margin: 0 auto;
}

.demo-step.active {
    display: block !important;
    animation: fadeInUp 0.5s ease;
}

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

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.demo-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Recording Indicator */
.recording-indicator {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #3b82f6;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}

.status-icon {
    font-size: 18px;
    animation: pulse 2s infinite;
}

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

.recording-timer {
    margin-left: auto;
    font-family: monospace;
    font-size: 14px;
}

.transcription-preview {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.transcription-text {
    font-size: 1.1rem;
    color: #1e293b;
    line-height: 1.6;
    min-height: 24px;
}

/* Cantonese Response Box */
.cantonese-response-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.family-response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1rem;
}

.cantonese-text {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 16px;
    line-height: 1.6;
    min-height: 32px;
}

.pronunciation-text {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 16px;
    font-style: italic;
    line-height: 1.5;
    min-height: 24px;
}

.meaning-text {
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    min-height: 20px;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Word Highlighting Demo */
.word-highlighting-demo {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

.highlighting-text {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 40px;
}

.cantonese-word {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.cantonese-word:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cantonese-word {
    background: #3b82f6;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: inline-block;
    margin: 2px;
}

.cantonese-word:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cantonese-word.highlighted {
    background: #10b981;
    animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.hover-hint {
    font-size: 12px;
    color: #64748b;
    font-style: italic;
}



/* Responsive Design */
@media (max-width: 768px) {
    .demo-step {
        padding: 24px;
    }
    
    .step-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .demo-navigation {
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Demo Steps */
.demo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
    /* Essential visibility */
    min-height: 100px;
}

.demo-step {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    /* Essential visibility */
    display: block;
    visibility: visible;
    opacity: 1;
    min-height: 50px;
}

.demo-step:hover {
    border-color: #3b82f6;
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.1);
}



/* Phone Mockup Styles */
.phone-mockup {
    background: #1e293b;
    border-radius: 28px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid #334155;
    position: relative;
    max-width: 300px;
    margin: 0 auto;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: #475569;
    border-radius: 2px;
}

.chat-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
    border-radius: 18px;
    padding: 14px;
    min-height: 280px;
}

.chat-message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.chat-message.user {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-message.ai {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
}

.message-pronunciation {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-style: italic;
}

.message-meaning {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-style: italic;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Unified Demo Container */
.unified-demo-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.demo-chat {
    background: #f8fafc;
    border-radius: 20px;
    padding: 24px;
    min-height: 300px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.demo-phase {
    margin-bottom: 20px;
}

/* Chat Messages */
.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    margin-bottom: 12px;
    position: relative;
}

.chat-message.user {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 6px;
    margin-left: auto;
}

.chat-message.ai {
    align-self: flex-start;
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
    margin-right: auto;
}

.message-text {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 4px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    text-align: right;
}



/* AI Response Text */
.cantonese-text {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.6;
}

.pronunciation-text {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    margin-bottom: 6px;
    line-height: 1.4;
}

.meaning-text {
    font-size: 0.85rem;
    color: #64748b;
    font-style: italic;
    line-height: 1.4;
}

/* Word Highlighting */
.cantonese-word {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.cantonese-word:hover {
    background: #3b82f6;
    color: white;
}

.cantonese-word.highlighted {
    background: #3b82f6;
    color: white;
    animation: highlightPulse 1s ease;
}

@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}



/* Unified Demo Container */
.unified-demo-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
}

.demo-caption {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 20px;
    min-height: 30px;
    transition: opacity 0.3s ease;
}

/* Demo Recording Indicator */
.demo-recording-indicator {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 90vw;
    margin: 0 auto;
}

.recording-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recording-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
}

.status-pulse {
    animation: pulse 2s infinite;
}

.recording-timer {
    margin-left: auto;
    font-family: monospace;
    color: #059669;
    font-weight: bold;
}

.transcription-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.transcription-text {
    flex: 1;
    color: #374151;
    font-style: italic;
    /* Ensure visibility */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.transcription-status {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.recording-hint {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 12px;
    margin-top: 8px;
}

/* Demo Play Button */
.demo-play-button {
    position: absolute !important;
    top: 20px !important;
    right: -80px !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #ff0000 !important;
    border: 3px solid yellow !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    z-index: 9999 !important;
    visibility: visible !important;
    opacity: 1 !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    animation: playPulse 2s infinite;
}

.demo-play-button:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.demo-play-button.playing {
    background: #ef4444;
    animation: playingPulse 1s infinite;
}

@keyframes playPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes playingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Word Highlighting - Match app style */
.cantonese-word {
    display: inline;
    transition: all 0.2s ease;
    background: transparent;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 500;
}

.cantonese-word.highlighted {
    background: #fff3cd !important;
    color: #856404 !important;
}

.pronunciation-word {
    display: inline;
    transition: all 0.2s ease;
}

.pronunciation-word.highlighted {
    background: #d1ecf1 !important;
    color: #0c5460 !important;
}