/* ============================================
   Screen to GIF - Modern Styling with Dark Mode
   ============================================ */

/* CSS Variables - Light Mode (Default) */
:root {
    --transition-speed: 0.25s;
    
    /* Primary Colors - Blue Theme */
    --primary: #3399cc;
    --primary-light: #e0f2fe;
    --primary-dark: #2980b9;
    --accent: #38bdf8;
    
    /* Status Colors */
    --success: #339966;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #e64e4e;
    --danger-light: #fee2e2;
    --info: #3399cc;
    --info-light: #dbeafe;
    
    /* Use Case Tag Colors */
    --tag-bug: #e64e4e;
    --tag-tutorial: #3399cc;
    --tag-demo: #339966;
    --tag-social: #8b5cf6;
    
    /* Settings Tag Colors */
    --tag-fps: #3399cc;
    --tag-quality: #339966;
    --tag-width: #e64e4e;
    
    /* Background Colors */
    --bg: #f8fafc;
    --bg-elevated: #ffffff;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    
    /* Text Colors */
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    --shadow-primary: 0 4px 14px rgba(51, 153, 204, 0.25);
    --shadow-primary-hover: 0 6px 20px rgba(51, 153, 204, 0.35);
    
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Input */
    --input-bg: #ffffff;
    --input-border: #e2e8f0;
    
    /* Scrollbar */
    --scrollbar-track: var(--bg);
    --scrollbar-thumb: var(--text-muted);
    --scrollbar-thumb-hover: var(--text-secondary);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-light: rgba(96, 165, 250, 0.15);
    --primary-dark: #3b82f6;
    --accent: #93c5fd;
    
    --success: #4ade80;
    --success-light: rgba(74, 222, 128, 0.15);
    --warning: #fbbf24;
    --warning-light: rgba(251, 191, 36, 0.15);
    --danger: #f87171;
    --danger-light: rgba(248, 113, 113, 0.15);
    --info: #60a5fa;
    --info-light: rgba(96, 165, 250, 0.15);
    
    --tag-bug: #f87171;
    --tag-tutorial: #60a5fa;
    --tag-demo: #4ade80;
    --tag-social: #a78bfa;
    
    --tag-fps: #60a5fa;
    --tag-quality: #4ade80;
    --tag-width: #f87171;
    
    --bg: #0f172a;
    --bg-elevated: #1e293b;
    --bg-secondary: #334155;
    --bg-tertiary: #475569;
    
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border: rgba(255,255,255,0.1);
    --border-light: rgba(255,255,255,0.05);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.25);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5);
    --shadow-primary: 0 4px 14px rgba(96, 165, 250, 0.25);
    --shadow-primary-hover: 0 6px 20px rgba(96, 165, 250, 0.35);
    
    --input-bg: #334155;
    --input-border: #475569;
    
    --scrollbar-track: var(--bg-elevated);
    --scrollbar-thumb: var(--text-muted);
    --scrollbar-thumb-hover: var(--text-secondary);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Container */
.tool-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tool-icon-wrapper {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.tool-icon-wrapper svg,
.tool-icon-wrapper i {
    width: 28px;
    height: 28px;
}

.tool-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin: 0;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main Tool Area */
.tool-main {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    transition: background-color var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

/* ============================================
   START SECTION
   ============================================ */
.start-section {
    padding: 3rem;
}

.start-panel {
    text-align: center;
}

.start-hero {
    margin-bottom: 2rem;
}

.start-icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.start-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
}

.start-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1rem;
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Capture Options */
.capture-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.capture-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.capture-option svg,
.capture-option i {
    color: var(--primary);
    width: 22px;
    height: 22px;
}

/* Record Button */
.btn-record {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem 2.5rem;
    border-radius: var(--radius-full);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 20px rgba(230, 78, 78, 0.3);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.btn-record:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(230, 78, 78, 0.4);
}

.btn-record:active {
    transform: translateY(0);
}

.btn-record-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    display: inline-block;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* Start Footer */
.start-footer {
    margin-top: 1.5rem;
}

.start-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.start-hint svg,
.start-hint i {
    width: 14px;
    height: 14px;
    color: var(--success);
}

/* Browser Warning */
.browser-warning {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: var(--warning-light);
    color: var(--warning);
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

.browser-warning strong {
    display: block;
    margin-bottom: 0.25rem;
}

.browser-warning p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================
   SETTINGS SECTION
   ============================================ */
.settings-section {
    padding: 2rem;
    animation: fadeIn 0.4s ease;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-group {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.setting-label svg,
.setting-label i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

.setting-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* FPS / Width / Duration Option Buttons */
.fps-options,
.width-options,
.duration-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fps-btn,
.width-btn,
.duration-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fps-btn:hover,
.width-btn:hover,
.duration-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.fps-btn.active,
.width-btn.active,
.duration-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Quality Slider */
.quality-slider-wrap {
    padding: 0.25rem 0;
}

.quality-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    outline: none;
    transition: background var(--transition-speed);
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.quality-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

#qualityValue {
    font-weight: 600;
    color: var(--primary);
}

/* Settings Actions */
.settings-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ============================================
   RECORDING SECTION
   ============================================ */
.recording-section {
    animation: fadeIn 0.4s ease;
}

.recording-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse-rec 1s infinite;
}

@keyframes pulse-rec {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.rec-dot.paused {
    animation: none;
    opacity: 0.4;
}

.rec-text {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--danger);
    letter-spacing: 1px;
}

.recording-timer {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.recording-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Recording Preview */
.recording-preview {
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 500px;
}

.recording-preview video {
    max-width: 100%;
    max-height: 500px;
    display: block;
}

/* Recording Controls */
.recording-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.btn-pause {
    background: var(--warning);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-pause:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}

.btn-pause.resumed {
    background: var(--success);
    box-shadow: 0 4px 14px rgba(51, 153, 102, 0.25);
}

.btn-pause.resumed:hover {
    background: #059669;
    box-shadow: 0 6px 20px rgba(51, 153, 102, 0.35);
}

.btn-stop {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 14px rgba(230, 78, 78, 0.25);
}

.btn-stop:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 78, 78, 0.35);
}

/* ============================================
   PROCESSING OVERLAY
   ============================================ */
.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.processing-content {
    background: var(--bg-elevated);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 350px;
    box-shadow: var(--shadow-xl);
    transition: background-color var(--transition-speed);
}

.processing-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    animation: spin 1s linear infinite;
}

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

.processing-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.processing-subtext {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   RESULTS SECTION
   ============================================ */
.results-section {
    padding: 2.5rem;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.results-header {
    margin-bottom: 2rem;
}

.success-icon {
    width: 72px;
    height: 72px;
    background: var(--success);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
    transition: background-color var(--transition-speed);
}

.success-icon svg,
.success-icon i {
    width: 36px;
    height: 36px;
}

.results-header h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.results-header p {
    color: var(--text-muted);
    margin: 0;
}

/* Result Preview */
.result-preview {
    max-width: 700px;
    margin: 0 auto 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-secondary);
    transition: border-color var(--transition-speed);
}

.result-preview img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* Results Info */
.results-info {
    max-width: 400px;
    margin: 0 auto 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    transition: border-color var(--transition-speed);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row span:last-child {
    font-weight: 600;
    color: var(--text);
}

/* Results Actions */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   ERROR SECTION
   ============================================ */
.error-section {
    padding: 3rem 2rem;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.error-icon {
    width: 72px;
    height: 72px;
    background: var(--danger-light);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: var(--danger);
}

.error-icon svg,
.error-icon i {
    width: 36px;
    height: 36px;
}

.error-section h3 {
    font-size: 1.5rem;
    color: var(--text);
    margin: 0 0 0.75rem 0;
}

.error-section p {
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-contact {
    font-size: 0.9rem;
    color: var(--text-muted) !important;
    margin-bottom: 1.5rem !important;
}

.error-contact a {
    color: var(--primary);
    text-decoration: none;
}

.error-contact a:hover {
    text-decoration: underline;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
}

.btn svg,
.btn i {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
}

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

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   RELATED TOOLS
   ============================================ */
.related-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.related-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.related-label svg,
.related-label i {
    color: var(--primary);
    width: 16px;
    height: 16px;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.related-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.related-link svg,
.related-link i {
    width: 16px;
    height: 16px;
}

/* ============================================
   INFO SECTIONS
   ============================================ */
.info-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.info-card h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    color: var(--text);
    margin: 0 0 1.5rem 0;
}

.info-card h2 svg,
.info-card h2 i {
    color: var(--primary);
    width: 24px;
    height: 24px;
}

/* Steps List */
.steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps-list li {
    position: relative;
    padding-left: 3.25rem;
    margin-bottom: 1rem;
    counter-increment: step;
    color: var(--text-secondary);
    line-height: 1.6;
}

.steps-list li:not(:last-child)::after {
    content: '';
    position: absolute;
    left: calc(1rem - 1px);
    top: 2rem;
    bottom: 0;
    width: 2px;
    background: var(--primary-light);
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    z-index: 1;
}

.steps-list li:last-child {
    margin-bottom: 0;
}

.steps-list li a {
    color: var(--primary);
    text-decoration: none;
}

.steps-list li a:hover {
    text-decoration: underline;
}

/* Mode Explanations */
.mode-explanations {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mode-explain {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.mode-tag {
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Use Case Tags */
.mode-tag.use-case-1 {
    background: rgba(230, 78, 78, 0.1);
    color: var(--tag-bug);
}

.mode-tag.use-case-2 {
    background: rgba(51, 153, 204, 0.1);
    color: var(--tag-tutorial);
}

.mode-tag.use-case-3 {
    background: rgba(51, 153, 102, 0.1);
    color: var(--tag-demo);
}

.mode-tag.use-case-4 {
    background: rgba(139, 92, 246, 0.1);
    color: var(--tag-social);
}

[data-theme="dark"] .mode-tag.use-case-1 { background: rgba(248, 113, 113, 0.15); }
[data-theme="dark"] .mode-tag.use-case-2 { background: rgba(96, 165, 250, 0.15); }
[data-theme="dark"] .mode-tag.use-case-3 { background: rgba(74, 222, 128, 0.15); }
[data-theme="dark"] .mode-tag.use-case-4 { background: rgba(167, 139, 250, 0.15); }

/* Settings Tags */
.mode-tag.setting-fps {
    background: rgba(51, 153, 204, 0.1);
    color: var(--tag-fps);
}

.mode-tag.setting-quality {
    background: rgba(51, 153, 102, 0.1);
    color: var(--tag-quality);
}

.mode-tag.setting-width {
    background: rgba(230, 78, 78, 0.1);
    color: var(--tag-width);
}

[data-theme="dark"] .mode-tag.setting-fps { background: rgba(96, 165, 250, 0.15); }
[data-theme="dark"] .mode-tag.setting-quality { background: rgba(74, 222, 128, 0.15); }
[data-theme="dark"] .mode-tag.setting-width { background: rgba(248, 113, 113, 0.15); }

.mode-explain p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.mode-explain p a {
    color: var(--primary);
    text-decoration: none;
}

.mode-explain p a:hover {
    text-decoration: underline;
}

/* ============================================
   FAQ
   ============================================ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
    text-align: left;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background: var(--bg-tertiary);
}

.faq-question svg,
.faq-question i {
    flex-shrink: 0;
    color: var(--primary);
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question svg,
.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

.faq-answer p {
    padding: 1rem 1.25rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.faq-answer a {
    color: var(--primary);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }
    
    .tool-title-row {
        gap: 0.75rem;
    }
    
    .tool-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .tool-icon-wrapper svg,
    .tool-icon-wrapper i {
        width: 24px;
        height: 24px;
    }
    
    .start-section {
        padding: 2rem 1.5rem;
    }
    
    .capture-options {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .capture-option {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .btn-record {
        width: 100%;
        max-width: 320px;
    }
    
    .settings-section {
        padding: 1.5rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions .btn {
        width: 100%;
    }
    
    .recording-header {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .recording-controls {
        flex-direction: column;
        padding: 1.25rem;
    }
    
    .recording-controls .btn {
        width: 100%;
    }
    
    .results-section {
        padding: 2rem 1.5rem;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn,
    .results-actions a {
        width: 100%;
    }
    
    .related-tools {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mode-explain {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tool-title-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .fps-options,
    .width-options,
    .duration-options {
        flex-wrap: wrap;
    }
    
    .recording-timer {
        font-size: 1.25rem;
    }
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Selection */
::selection {
    background: rgba(51, 153, 204, 0.2);
    color: var(--text);
}

[data-theme="dark"] ::selection {
    background: rgba(96, 165, 250, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
