/* =====================================================
   Article Refactor Agent — Premium Dark UI
   ===================================================== */

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 28, 0.6);
    --bg-card-hover: rgba(24, 24, 38, 0.8);
    --bg-input: rgba(12, 12, 20, 0.8);
    --border-primary: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(124, 92, 252, 0.5);
    --text-primary: #e8e8f0;
    --text-secondary: #8b8ba0;
    --text-muted: #5a5a70;
    --accent-primary: #7c5cfc;
    --accent-secondary: #5c9cfc;
    --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #5c9cfc 100%);
    --accent-glow: rgba(124, 92, 252, 0.15);
    --success: #4ade80;
    --warning: #fbbf24;
    --error: #f87171;
    --info: #60a5fa;

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border-primary);
    --shadow-glow: 0 0 40px rgba(124, 92, 252, 0.1);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7c5cfc 0%, transparent 70%);
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #5c9cfc 0%, transparent 70%);
    bottom: -5%;
    left: -5%;
    animation-delay: -7s;
}

.bg-orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -40px) scale(1.1);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    75% {
        transform: translate(40px, 30px) scale(1.05);
    }
}

/* App Container */
.app-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.app-header {
    padding: 24px 0 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 16px rgba(124, 92, 252, 0.3);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    backdrop-filter: blur(12px);
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-primary);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-title svg {
    color: var(--accent-primary);
}

.card-actions {
    display: flex;
    gap: 6px;
}

.card-body {
    padding: 24px;
}

/* Variables Section */
.variables-section {
    border: 1px solid rgba(124, 92, 252, 0.15);
}

.schema-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schema-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-primary);
}

.preset-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

.preset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.btn-preset {
    padding: 6px 14px;
    font-size: 0.8rem;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-preset:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    background: var(--accent-glow);
}

.btn-preset.active {
    background: var(--accent-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

.variables-body {
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.variables-body.collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    opacity: 0;
}

.var-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
}

.var-grid .input-group:first-child {
    grid-column: 1 / -1;
}

.toggle-chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.variables-section.collapsed .toggle-chevron {
    transform: rotate(-90deg);
}

@media (max-width: 640px) {
    .var-grid {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 0.875rem;
    padding: 10px 18px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 2px 12px rgba(124, 92, 252, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(124, 92, 252, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 12px;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.btn-sm {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.btn-lg {
    font-size: 0.95rem;
    padding: 12px 24px;
}

/* Inputs */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.textarea-field {
    width: 100%;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.7;
    resize: vertical;
    min-height: 200px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.textarea-field:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.textarea-field::placeholder,
.input-field::placeholder {
    color: var(--text-muted);
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.action-bar {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Progress Pipeline */
.pipeline-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
}

.pipeline-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.pipeline-step.active,
.pipeline-step.done {
    opacity: 1;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    border: 2px solid var(--text-muted);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pipeline-step.active .step-dot {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.5);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.pipeline-step.done .step-dot {
    background: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

@keyframes dotPulse {

    0%,
    100% {
        box-shadow: 0 0 12px rgba(124, 92, 252, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(124, 92, 252, 0.8);
    }
}

.step-line {
    width: 2px;
    height: 24px;
    background: var(--border-primary);
    transition: background 0.3s ease;
}

.pipeline-step.done .step-line {
    background: var(--success);
}

.step-content {
    padding-bottom: 16px;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
}

.step-status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pipeline-step.active .step-status {
    color: var(--accent-secondary);
}

.pipeline-step.done .step-status {
    color: var(--success);
}

/* Timer */
.header-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-secondary);
    padding: 6px 14px;
    background: rgba(92, 156, 252, 0.08);
    border: 1px solid rgba(92, 156, 252, 0.15);
    border-radius: 100px;
}

.timer-icon {
    font-size: 1rem;
}

/* Step Estimate */
.step-est {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 8px;
    font-style: italic;
}

.pipeline-step.active .step-est {
    color: var(--accent-secondary);
    opacity: 0.7;
}

.pipeline-step.done .step-est {
    display: none;
}

/* Step Detail Log */
.step-detail {
    display: none;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.pipeline-step.done .step-detail {
    display: block;
}

.step-detail .model-badge {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(124, 92, 252, 0.12);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: 4px;
    color: var(--accent-primary);
    font-size: 0.65rem;
    margin-right: 6px;
}

.step-detail .time-badge {
    color: var(--success);
    margin-right: 6px;
}

.step-detail .chars-badge {
    color: var(--text-muted);
}

.pipeline-step.active .step-detail {
    display: block;
}

.pipeline-step.active .step-detail .model-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Save Button */
.btn-save {
    background: rgba(74, 222, 128, 0.1) !important;
    border-color: rgba(74, 222, 128, 0.3) !important;
    color: #4ade80 !important;
}

.btn-save:hover {
    background: rgba(74, 222, 128, 0.2) !important;
    border-color: rgba(74, 222, 128, 0.5) !important;
}

/* Restart Button */
.btn-restart {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: rgba(251, 191, 36, 0.3) !important;
    color: #fbbf24 !important;
}

.btn-restart:hover {
    background: rgba(251, 191, 36, 0.2) !important;
    border-color: rgba(251, 191, 36, 0.5) !important;
}

/* History Section */
.history-section {
    border: 1px solid rgba(124, 92, 252, 0.15);
}

.history-body {
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.history-section.collapsed .history-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.history-section.collapsed .chevron {
    transform: rotate(-90deg);
}

.history-count {
    font-size: 0.7rem;
    background: var(--accent-primary);
    color: #fff;
    padding: 1px 7px;
    border-radius: 100px;
    margin-left: 6px;
}

.history-empty {
    color: var(--text-muted);
    text-align: center;
    padding: 24px;
    font-size: 0.85rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--accent-primary);
    background: var(--accent-glow);
}

.history-item .hi-info {
    flex: 1;
    min-width: 0;
}

.history-item .hi-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item .hi-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.history-item .hi-preset {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(124, 92, 252, 0.12);
    border: 1px solid rgba(124, 92, 252, 0.2);
    color: var(--accent-primary);
}

.history-item .hi-delete {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: 6px;
    color: #f87171;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.history-item .hi-delete:hover {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
}

/* Loading Overlay for Step-by-Step */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.loading-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.loading-elapsed {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    color: var(--accent-secondary);
    font-weight: 600;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 4px;
    background: var(--bg-input);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 100px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px rgba(124, 92, 252, 0.4);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Tabs */
.split-tabs,
.result-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(124, 92, 252, 0.3);
}

.tab-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Preview Box */
.preview-box {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Article Preview (rendered HTML) */
.article-preview {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 28px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-height: 600px;
    overflow-y: auto;
}

.article-preview h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 24px 0 12px;
    color: #fff;
}

.article-preview h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 20px 0 10px;
    color: #fff;
}

.article-preview p {
    margin-bottom: 14px;
}

.article-preview ul,
.article-preview ol {
    margin: 12px 0;
    padding-left: 24px;
}

.article-preview li {
    margin-bottom: 6px;
}

.article-preview strong {
    color: #fff;
    font-weight: 600;
}

/* Code Block */
.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 500px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-block-sm {
    max-height: 200px;
}

/* SEO Grid */
.seo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.seo-item label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.seo-value {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.seo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.seo-tag {
    display: inline-flex;
    padding: 4px 12px;
    background: var(--accent-glow);
    border: 1px solid rgba(124, 92, 252, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
}

.seo-item-full {
    grid-column: 1 / -1;
}

/* Usage Bar */
.usage-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 24px !important;
}

.usage-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.usage-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-secondary);
}

.usage-divider {
    width: 1px;
    height: 20px;
    background: var(--border-primary);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 32px 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    animation: slideIn 0.3s ease;
    min-width: 260px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--error);
}

.toast.info {
    border-left: 3px solid var(--info);
}

@keyframes slideIn {
    from {
        transform: translateX(80px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Spinner */
.spin {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 640px) {
    .app-container {
        padding: 0 12px;
    }

    .header-content {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .action-bar {
        flex-direction: column;
    }

    .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .usage-bar {
        flex-direction: column;
        gap: 12px;
    }

    .usage-divider {
        width: 100%;
        height: 1px;
    }

    .split-tabs,
    .result-tabs {
        flex-wrap: wrap;
    }
}