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

:root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255,255,255,0.75);
    --bg-card-solid: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-bg: #eef2ff;
    --accent-glow: rgba(99,102,241,0.3);
    --success: #10b981;
    --success-bg: #ecfdf5;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --info: #3b82f6;
    --info-bg: #eff6ff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 50px -5px rgba(0,0,0,0.1);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --glass-blur: 16px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    --format-srt: #3b82f6;
    --format-smi: #10b981;
    --format-vtt: #8b5cf6;
    --format-ass: #f59e0b;
    --format-sub: #ec4899;
    --format-sup: #14b8a6;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30,41,59,0.8);
    --bg-card-solid: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-bg: rgba(99,102,241,0.15);
    --border: #334155;
    --border-light: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.5);
    --success-bg: rgba(16,185,129,0.1);
    --error-bg: rgba(239,68,68,0.1);
    --warning-bg: rgba(245,158,11,0.1);
    --info-bg: rgba(59,130,246,0.1);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition), color var(--transition);
}

/* Header */
.header {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition);
    color: var(--text-secondary);
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(30deg);
}

/* Main */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
    flex: 1;
}

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}
.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
.hero p { color: var(--text-secondary); font-size: 0.95rem; }
.hero .badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.format-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-srt { background: rgba(59,130,246,0.1); color: var(--format-srt); }
.badge-smi { background: rgba(16,185,129,0.1); color: var(--format-smi); }
.badge-vtt { background: rgba(139,92,246,0.1); color: var(--format-vtt); }
.badge-ass { background: rgba(245,158,11,0.1); color: var(--format-ass); }
.badge-sub { background: rgba(236,72,153,0.1); color: var(--format-sub); }
.badge-sup { background: rgba(20,184,166,0.1); color: var(--format-sup); }

/* Cards */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}
.drop-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, var(--accent-bg) 100%);
    opacity: 0;
    transition: opacity var(--transition);
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 0 4px var(--accent-glow);
}
.drop-zone:hover::before, .drop-zone.drag-over::before { opacity: 1; }
.drop-zone-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
    transition: transform var(--transition);
}
.drop-zone:hover .drop-zone-icon { transform: translateY(-4px) scale(1.05); }
.drop-zone-text { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.25rem; }
.drop-zone-sub { font-size: 0.85rem; color: var(--text-muted); }
.drop-zone input[type="file"] { display: none; }

/* File List Container */
.file-list-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.file-list-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.file-list-count {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--accent-bg);
    color: var(--accent);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
}
.file-list { list-style: none; }
.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    margin-bottom: 0.4rem;
    border: 1px solid var(--border-light);
    transition: all var(--transition);
}
.file-item:last-child { margin-bottom: 0; }
.file-item:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.file-icon { font-size: 1.3rem; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-meta {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-top: 0.2rem;
    flex-wrap: wrap;
}
.file-meta-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
}
.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition);
    flex-shrink: 0;
}
.file-remove:hover { color: var(--error); background: var(--error-bg); }
.add-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-xs);
    background: transparent;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: inherit;
    transition: all var(--transition);
    margin-top: 0.6rem;
}
.add-more-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Options */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.option-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.option-group label .label-hint {
    font-weight: 400;
    color: var(--text-muted);
    margin-left: 0.25rem;
}
select, input[type="text"], input[type="number"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition);
    outline: none;
}
select:focus, input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

/* Format selector buttons */
.format-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.format-btn {
    padding: 0.6rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-family: inherit;
}
.format-btn:hover { border-color: var(--accent); color: var(--accent); }
.format-btn.active {
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Sync controls */
.sync-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.sync-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-family: inherit;
}
.sync-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.sync-input {
    flex: 1;
    text-align: center;
    font-weight: 600;
}
.sync-unit { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* Search/Replace */
.search-replace-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    align-items: end;
}
.regex-toggle {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-muted);
    transition: all var(--transition);
}
.regex-toggle.active { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

/* Time range */
.time-range-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.5rem;
    align-items: end;
}
.time-range-sep {
    padding-bottom: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Collapsible sections */
.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    padding: 0 0 0.75rem;
}
.collapsible-header .toggle-icon {
    transition: transform var(--transition);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.collapsible-header.open .toggle-icon { transform: rotate(180deg); }
.collapsible-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}
.collapsible-body.open { max-height: 500px; overflow: visible; }

/* Preview */
.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.preview-panel {
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.preview-header {
    padding: 0.6rem 1rem;
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.preview-count {
    font-weight: 400;
    color: var(--text-muted);
}
.preview-body {
    max-height: 400px;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.5;
}
.preview-entry {
    padding: 0.4rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.5rem;
}
.preview-entry:nth-child(even) { background: var(--border-light); }
.preview-entry:hover { background: var(--accent-bg); }
.preview-idx {
    color: var(--text-muted);
    text-align: right;
    padding-right: 0.5rem;
    border-right: 1px solid var(--border);
    font-size: 0.7rem;
    padding-top: 0.15rem;
}
.preview-content {}
.preview-time { color: var(--accent); font-size: 0.72rem; }
.preview-text { color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.preview-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

/* Action buttons */
.action-bar {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 12px var(--accent-glow);
    flex: 1;
}
.btn-primary:hover { box-shadow: 0 6px 20px var(--accent-glow); transform: translateY(-1px); }
.btn-primary:disabled {
    background: var(--border);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-secondary:disabled { color: var(--text-muted); cursor: not-allowed; }
.btn-success {
    background: linear-gradient(135deg, var(--success), #34d399);
    color: white;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.3); }

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastIn 0.3s ease forwards;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    color: var(--text-primary);
    max-width: 360px;
    position: relative;
    overflow: hidden;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    animation: toastProgress linear forwards;
}
.toast-success .toast-progress { background: var(--success); }
.toast-error .toast-progress { background: var(--error); }
.toast-info .toast-progress { background: var(--info); }
.toast-warning .toast-progress { background: var(--warning); }

@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes toastProgress { from { width: 100%; } to { width: 0%; } }

/* Features section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2.5rem;
}
.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.feature-card h3 { font-size: 0.85rem; font-weight: 700; margin-bottom: 0.25rem; }
.feature-card p { font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4; }

/* Shortcuts bar */
.shortcuts-bar {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.shortcuts-bar kbd {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin: 0 0.1rem;
    box-shadow: 0 1px 0 var(--border);
}

/* Footer */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: auto;
}
.footer a { color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Utility */
.hidden { display: none !important; }
.disabled { opacity: 0.5; pointer-events: none; }

/* Merge option */
.merge-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--info-bg);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    color: var(--info);
    margin-top: 0.75rem;
}
.merge-option input[type="checkbox"] {
    width: auto;
    accent-color: var(--accent);
}

/* SUP upload progress */
.sup-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}
.sup-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.sup-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}
.sup-progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.5rem; }
    .options-grid { grid-template-columns: 1fr; }
    .preview-container { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .format-selector { grid-template-columns: repeat(2, 1fr); }
    .search-replace-grid { grid-template-columns: 1fr; }
    .time-range-grid { grid-template-columns: 1fr; }
    .time-range-sep { display: none; }
    .action-bar { flex-direction: column; }
    .main { padding: 1rem; }
    .drop-zone { padding: 2rem 1rem; }
    .card { padding: 1rem; }
}
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .header-inner { padding: 0.5rem 1rem; }
}

/* Scrollbar */
.preview-body::-webkit-scrollbar { width: 6px; }
.preview-body::-webkit-scrollbar-track { background: transparent; }
.preview-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.preview-body::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Global drop overlay */
.global-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(99,102,241,0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.global-drop-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.global-drop-overlay-inner {
    background: var(--bg-card-solid);
    border: 3px dashed var(--accent);
    border-radius: var(--radius);
    padding: 3rem 4rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}
.global-drop-overlay-inner .drop-zone-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}
.global-drop-overlay-inner p {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}
.global-drop-overlay-inner .drop-zone-sub {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.85rem;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Tooltip System */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    padding: 6px 12px;
    background: var(--bg-card-solid);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1000;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}
[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 8px);
}
[data-tooltip-pos="bottom-left"]::after {
    bottom: auto;
    top: calc(100% + 8px);
    left: 0;
    transform: translateX(0) scale(0.95);
}
[data-tooltip-pos="bottom-left"]:hover::after,
[data-tooltip-pos="bottom-left"]:focus::after {
    transform: translateX(0) scale(1);
}
[data-tooltip-wrap]::after {
    white-space: normal;
    max-width: 240px;
    text-align: center;
}
@media (max-width: 768px) {
    [data-tooltip]::after { display: none; }
}