/* ==========================================================================
   ScreenRecord.in - Design System
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties - Design Tokens
   ========================================================================== */

:root {
    /* Primary Accent - Purple */
    --primary: #5E6AD2;
    --primary-hover: #4F5CC4;
    --primary-active: #4048A8;
    --primary-subtle: rgba(94, 106, 210, 0.1);
    --primary-subtle-hover: rgba(94, 106, 210, 0.15);

    /* Semantic Colors - Muted & Accessible */
    --success: #46A758;
    --success-hover: #3D8F4A;
    --success-subtle: rgba(70, 167, 88, 0.1);
    --warning: #D69E2E;
    --warning-hover: #B58524;
    --warning-subtle: rgba(214, 158, 46, 0.1);
    --error: #E34850;
    --error-hover: #C73E47;
    --error-subtle: rgba(227, 72, 80, 0.1);
    --danger: #DC2626;
    --danger-hover: #B91C1C;
    --info: #3B82F6;
    --info-hover: #2563EB;
    --info-subtle: rgba(59, 130, 246, 0.1);

    /* Grayscale - Subtle & Layered */
    --gray-50: #FCFCFD;
    --gray-100: #F7F7F8;
    --gray-200: #EFF0F1;
    --gray-300: #E2E4E8;
    --gray-350: #D9DBE0;
    --gray-400: #C4C7CC;
    --gray-500: #9CA3AF;
    --gray-600: #6B7280;
    --gray-700: #4B5563;
    --gray-800: #374151;
    --gray-900: #1F2937;

    /* Backgrounds - Layered */
    --bg-default: #FFFFFF;
    --bg-elevated: #FFFFFF;
    --bg-subtle: #F7F7F8;
    --bg-muted: #EFF0F1;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-glass: rgba(255, 255, 255, 0.8);

    /* Text - Hierarchical */
    --text-default: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --text-placeholder: #C4C7CC;
    --text-disabled: #D1D5DB;

    /* Borders - Subtle */
    --border-light: #EFF0F1;
    --border-default: #E2E4E8;
    --border-strong: #C4C7CC;
    --border-focus: var(--primary);

    /* Shadows - Minimal */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.04), 0 4px 6px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.05), 0 10px 10px rgba(0, 0, 0, 0.02);
    --shadow-focus: 0 0 0 3px var(--primary-subtle);

    /* Border Radius - Moderate */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    /* Spacing - 4px Grid */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* Transitions - Spring Physics */
    --transition-fast: 100ms cubic-bezier(0.2, 0, 0, 1);
    --transition-base: 150ms cubic-bezier(0.2, 0, 0, 1);
    --transition-slow: 200ms cubic-bezier(0.2, 0, 0, 1);
    --transition-spring: 250ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    --text-xs: 0.75rem;
    --text-xs-caps: 0.6875rem;
    --text-sm: 0.8125rem;
    --text-sm-medium: 0.8125rem;
    --text-base: 0.9375rem;
    --text-base-medium: 0.9375rem;
    --text-lg: 1.0625rem;
    --text-xl: 1.1875rem;
    --text-2xl: 1.375rem;

    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;

    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.01em;

    --leading-tight: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.6;

    /* Icons */
    --icon-size-sm: 14px;
    --icon-size-base: 16px;
    --icon-size-lg: 20px;
    --icon-size-xl: 24px;
    --icon-stroke: 1.5px;
}

/* Dark Mode */
:root.dark {
    --primary: #8B9CF4;
    --primary-hover: #9CACF6;
    --primary-active: #7B8BD3;
    --primary-subtle: rgba(139, 156, 244, 0.15);
    --primary-subtle-hover: rgba(139, 156, 244, 0.2);

    --success: #5DD879;
    --success-hover: #6FE389;
    --success-subtle: rgba(93, 216, 121, 0.15);
    --warning: #E5B84B;
    --warning-hover: #ECC65C;
    --warning-subtle: rgba(229, 184, 75, 0.15);
    --error: #F26B6B;
    --error-hover: #F47C7C;
    --error-subtle: rgba(242, 107, 107, 0.15);
    --info: #6EB3F7;
    --info-hover: #7EC0F8;
    --info-subtle: rgba(110, 179, 247, 0.15);

    --gray-50: #2D3142;
    --gray-100: #353A50;
    --gray-200: #3D4459;
    --gray-300: #4A5166;
    --gray-350: #5A6278;
    --gray-400: #6B7280;
    --gray-500: #9CA3AF;
    --gray-600: #D1D5DB;
    --gray-700: #E5E7EB;
    --gray-800: #F3F4F6;
    --gray-900: #F9FAFB;

    --bg-default: #0F1117;
    --bg-elevated: #1A1D26;
    --bg-subtle: #1F2430;
    --bg-muted: #2A2F3D;
    --bg-overlay: rgba(0, 0, 0, 0.7);
    --bg-glass: rgba(15, 17, 23, 0.85);

    --text-default: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-tertiary: #6B7280;
    --text-placeholder: #4B5563;
    --text-disabled: #374151;

    --border-light: #1F2430;
    --border-default: #2D3142;
    --border-strong: #3D4459;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.5), 0 10px 10px rgba(0, 0, 0, 0.3);
    --shadow-focus: 0 0 0 3px var(--primary-subtle);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-default);
    background: var(--bg-default);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img, video {
    max-width: 100%;
    height: auto;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   Accessibility - Visually Hidden
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Hero Section - SEO Content
   ========================================================================== */

.hero-section {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    margin-bottom: var(--space-6);
}

.hero-content h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

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

.hero-video-wrapper {
    position: relative;
    display: inline-block;
    margin: var(--space-4) 0;
}

.hero-video {
    max-width: 400px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 2px var(--primary-subtle), 0 0 20px var(--primary-subtle);
    cursor: pointer;
    transition: box-shadow var(--transition-fast);
}

.hero-video:hover {
    box-shadow: 0 0 0 2px var(--primary), 0 0 30px var(--primary-subtle);
}

/* Video Tooltip */
.hero-video-wrapper::after {
    content: 'Single click to unmute • Double click for fullscreen';
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #000000;
    color: #FFFFFF;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-video-wrapper:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Features Section - SEO Content
   ========================================================================== */

.features-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
    margin-top: var(--space-6);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

.feature-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.feature-card:hover {
    border-color: var(--border-default);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.feature-card p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   How To Use Section - SEO Content
   ========================================================================== */

.howto-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
}

.howto-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.howto-steps {
    list-style: none;
    counter-reset: howto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.howto-steps li {
    counter-increment: howto;
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
}

.howto-steps li::before {
    content: counter(howto);
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
}

.howto-steps li strong {
    display: block;
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.howto-steps li p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   FAQ Section - SEO Content
   ========================================================================== */

.faq-section {
    padding: var(--space-6) 0;
    margin-bottom: var(--space-6);
}

.faq-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
}

.faq-item dt {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.faq-item dd {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ==========================================================================
   Focus States - Style
   ========================================================================== */

:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ==========================================================================
   App Header - Style
   ========================================================================== */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-4);
    background: var(--bg-default);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.85);
}

:root.dark .app-header {
    background: rgba(15, 17, 23, 0.85);
}

.app-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    color: var(--text-default);
}

.logo-icon {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.logo-text {
    font-size: var(--text-base-medium);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-tight);
}

.app-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.app-menu-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.app-menu-btn svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Command Menu - Style
   ========================================================================== */

.command-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    pointer-events: none;
}

.command-menu:not(.hidden) {
    pointer-events: auto;
}

.command-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.command-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: slideDown var(--transition-spring);
}

.command-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.command-search-icon {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.command-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--text-default);
    outline: none;
}

.command-input::placeholder {
    color: var(--text-placeholder);
}

.command-results {
    max-height: 320px;
    overflow-y: auto;
    padding: var(--space-2);
}

.command-group {
    padding: var(--space-1) 0;
}

.command-group-label {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs-caps);
    font-weight: var(--font-medium);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.command-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-default);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.command-item:hover,
.command-item.selected {
    background: var(--bg-subtle);
}

.command-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.command-item span:first-of-type {
    flex: 1;
}

.command-shortcut {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.command-footer {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--border-light);
    background: var(--bg-subtle);
}

.command-hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ==========================================================================
   Main Content
   ========================================================================== */

#main-content {
    display: flex;
    flex-direction: column;
    padding: var(--space-6) var(--space-4);
    max-width: 900px;
    margin: 0 auto;
}

/* ==========================================================================
   Recording Controls - Card Style
   ========================================================================== */

.recording-controls {
    background: var(--bg-default);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: 0 0 20px var(--primary-subtle), 0 0 40px var(--primary-subtle);
}

.controls-header {
    margin-bottom: var(--space-4);
}

.controls-title {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-1);
}

.controls-subtitle {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.config-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.config-card:hover {
    border-color: var(--border-default);
    background: var(--bg-default);
}

.config-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.config-input:checked + .config-icon {
    background: var(--primary-subtle);
    color: var(--primary);
}

.config-input:checked ~ .config-check {
    opacity: 1;
    transform: scale(1);
}

.config-input:checked ~ .config-content .config-title {
    color: var(--primary);
}

.config-card:has(.config-input:checked) {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.config-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.config-icon svg {
    width: 18px;
    height: 18px;
}

.config-content {
    flex: 1;
    min-width: 0;
}

.config-title {
    display: block;
    font-size: var(--text-sm-medium);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: 2px;
}

.config-desc {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.config-check {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: var(--radius-full);
    color: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all var(--transition-spring);
}

.config-check svg {
    width: 10px;
    height: 10px;
}

.config-summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.config-summary svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
}

/* Start Recording Button */
.btn-record {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-record:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-record:active:not(:disabled) {
    background: var(--primary-active);
}

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

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

.btn-record-shortcut {
    font-size: var(--text-xs);
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
}

/* Recording Action Buttons - Pause/Stop below start button */
.recording-action-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.btn-action-record {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action-record svg {
    width: 16px;
    height: 16px;
}

.btn-pause {
    background: var(--warning);
    color: white;
}

.btn-pause:hover {
    background: var(--warning-hover);
}

.btn-stop {
    background: var(--error);
    color: white;
}

.btn-stop:hover {
    background: var(--error-hover);
}

/* ==========================================================================
   Preview Area
   ========================================================================== */

.preview-area {
    margin-top: var(--space-4);
}

.preview-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-900);
    box-shadow: var(--shadow-md);
    width: 100%;
}

.preview-video {
    width: 100%;
    display: block;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recording-timer {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    width: fit-content;
}

.timer-dot {
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: var(--radius-full);
    animation: pulse 1.5s ease-in-out infinite;
}

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

.recording-controls-overlay {
    display: flex;
    gap: var(--space-2);
    pointer-events: auto;
    align-self: flex-end;
}

.btn-control {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.25);
}

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

.btn-stop {
    background: var(--error);
}

.btn-stop:hover {
    background: var(--error-hover);
}

.paused-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.paused-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--warning);
    color: white;
    border-radius: var(--radius-md);
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    animation: pulse 2s ease-in-out infinite;
}

.paused-badge svg {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   PiP Info
   ========================================================================== */

.pip-info {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--warning-subtle);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    margin: var(--space-3) 0;
}

.pip-info svg {
    width: 18px;
    height: 18px;
    color: var(--warning);
    flex-shrink: 0;
    margin-top: 1px;
}

.pip-info-content {
    flex: 1;
}

.pip-info-content p {
    font-size: var(--text-sm);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.pip-info-content strong {
    font-weight: var(--font-medium);
}

.pip-buttons {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.pip-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pip-btn-primary {
    background: var(--warning);
    color: white;
    border: none;
}

.pip-btn-primary:hover {
    background: var(--warning-hover);
}

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

.pip-btn-secondary:hover {
    background: var(--bg-subtle);
}

/* ==========================================================================
   Sidebar - Style
   ========================================================================== */

#sidebar {
    position: fixed;
    right: -380px;
    top: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-default);
    border-left: 1px solid var(--border-light);
    transition: right var(--transition-slow);
    overflow: hidden;
    z-index: 150;
    display: flex;
    flex-direction: column;
}

#sidebar.open,
#sidebar.sidebar-open {
    right: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-title {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.btn-sidebar-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-sidebar-close:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.btn-sidebar-close svg {
    width: 16px;
    height: 16px;
}

.sidebar-search {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border-light);
}

.sidebar-search svg {
    width: 14px;
    height: 14px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.sidebar-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-sm);
    color: var(--text-default);
    outline: none;
}

.sidebar-search input::placeholder {
    color: var(--text-placeholder);
}

.sidebar-filters {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
}

.filter-btn {
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--border-default);
    color: var(--text-default);
}

.filter-btn.active {
    background: var(--primary-subtle);
    border-color: var(--primary);
    color: var(--primary);
}

.saved-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3);
}

.saved-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
}

.saved-card:hover {
    border-color: var(--border-default);
}

.saved-card-thumbnail {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-muted);
    margin-bottom: var(--space-3);
}

.saved-card-content {
    flex: 1;
    min-width: 0;
}

.saved-card-title {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: var(--space-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}

.saved-card-actions {
    display: flex;
    gap: var(--space-1);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action svg {
    width: 12px;
    height: 12px;
}

.btn-play {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-play:hover {
    background: var(--primary-subtle-hover);
}

.btn-download {
    background: var(--success-subtle);
    color: var(--success);
}

.btn-download:hover {
    background: rgba(70, 167, 88, 0.15);
}

.btn-delete {
    background: var(--error-subtle);
    color: var(--error);
}

.btn-delete:hover {
    background: rgba(227, 72, 80, 0.15);
}

.btn-share {
    background: var(--primary-subtle);
    color: var(--primary);
}

.btn-share:hover {
    background: var(--primary-subtle-hover);
}

.sidebar-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--border-light);
}

.btn-load-more {
    width: 100%;
    padding: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-2);
}

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

.btn-clear {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--error);
    background: var(--error-subtle);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-clear:hover {
    background: rgba(227, 72, 80, 0.15);
}

.btn-clear svg {
    width: 14px;
    height: 14px;
}

/* Sync Button */
.btn-sync {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--primary);
    background: var(--primary-subtle);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: var(--space-2);
}

.btn-sync:hover:not(:disabled) {
    background: var(--primary-subtle-hover);
}

.btn-sync:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sync svg {
    width: 14px;
    height: 14px;
}

/* Sync Progress */
.sync-progress {
    margin-bottom: var(--space-2);
}

.sync-progress-bar {
    height: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-1);
}

.sync-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.sync-progress-text {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    display: block;
}

.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* ==========================================================================
   Storage Pie Chart - Floating Right
   ========================================================================== */

.storage-pie {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    box-shadow: var(--shadow-md);
    z-index: 100;
    overflow: hidden;
    width: auto;
    min-width: 48px;
    transition: all var(--transition-fast);
}

.storage-pie:hover {
    gap: var(--space-3);
    padding: var(--space-3);
}

.storage-pie-chart {
    position: relative;
    width: 40px;
    height: 40px;
}

.pie-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.pie-bg {
    fill: none;
    stroke: var(--bg-muted);
    stroke-width: 3;
}

.pie-progress {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease, stroke 0.3s ease;
}

.pie-progress.warning {
    stroke: var(--warning);
}

.pie-progress.danger {
    stroke: var(--error);
}

.pie-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#storage-percent {
    font-size: 8px;
    font-weight: var(--font-medium);
    color: var(--text-secondary);
}

.storage-pie-info {
    display: flex;
    flex-direction: column;
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.storage-pie:hover .storage-pie-info {
    width: auto;
    opacity: 1;
}

.storage-pie-info .storage-info {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ==========================================================================
   Modals - Style
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-fast);
}

.modal {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: calc(100vh - 64px);
    background: var(--bg-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: modal-enter var(--transition-spring);
}

.modal-content {
    padding: var(--space-4);
}

.modal-close {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-video {
    width: 100%;
    border-radius: var(--radius-md);
}

.modal-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}

/* Filename Modal */
.filename-modal-content {
    max-width: 440px;
}

.filename-modal-content h2 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

.form-group {
    margin-bottom: var(--space-3);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

.filename-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.filename-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.filename-preview {
    padding: var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

.filename-preview-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-1);
}

.filename-preview-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-default);
    word-break: break-all;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.btn-secondary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    background: var(--bg-subtle);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

.btn-primary {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--danger);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-danger:hover {
    background: var(--danger-hover);
}

/* Naming Pattern Modal */
.naming-pattern-modal-content {
    max-width: 520px;
}

.naming-pattern-modal-content h2 {
    font-size: var(--text-base-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

.naming-pattern-select {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.naming-pattern-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.custom-pattern-group {
    margin-top: var(--space-3);
}

.naming-pattern-custom {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.naming-pattern-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.naming-tokens {
    margin: var(--space-3) 0;
}

.naming-tokens > label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.token-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

.token {
    padding: 2px var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--primary);
    background: var(--primary-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.token:hover {
    background: var(--primary-subtle-hover);
}

.pattern-preview {
    padding: var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.pattern-preview-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-bottom: var(--space-1);
}

.pattern-preview-text {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    color: var(--text-default);
    word-break: break-all;
}

/* Shortcuts Modal */
.shortcuts-modal {
    max-width: 400px;
}

.shortcuts-modal h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    text-align: center;
    margin-bottom: var(--space-4);
}

.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.shortcut-item kbd {
    min-width: 56px;
    padding: var(--space-1) var(--space-2);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-align: center;
}

.shortcut-desc {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* ==========================================================================
   Delete Confirmation Modal - Style
   ========================================================================== */

.delete-confirm-modal-content,
.delete-all-confirm-modal-content {
    max-width: 420px;
}

.delete-confirm-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error-subtle);
    border-radius: var(--radius-md);
    color: var(--error);
    margin-bottom: var(--space-3);
}

.delete-confirm-icon svg {
    width: 16px;
    height: 16px;
}

.delete-confirm-modal-content h2,
.delete-all-confirm-modal-content h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.delete-confirm-message {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.delete-confirm-message strong {
    color: var(--text-default);
    font-weight: var(--font-medium);
}

.delete-all-confirm-input {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-family: var(--font-mono);
    color: var(--text-default);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.delete-all-confirm-input:focus {
    outline: none;
    border-color: var(--error);
    box-shadow: 0 0 0 3px var(--error-subtle);
}

.delete-all-confirm-input::placeholder {
    color: var(--text-placeholder);
    text-transform: none;
    letter-spacing: normal;
}

#delete-all-confirm-ok:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Toast Notifications - Style
   ========================================================================== */

#error-notifications {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 400px;
    animation: toast-enter var(--transition-spring);
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.warning {
    border-color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-default);
}

.toast-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: var(--bg-muted);
    color: var(--text-default);
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* ==========================================================================
   Keyboard Shortcuts Button
   ========================================================================== */

.shortcuts-info-btn {
    position: fixed;
    bottom: var(--space-4);
    left: var(--space-4);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    z-index: 100;
}

.shortcuts-info-btn:hover {
    background: var(--bg-subtle);
    color: var(--text-default);
}

.shortcuts-info-btn svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-default);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ==========================================================================
   Skeleton Loading
   ========================================================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-muted) 25%,
        var(--bg-subtle) 50%,
        var(--bg-muted) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Capability Warnings
   ========================================================================== */

.capability-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--warning-subtle);
    border: 1px solid rgba(214, 158, 46, 0.2);
    border-radius: var(--radius-md);
    margin: var(--space-2) 0;
    font-size: var(--text-sm);
    color: var(--warning);
}

.capability-warning svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ==========================================================================
   Browser Not Supported Warning
   ========================================================================== */

.browser-warning {
    padding: var(--space-4);
    background: var(--error-subtle);
    border: 1px solid rgba(227, 72, 80, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-3);
}

.browser-warning h3 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--error);
    margin-bottom: var(--space-2);
}

.browser-warning p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.browser-warning p:last-child {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* ==========================================================================
   Error Recovery
   ========================================================================== */

.error-recovery {
    background: var(--bg-default);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    margin: var(--space-2) 0;
}

.error-recovery.warning {
    border-color: var(--warning);
}

.error-message {
    font-size: var(--text-sm);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.retry-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.retry-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.inline-error {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    background: var(--error-subtle);
    border: 1px solid var(--error);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--error);
}

.inline-retry-btn {
    padding: 2px var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.inline-retry-btn:hover:not(:disabled) {
    background: var(--primary-hover);
}

/* ==========================================================================
   Mobile Optimizations
   ========================================================================== */

/* Hide screen sharing toggle on mobile - not supported */
@media (max-width: 768px) {
    .config-card[data-config="screen"] {
        display: none;
    }
    
    /* Adjust grid to account for hidden screen toggle */
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   Touch Target Optimization - Minimum 44px
   ========================================================================== */

/* Increase touch targets for all interactive elements */
.config-card {
    min-height: 56px;
    padding: var(--space-3) var(--space-4);
}

.btn-record {
    min-height: 52px;
    padding: var(--space-4) var(--space-4);
}

.btn-action-record {
    min-height: 48px;
}

.app-menu-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.btn-sidebar-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.modal-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.filter-btn {
    min-height: 36px;
    padding: var(--space-2) var(--space-3);
}

.btn-action {
    min-height: 36px;
    padding: var(--space-2) var(--space-3);
}

.pip-btn {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.btn-secondary,
.btn-primary {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.command-item {
    min-height: 44px;
    padding: var(--space-3) var(--space-4);
}

.shortcuts-info-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
}

.storage-pie {
    min-height: 52px;
    padding: var(--space-3);
}

/* ==========================================================================
   Landscape Orientation Handling
   ========================================================================== */

@media (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: var(--space-4) var(--space-3);
        margin-bottom: var(--space-3);
    }
    
    .hero-content h2 {
        font-size: var(--text-lg);
    }
    
    .hero-content p {
        font-size: var(--text-sm);
        max-width: 400px;
    }
    
    .hero-content img {
        max-height: 60px;
    }
    
    .recording-controls {
        padding: var(--space-3);
    }
    
    .controls-header {
        margin-bottom: var(--space-3);
    }
    
    .controls-title {
        font-size: var(--text-sm);
    }
    
    .controls-subtitle {
        font-size: var(--text-xs);
    }
    
    .config-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
        margin-bottom: var(--space-3);
    }
    
    .config-card {
        padding: var(--space-2) var(--space-3);
        min-height: 48px;
    }
    
    .config-icon {
        width: 32px;
        height: 32px;
    }
    
    .config-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .config-title {
        font-size: var(--text-xs);
    }
    
    .config-desc {
        display: none;
    }
    
    .config-summary {
        padding: var(--space-1) var(--space-2);
        font-size: var(--text-xs);
        margin-bottom: var(--space-2);
    }
    
    .btn-record {
        min-height: 44px;
        padding: var(--space-2) var(--space-3);
    }
    
    #main-content {
        padding: var(--space-3) var(--space-3);
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .app-header {
        padding: var(--space-2) var(--space-3);
    }

    #main-content {
        padding: var(--space-4) var(--space-3);
    }

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

    #sidebar {
        width: 100%;
        right: -100%;
    }

    .command-container {
        max-width: 100%;
        margin: 0 var(--space-3);
    }

    .storage-pie {
        bottom: var(--space-3);
        right: var(--space-3);
        padding: var(--space-2);
    }

    .modal {
        max-width: 100%;
        margin: 0 var(--space-3);
    }
}

@media (max-width: 480px) {
    .saved-card-thumbnail {
        height: 100px;
    }

    .command-footer {
        flex-wrap: wrap;
        gap: var(--space-2);
    }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
    }
    
    /* Further simplify for very small screens */
    .recording-controls {
        padding: var(--space-3);
    }
    
    .controls-header {
        margin-bottom: var(--space-3);
    }
    
    .controls-title {
        font-size: var(--text-sm);
    }
    
    .controls-subtitle {
        font-size: var(--text-xs);
    }
    
    .config-summary {
        font-size: var(--text-xs);
    }
    
    .btn-record-shortcut {
        display: none;
    }
}

/* ==========================================================================
   Landscape Mode Class (for JS-triggered landscape handling)
   ========================================================================== */

.landscape-mode .hero-content p,
.landscape-mode .hero-content img {
    display: none;
}

.landscape-mode .hero-content h2 {
    font-size: var(--text-lg);
}

/* ==========================================================================
    Footer - Style
    ========================================================================== */

.app-footer {
    text-align: center;
    padding: var(--space-4);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.app-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: color var(--transition-fast);
}

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

.footer-links {
    margin-top: var(--space-2);
    font-size: var(--text-xs);
}

.footer-links a {
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

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

.link-separator {
    margin: 0 var(--space-2);
    color: var(--border-default);
}

/* ==========================================================================
     Legal Pages - Privacy Policy & Terms of Service
     ========================================================================== */

.legal-container {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-6);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary-hover);
}

.back-link-videos {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    padding: var(--space-4) var(--space-6);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.back-link-videos:hover {
    color: var(--text-default);
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
}

.back-link-videos svg {
    width: 16px;
    height: 16px;
}

.legal-container h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.last-updated {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: var(--space-8);
}

.legal-container section {
    margin-bottom: var(--space-6);
}

.legal-container h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-3);
}

.legal-container p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-3);
}

.legal-container ul {
    list-style: disc;
    padding-left: var(--space-5);
    margin-bottom: var(--space-3);
}

.legal-container li {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-2);
}

.legal-container strong {
    font-weight: var(--font-medium);
    color: var(--text-default);
}

/* Responsive for legal pages */
@media (max-width: 768px) {
    .legal-container {
        padding: var(--space-6) var(--space-4);
    }

    .legal-container h1 {
        font-size: var(--text-xl);
    }

    .legal-container h2 {
        font-size: var(--text-base-medium);
    }

    .legal-container p,
    .legal-container li {
        font-size: var(--text-sm);
    }
}

/* ==========================================================================
     Feedback Modal
     ========================================================================== */

.feedback-modal-content {
    max-width: 600px;
}

.feedback-modal-content h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

.feedback-modal-content .wufoo-form {
    min-height: 497px;
}

/* ==========================================================================
    PRO Features Section
    ========================================================================== */

.pro-section {
    background: linear-gradient(135deg, var(--primary-subtle) 0%, rgba(94, 106, 210, 0.05) 100%);
    border: 1px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin: var(--space-6) 0;
    text-align: center;
}

.pro-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: var(--primary);
    color: white;
    font-size: var(--text-xs-caps);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
    letter-spacing: 0.05em;
}

.pro-section h2 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.pro-subtitle {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.pro-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.pro-feature-card {
    background: var(--bg-default);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    transition: all var(--transition-fast);
}

.pro-feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.pro-feature-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    border-radius: var(--radius-md);
    margin: 0 auto var(--space-3);
}

.pro-feature-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.pro-feature-card h3 {
    font-size: var(--text-sm-medium);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-1);
}

.pro-feature-card p {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.pro-cta {
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.pro-cta p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.btn-pro-signup {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

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

/* PRO Modal */
.pro-modal-content {
    max-width: 480px;
}

.pro-modal-header {
    text-align: center;
    margin-bottom: var(--space-4);
}

.pro-badge-small {
    display: inline-block;
    padding: 2px var(--space-2);
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs-caps);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-3);
}

.pro-modal-header h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
}

.pro-modal-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-4);
}

.pro-email-form {
    margin-bottom: var(--space-3);
}

.pro-email-input {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--text-base);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    background: var(--bg-default);
    color: var(--text-default);
}

.pro-email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-focus);
}

.pro-features-preview {
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-4) 0;
}

.pro-features-preview h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-3);
}

.pro-features-preview ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
}

.pro-features-preview li {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pro-modal-note {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-align: center;
    margin-top: var(--space-3);
}

/* PRO Success State */
.pro-success {
    text-align: center;
    padding: var(--space-4);
}

.pro-success-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--success-subtle);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-4);
}

.pro-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.pro-success h2 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.pro-success p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   Videos Page
   ========================================================================== */

.videos-page {
    padding: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.videos-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.videos-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.back-btn svg {
    width: 20px;
    height: 20px;
}

.videos-header-left h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
}

.recordings-count {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-1) 0 0 0;
}

.videos-header-actions {
    display: flex;
    gap: var(--space-3);
}

.videos-header-actions .btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.videos-header-actions .btn svg {
    width: 16px;
    height: 16px;
}

.videos-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.videos-search {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    background: var(--bg-default);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    flex: 1;
    max-width: 400px;
}

.videos-search svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.videos-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--text-default);
    outline: none;
}

.videos-search input::placeholder {
    color: var(--text-secondary);
}

.videos-filters {
    display: flex;
    gap: var(--space-2);
}

.videos-filters .filter-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: none;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.videos-filters .filter-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.videos-filters .filter-btn.active {
    background: var(--primary);
    color: white;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.videos-load-more {
    display: flex;
    justify-content: center;
    margin-top: var(--space-6);
}

/* ==========================================================================
   Share Modal
   ========================================================================== */

.share-modal {
    max-width: 400px;
}

.share-uploading {
    padding: var(--space-4) 0;
    text-align: center;
}

.share-icon-container {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4);
    background: var(--primary-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.upload-icon {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.share-video-info {
    margin-bottom: var(--space-4);
}

.share-video-title {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--text-default);
    margin-bottom: var(--space-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.share-video-size {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.share-progress {
    margin-bottom: var(--space-4);
}

.share-progress-bar {
    height: 8px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.share-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.share-progress-text {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    display: block;
    text-align: center;
}

.share-complete {
    text-align: center;
    padding: var(--space-4) 0;
}

.share-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--success-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.share-success-text {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin-bottom: var(--space-2);
}

.share-modal-notice,
.share-upload-notice,
.share-completed-notice {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-4);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.share-modal-notice {
    margin-top: var(--space-2);
}

.share-upload-notice {
    margin-top: var(--space-3);
    margin-bottom: var(--space-3);
}

.share-completed-notice {
    margin-bottom: var(--space-4);
}

.share-url-container {
    text-align: left;
    margin-bottom: var(--space-6);
}

.share-url-container label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.share-url-input {
    display: flex;
    gap: var(--space-2);
    background: var(--bg-muted);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-1);
}

.share-url-input input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: transparent;
    color: var(--text-default);
    min-width: 0;
}

.share-url-input input:focus {
    outline: none;
}

.share-url-input .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.share-actions {
    display: flex;
    justify-content: center;
}

.share-actions .btn {
    min-width: 140px;
}

.share-error {
    text-align: center;
    padding: var(--space-4) 0;
}

.share-error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    background: var(--error-subtle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-error-icon svg {
    width: 32px;
    height: 32px;
    color: var(--error);
}

.share-error-text {
    font-size: var(--text-base);
    color: var(--text-default);
    margin-bottom: var(--space-4);
}

/* ==========================================================================
   Watch Page
   ========================================================================== */

.watch-page {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.watch-container {
    width: 100%;
    max-width: 900px;
}

.watch-header {
    margin-bottom: var(--space-6);
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.watch-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.watch-header .back-btn:hover {
    background: var(--bg-default);
    color: var(--text-default);
}

.watch-header .back-btn svg {
    width: 20px;
    height: 20px;
}

.watch-header h1 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-default);
    margin: 0;
    flex: 1;
}

.watch-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: var(--space-2) 0 0 0;
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.video-wrapper {
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-6);
}

.watch-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.watch-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

.watch-actions .btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.watch-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .watch-header {
        flex-direction: column;
    }

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

    .watch-actions .btn {
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .videos-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .videos-header-actions {
        width: 100%;
    }

    .videos-header-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .videos-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .videos-search {
        max-width: none;
    }

    .videos-filters {
        justify-content: center;
    }

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

/* ==========================================================================
   View Transitions (Page Transitions)
   ========================================================================== */

@view-transition {
    navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 9999;
}

html[data-view-transition="entering"] ::view-transition-new(root) {
    animation: 250ms cubic-bezier(0.2, 0, 0, 1) both view-transition-enter;
}

html[data-view-transition="leaving"] ::view-transition-old(root) {
    animation: 250ms cubic-bezier(0.2, 0, 0, 1) both view-transition-leave;
}

@keyframes view-transition-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes view-transition-leave {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Named view transitions for persistent elements */
.app-header {
    view-transition-name: app-header;
}

.app-footer {
    view-transition-name: app-footer;
}

.app-logo {
    view-transition-name: app-logo;
}

/* ==========================================================================
     Print Styles
     ========================================================================== */

@media print {
    .app-header,
    #sidebar,
    .storage-pie,
    .shortcuts-info-btn,
    .command-menu,
    .app-footer {
        display: none !important;
    }

    #main-content {
        max-width: 100%;
        padding: 0;
    }
}
/*



 */
