/* Demo Styles - Hyprland Desktop Simulation */

/* Standalone demo page styles */
.demo-page {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    min-height: 100vh;
}

.demo-header {
    text-align: center;
    padding: 6rem 2rem 2rem;
}

.demo-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.demo-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

.demo-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Inline demo adjustments for main page */
.demo .desktop-container {
    max-width: 1000px;
    margin: 0 auto;
}

.demo .scenario-selector {
    margin-bottom: 1.5rem;
}

.demo .demo-controls {
    margin-top: 1.5rem;
}

.demo .scenario-description {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* Scenario Selector */
.scenario-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.scenario-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scenario-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.scenario-btn.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #60a5fa;
}

.scenario-btn svg {
    width: 18px;
    height: 18px;
}

/* Desktop Container */
.desktop-container {
    background: #0f0f14;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hyprland-style Bar */
.desktop-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.8rem;
}

.bar-left {
    display: flex;
    gap: 0.5rem;
}

.workspace {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: #64748b;
    font-size: 0.75rem;
}

.workspace.active {
    background: #60a5fa;
    color: #0f172a;
}

.bar-center {
    color: #94a3b8;
}

.bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #64748b;
}

.bar-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

#recording-indicator {
    opacity: 0.5;
    transition: all 0.3s ease;
}

#recording-indicator.active {
    opacity: 1;
    color: #ef4444;
}

#recording-indicator.active .mic-icon {
    animation: pulse 1s ease-in-out infinite;
}

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

.mic-icon {
    width: 14px;
    height: 14px;
}

/* Desktop Area */
.desktop-area {
    position: relative;
    height: 500px;
    background:
        radial-gradient(circle at 20% 80%, rgba(96, 165, 250, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(167, 139, 250, 0.03) 0%, transparent 50%),
        #12121a;
    padding: 1.5rem;
}

/* Windows */
.window {
    position: absolute;
    background: #1e1e2e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.window.active {
    display: block;
    z-index: 10;
}

.window-header {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #181825;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.window-controls {
    display: flex;
    gap: 6px;
    margin-right: 0.75rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.close { background: #f38ba8; }
.control.minimize { background: #f9e2af; }
.control.maximize { background: #a6e3a1; }

.window-title-bar {
    font-size: 0.75rem;
    color: #6c7086;
}

.window-content {
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Agent Window */
.window-agent {
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
}

.terminal {
    background: #11111b;
    color: #cdd6f4;
    min-height: 380px;
}

.terminal-output {
    white-space: pre-wrap;
}

.line {
    margin-bottom: 0.25rem;
}

.prompt-user { color: #89b4fa; }
.prompt-dir { color: #a6e3a1; }
.claude-welcome { color: #f9e2af; font-weight: bold; }
.claude-info { color: #6c7086; }
.claude-prompt { margin-top: 1rem; }
.claude-you { color: #89b4fa; font-weight: bold; }

.cursor-line::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: #cdd6f4;
}

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

/* Editor Window */
.window-editor {
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
}

.editor {
    background: #fafafa;
    color: #1e1e1e;
}

.editor-toolbar {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1rem;
}

.toolbar-item {
    color: #666;
    font-size: 0.8rem;
}

.editor-content {
    min-height: 340px;
}

.editor-line {
    margin-bottom: 0.5rem;
}

.md-h1 { font-size: 1.5rem; font-weight: bold; color: #1a1a1a; }
.md-h2 { font-size: 1.2rem; font-weight: bold; color: #333; }
.editor-text { color: #1e1e1e; }

.editor-cursor {
    animation: blink 1s step-end infinite;
    color: #1e1e1e;
}

/* Vim Window */
.window-vim {
    top: 20px;
    left: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
}

.vim {
    background: #1e1e2e;
    color: #cdd6f4;
    display: flex;
    flex-direction: column;
    min-height: 380px;
}

.vim-lines {
    flex: 1;
}

.vim-line {
    display: flex;
}

.line-nr {
    width: 30px;
    color: #45475a;
    text-align: right;
    padding-right: 1rem;
    user-select: none;
}

.kw { color: #cba6f7; }
.fn { color: #89b4fa; }
.comment { color: #6c7086; font-style: italic; }
.string { color: #a6e3a1; }

.vim-cursor {
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #cdd6f4;
    animation: blink 1s step-end infinite;
}

.vim-statusline {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background: #313244;
    margin-top: auto;
    font-size: 0.8rem;
}

.vim-mode { color: #a6e3a1; }
.vim-file { color: #6c7086; }
.vim-pos { color: #6c7086; }

/* Notifications */
.notifications {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.notification {
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

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

.notification.hiding {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notification-icon.recording {
    color: #ef4444;
}

.notification-icon.transcribing {
    color: #f9e2af;
}

.notification-icon.success {
    color: #a6e3a1;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: #cdd6f4;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.notification-body {
    color: #6c7086;
    font-size: 0.8rem;
}

/* Hotkey Indicator */
.hotkey-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.key-visual {
    transition: transform 0.1s ease;
}

.key-visual.pressed {
    transform: scale(0.95);
}

.key-cap {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(180deg, #3a3a4a 0%, #2a2a3a 100%);
    border: 1px solid #4a4a5a;
    border-radius: 6px;
    color: #cdd6f4;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    box-shadow:
        0 2px 0 #1a1a2a,
        0 3px 3px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

.key-visual.pressed .key-cap {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #60a5fa;
    box-shadow:
        0 1px 0 #1a1a2a,
        0 0 10px rgba(96, 165, 250, 0.5);
}

#key-status {
    color: #6c7086;
    font-size: 0.85rem;
    min-width: 150px;
}

#key-status.recording {
    color: #ef4444;
}

#key-status.transcribing {
    color: #f9e2af;
}

/* Demo Controls */
.demo-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid #60a5fa;
    border-radius: 8px;
    color: #60a5fa;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: rgba(96, 165, 250, 0.3);
}

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

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

/* Scenario Description */
.scenario-description {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.scenario-description h3 {
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.scenario-description p {
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Demo Footer */
.demo-footer {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-size: 0.9rem;
}

.demo-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.demo-footer a:hover {
    text-decoration: underline;
}

/* Waveform Animation */
.waveform-indicator {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}

.wave-bar {
    width: 3px;
    background: #ef4444;
    border-radius: 2px;
    animation: wave 0.5s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }
.wave-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 5px; }
    50% { height: 18px; }
}

/* Responsive */
@media (max-width: 768px) {
    .demo-header {
        padding-top: 5rem;
    }

    .demo-header h1 {
        font-size: 1.8rem;
    }

    .desktop-area {
        height: 400px;
    }

    .scenario-selector {
        flex-direction: column;
        align-items: center;
    }

    .scenario-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}
