/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #1e1e1e;
    --bg-darker: #151515;
    --bg-light: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --accent-orange: #ff9800;
    --accent-blue: #4a9eff;
    --border-color: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Day Theme (6 AM - 6 PM PST) - White background, black text */
body.day-theme {
    --bg-dark: #f5f5f5;
    --bg-darker: #ffffff;
    --bg-light: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;
    --accent-orange: #ff9800;
    --accent-blue: #4a90e2;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-orange);
    letter-spacing: -0.5px;
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

body.day-theme .logo {
    color: #1a1a1a;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    padding: 100px 0 80px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--bg-darker);
}

.btn-primary:hover {
    background: #ffa726;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

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

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

.btn-large {
    padding: 18px 40px;
    font-size: 18px;
}

/* Hero Demo Window */
.hero-image {
    margin-top: 40px;
}

.app-window {
    background: #2d2d2d;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    max-width: 900px;
    margin: 0 auto;
}

body.day-theme .app-window {
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.window-header {
    background: #1e1e1e;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.day-theme .window-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.window-dots {
    display: flex;
    gap: 8px;
}

.window-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
}

.window-dots span:nth-child(1) { background: #ff5f56; }
.window-dots span:nth-child(2) { background: #ffbd2e; }
.window-dots span:nth-child(3) { background: #27c93f; }

.window-content {
    padding: 24px;
}

body.day-theme .window-content {
    background: #ffffff;
}

/* Chat Section */
.chat-section {
    margin-bottom: 20px;
    min-height: 280px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Custom scrollbar */
.chat-section::-webkit-scrollbar {
    width: 6px;
}

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

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

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

.ai-message, .user-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.user-message {
    flex-direction: row-reverse;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    max-width: 75%;
}

.user-message .message-content {
    background: rgba(74, 158, 255, 0.15);
    border: 1px solid rgba(74, 158, 255, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
}

.message-sender {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.message-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}

.user-message .message-text {
    color: var(--text-primary);
}

.message-time {
    font-size: 11px;
    color: var(--text-muted);
}

.user-message .message-time {
    text-align: right;
}

/* Input Section */
.input-section {
    position: relative;
    margin-bottom: 20px;
}

.input-section input {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px 50px 14px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

body.day-theme .input-section input {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: var(--text-primary);
}

.input-section input:focus {
    border-color: var(--accent-blue);
    background: #252525;
}

body.day-theme .input-section input:focus {
    background: #ffffff;
    border-color: var(--accent-blue);
}

.send-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: var(--accent-blue);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #5ba8ff;
    transform: translateY(-50%) scale(1.05);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    flex: 1;
    background: transparent;
    border: 1.5px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(74, 158, 255, 0.1);
    transform: translateY(-2px);
}

.more-btn {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.more-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Variations Section */
.variations-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.variation-card {
    background: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

body.day-theme .variation-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

.variation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s;
}

.variation-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

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

.variation-icon {
    font-size: 24px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.variation-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.variation-text {
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    min-height: 60px;
}

.variation-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

.variation-card:hover .variation-actions {
    opacity: 1;
}

.copy-btn, .replace-btn {
    flex: 1;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

body.day-theme .copy-btn {
    background: rgba(74, 144, 226, 0.1);
    color: var(--accent-blue);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.day-theme .copy-btn:hover {
    background: rgba(74, 144, 226, 0.2);
}

.replace-btn {
    background: var(--accent-orange);
    color: var(--bg-darker);
}

.replace-btn:hover {
    background: #ffa726;
}

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

.section-title {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--accent-orange);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px var(--shadow);
}

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

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.feature-card code {
    background: var(--bg-darker);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    color: var(--accent-orange);
}

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

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
}

.step:hover {
    border-color: var(--accent-orange);
    transform: scale(1.05);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-orange);
    color: var(--bg-darker);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 14px;
}

.step-arrow {
    color: var(--text-muted);
    font-size: 32px;
    flex-shrink: 0;
}

/* Download Section */
.download {
    padding: 100px 0;
    background: var(--bg-darker);
}

.download-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.download-info h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

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

.download-features {
    list-style: none;
}

.download-features li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 15px;
}

.download-actions {
    text-align: center;
}

.download-note {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 12px;
}

.requirements {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
}

.requirements h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--accent-orange);
}

.requirements ul {
    list-style: none;
    padding-left: 0;
}

.requirements li {
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}

.requirements li:before {
    content: "•";
    color: var(--accent-orange);
    position: absolute;
    left: 8px;
}

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

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

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: color 0.2s;
}

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

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

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }

    .section-title {
        font-size: 32px;
    }

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

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .nav {
        gap: 20px;
    }

    .nav a {
        font-size: 14px;
    }

    /* Demo Window Responsive */
    .variations-section {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .window-content {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .logo {
        font-size: 20px;
    }

    .window-content {
        padding: 12px;
    }

    .variation-text {
        min-height: auto;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--accent-orange);
    color: var(--bg-darker);
}


/* Forum Section */
.forum {
    padding: 100px 0;
    background: var(--bg-dark);
}

.forum-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 60px;
}

.forum-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.forum-threads {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    min-height: 400px;
}

.thread-item {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.2s;
    cursor: pointer;
}

.thread-item:hover {
    border-color: var(--accent-orange);
    transform: translateX(4px);
}

.thread-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.thread-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.thread-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.thread-content {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.thread-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.thread-author {
    font-size: 13px;
    color: var(--text-secondary);
}

.thread-time {
    font-size: 12px;
    color: var(--text-muted);
}

.forum-new-thread {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.forum-new-thread h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

#forum-form input,
#forum-form textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: all 0.2s;
}

#forum-form input:focus,
#forum-form textarea:focus {
    outline: none;
    border-color: var(--accent-orange);
    background: var(--bg-light);
}

#forum-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 12px;
    color: var(--text-muted);
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Download Stats */
.download-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-right: 8px;
}

.stat-value {
    color: var(--accent-orange);
    font-size: 24px;
    font-weight: 700;
}

/* Responsive Forum */
@media (max-width: 968px) {
    .forum-container {
        grid-template-columns: 1fr;
    }
    
    .forum-new-thread {
        position: static;
    }
}


/* ==========================================================================
   Hero Animated Demo Styles
   ========================================================================== */

/* Hero Demo Container */
.hero-demo {
    position: relative;
    display: flex;
    gap: 24px;
    margin-top: 40px;
    align-items: flex-start;
    max-height: 480px;
}

/* Text Editor (left side) */
.demo-text-editor {
    flex: 0 0 340px;
    background: #2d2d2d;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

body.day-theme .demo-text-editor {
    background: #ffffff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.demo-editor-bar {
    background: #1e1e1e;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

body.day-theme .demo-editor-bar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.demo-editor-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.demo-editor-body {
    padding: 14px;
}

.demo-email-header {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.demo-email-field {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.demo-field-label {
    color: var(--text-muted);
    margin-right: 6px;
}

.demo-email-content {
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-primary);
}

.demo-email-content p {
    margin-bottom: 8px;
}

/* Text Selection Animation */
.demo-text-selection {
    position: relative;
    border-radius: 2px;
    transition: all 0.3s ease;
    padding: 1px 2px;
    margin: -1px -2px;
}

.demo-text-selection.demo-text-selecting {
    background: rgba(74, 158, 255, 0.3);
}

.demo-text-selection.demo-text-selected {
    background: rgba(74, 158, 255, 0.3);
}

.demo-text-selection .demo-original-text {
    display: inline;
}

.demo-text-selection .demo-replacement-text {
    display: none;
}

.demo-text-selection.demo-text-replaced .demo-original-text {
    display: none !important;
}

.demo-text-selection.demo-text-replaced .demo-replacement-text {
    display: inline !important;
    color: #22c55e;
    font-weight: 500;
}

.demo-text-selection.demo-text-replaced {
    background: rgba(34, 197, 94, 0.25);
}

.demo-text-selection.demo-text-replaced::after {
    content: ' ✓';
    color: #22c55e;
    font-weight: bold;
    font-size: 14px;
}

@keyframes demo-select-text {
    0% { background: transparent; }
    100% { background: rgba(74, 158, 255, 0.3); }
}

/* Keyboard Indicator */
.demo-keyboard-indicator {
    position: absolute;
    top: 35%;
    left: 28%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body.day-theme .demo-keyboard-indicator {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
}

.demo-keyboard-indicator.demo-keyboard-visible {
    opacity: 1;
}

.demo-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: linear-gradient(180deg, #4a4a4a 0%, #3a3a3a 100%);
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 0 #222, inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

body.day-theme .demo-key {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid #d0d0d0;
    color: #333;
    box-shadow: 0 2px 0 #ccc, inset 0 1px 0 rgba(255,255,255,0.8);
}

.demo-key-plus {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 300;
}

.demo-keyboard-indicator.demo-keyboard-pressed .demo-key {
    transform: translateY(2px);
    box-shadow: 0 0 0 #222, inset 0 1px 0 rgba(255,255,255,0.1);
}

/* App Window in Demo */
.hero-demo .demo-app-window {
    flex: 1;
    max-width: 520px;
    opacity: 0;
    transform: scale(0.95) translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-demo .demo-app-window.demo-app-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Compact app window content */
.hero-demo .demo-app-window .window-content {
    padding: 12px;
}

.hero-demo .demo-app-window .chat-section {
    min-height: auto;
    max-height: 140px;
    margin-bottom: 10px;
}

.hero-demo .demo-app-window .ai-message,
.hero-demo .demo-app-window .user-message {
    margin-bottom: 8px;
}

.hero-demo .demo-app-window .message-text {
    font-size: 12px;
    line-height: 1.5;
}

.hero-demo .demo-app-window .input-section {
    margin-bottom: 10px;
}

.hero-demo .demo-app-window .input-section input {
    padding: 10px 40px 10px 12px;
    font-size: 12px;
}

.hero-demo .demo-app-window .quick-actions {
    margin-bottom: 12px;
    gap: 8px;
}

.hero-demo .demo-app-window .action-btn {
    padding: 8px 10px;
    font-size: 11px;
}

.hero-demo .demo-app-window .more-btn {
    padding: 8px 12px;
    font-size: 11px;
}

.hero-demo .demo-app-window .variations-section {
    gap: 8px;
}

.hero-demo .demo-app-window .variation-card {
    padding: 10px;
}

.hero-demo .demo-app-window .variation-text {
    font-size: 11px;
    min-height: 36px;
    margin-bottom: 8px;
}

.hero-demo .demo-app-window .variation-label {
    font-size: 9px;
    margin-bottom: 6px;
}

.hero-demo .demo-app-window .copy-btn,
.hero-demo .demo-app-window .replace-btn {
    padding: 4px 8px;
    font-size: 10px;
}

/* Animation states for chat elements */
.demo-ai-greeting,
.demo-ai-response {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-ai-greeting.demo-visible,
.demo-ai-response.demo-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Quick action animation */
.demo-quick-action.demo-button-highlighted {
    border-color: var(--accent-orange) !important;
    background: rgba(255, 152, 0, 0.15) !important;
    transform: scale(1.02);
}

.demo-quick-action.demo-button-pressed {
    transform: scale(0.98);
}

.demo-quick-action.demo-button-loading {
    position: relative;
    color: transparent !important;
}

.demo-quick-action.demo-button-loading svg {
    opacity: 0;
}

.demo-quick-action.demo-button-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid var(--accent-orange);
    border-top-color: transparent;
    border-radius: 50%;
    animation: demo-spin 0.6s linear infinite;
}

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

/* Variations animation */
.demo-variations .variation-card {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-variations.demo-variations-visible .variation-card {
    opacity: 1;
    transform: translateY(0);
}

.demo-variations.demo-variations-visible .demo-variation-1 { transition-delay: 0s; }
.demo-variations.demo-variations-visible .demo-variation-2 { transition-delay: 0.1s; }
.demo-variations.demo-variations-visible .demo-variation-3 { transition-delay: 0.2s; }

/* Replace button animation */
.demo-replace-btn.demo-button-highlighted {
    background: var(--accent-orange) !important;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.demo-replace-btn.demo-button-pressed {
    transform: scale(0.95);
}

/* Make variation actions visible when variations are shown */
.demo-variations.demo-variations-visible .variation-card .variation-actions {
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-demo {
        flex-direction: column;
        align-items: center;
        max-height: none;
    }
    
    .demo-text-editor {
        flex: none;
        width: 100%;
        max-width: 400px;
    }
    
    .hero-demo .demo-app-window {
        max-width: 100%;
        opacity: 1;
        transform: none;
    }
    
    .demo-keyboard-indicator {
        left: 50%;
    }
}
