:root {
    --bg-main: #0b0d17;
    --bg-card: rgba(23, 27, 44, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(139, 92, 246, 0.3);
    
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    
    --accent: #10b981;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --danger: #ef4444;
    --danger-hover: #dc2626;
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light Theme Variables */
body.light-theme {
    --bg-main: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.88);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(139, 92, 246, 0.4);
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
}

body.light-theme .globe-1 { background: #c084fc; opacity: 0.2; }
body.light-theme .globe-2 { background: #34d399; opacity: 0.2; }
body.light-theme .globe-3 { background: #60a5fa; opacity: 0.2; }

body.light-theme .main-header {
    background: rgba(255, 255, 255, 0.75);
}

body.light-theme .brand h1 {
    background: linear-gradient(to right, #1e1b4b, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-theme .input-wrapper input {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .mode-option {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .mode-option.active {
    background: rgba(139, 92, 246, 0.12);
    border-color: var(--primary);
}

body.light-theme .task-item,
body.light-theme .file-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .btn-secondary,
body.light-theme .btn-paste {
    background: rgba(0, 0, 0, 0.04);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .btn-secondary:hover,
body.light-theme .btn-paste:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-theme .cookie-status-box {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    word-break: keep-all;
    overflow-wrap: break-word;
}

/* Background Animated Orbs */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

/* Custom Image Background Overlay Layer */
.custom-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

body.custom-bg-active .custom-bg-overlay {
    opacity: 1;
}

/* Background Dimming for Readability */
body.custom-bg-active .custom-bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 13, 23, 0.55);
}

body.custom-bg-active.light-theme .custom-bg-overlay::after {
    background: rgba(241, 245, 249, 0.45);
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite alternate;
}

.globe-1 {
    top: -10%;
    left: 20%;
    width: 450px;
    height: 450px;
    background: #7c3aed;
}

.globe-2 {
    bottom: -15%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: #059669;
    animation-delay: -5s;
}

.globe-3 {
    top: 40%;
    left: -10%;
    width: 350px;
    height: 350px;
    background: #3b82f6;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 40px) scale(1.15); }
}

/* Layout */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 100vh;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: rgba(23, 27, 44, 0.5);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.brand h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand p {
    font-size: 13px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.server-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.online {
    background-color: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Cards Shared Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.card-header h2 i {
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

/* Input Form */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-dim);
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 44px 14px 44px;
    background: rgba(15, 18, 30, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 15px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
    background: rgba(15, 18, 30, 0.95);
}

.btn-clear {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;

}

.btn-clear:hover {
    color: var(--text-main);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-paste {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    white-space: nowrap;
}

.btn-paste:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 24px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

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

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

/* Mode Selector */
.mode-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(15, 18, 30, 0.5);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.mode-option:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(15, 18, 30, 0.8);
}

.mode-option.active {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.mode-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-muted);
}

.mode-option.active .mode-icon {
    background: var(--primary);
    color: white;
}

.mode-info {
    display: flex;
    flex-direction: column;
}

.mode-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.mode-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Tasks & Empty State */
.badge {
    background: rgba(139, 92, 246, 0.2);
    color: #c084fc;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 40px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* Task Item Card */
.task-item {
    background: rgba(15, 18, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.task-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-main);
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.task-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 6px;
}

/* Files Grid */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.file-card {
    background: rgba(15, 18, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.file-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-accent);
}

/* Thumbnail Card Styling */
.card-thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(15, 18, 30, 0.8);
    cursor: pointer;
}

.card-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.card-thumb-wrapper:hover .card-thumb-img {
    transform: scale(1.06);
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-thumb-wrapper:hover .thumb-overlay {
    opacity: 1;
}

.thumb-overlay i {
    font-size: 38px;
    color: white;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
    transition: transform 0.2s ease;
}

.card-thumb-wrapper:hover .thumb-overlay i {
    transform: scale(1.15);
}

.card-thumb-wrapper.fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
}

.card-thumb-wrapper.fallback.audio {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
}

.fallback-icon {
    font-size: 36px;
    color: var(--primary);
}

.card-thumb-wrapper.fallback.audio .fallback-icon {
    color: var(--accent);
}

.file-card-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.45;
    word-break: keep-all;
    overflow-wrap: anywhere;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.meta-icon {
    font-size: 13px;
}

.meta-icon.size-icon {
    color: #c084fc;
}

.meta-icon.date-icon {
    color: #38bdf8;
}

body.light-theme .meta-icon.size-icon {
    color: #7c3aed;
}

body.light-theme .meta-icon.date-icon {
    color: #0284c7;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.file-actions .btn {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.82);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    will-change: opacity;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 800px;
    background: #0f121e;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: translateZ(0);
    backface-visibility: hidden;
}

body.light-theme .modal-content {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 4px;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 20px;
}

.modal-body video {
    width: 100%;
    max-height: 75vh;
    border-radius: var(--radius-md);
    outline: none;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.modal-body audio {
    width: 100%;
    border-radius: var(--radius-md);
    outline: none;
}

/* Custom Confirm Modal Styling */
.confirm-modal-content {
    max-width: 440px;
    text-align: center;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 4px;
}

.confirm-modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.confirm-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* Video Editor Modal Styling */
.editor-modal-content {
    max-width: 1280px;
    width: 96vw;
    transition: all 0.25s ease;
}

.editor-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 20px 20px 20px;
    max-height: 88vh;
    overflow-y: auto;
}

.editor-video-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.editor-video-wrapper video {
    width: 100%;
    max-height: 52vh;
    object-fit: contain;
    background: #000;
}

/* Lower Dark Panel (Letterbox Editing Area) */
.editor-bottom-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.bottom-tools-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-time-info {
    display: flex;
    gap: 10px;
}

.time-chip {
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    color: #cbd5e1;
}

.time-chip strong {
    color: #38bdf8;
    font-family: monospace;
    font-size: 14px;
}

.bottom-action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.input-time-box {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.input-time-box label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

.input-time-box input {
    width: 85px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: monospace;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
}

.input-time-box input:focus {
    outline: none;
}

.btn-add-seg {
    padding: 8px 18px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}

/* Added Segments Section */
.bottom-segments-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.segments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #c4b5fd;
}

.shortcuts-hint {
    font-size: 11px;
    color: #94a3b8;
}

.bottom-segments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 130px;
    overflow-y: auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    min-height: 50px;
    align-items: center;
}

.bottom-segments-list .segment-item-card {
    background: rgba(124, 58, 237, 0.25);
    border: 1px solid rgba(167, 139, 250, 0.4);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.bottom-submit-row {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.bottom-submit-row input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
}

.bottom-submit-row button {
    white-space: nowrap;
    padding: 10px 24px;
}

/* Fullscreen Mode override */
.editor-modal-content.fullscreen-editor {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
}

.editor-modal-content.fullscreen-editor .editor-video-wrapper video {
    max-height: 60vh !important;
}

.editor-keyboard-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #e2e8f0;
    justify-content: space-between;
}

.editor-keyboard-tips kbd,
.key-card kbd {
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(167, 139, 250, 0.6);
    border-radius: 4px;
    padding: 2px 7px;
    font-family: monospace;
    font-size: 12px;
    color: #c4b5fd;
    font-weight: 700;
}

body.light-theme .editor-keyboard-tips {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

body.light-theme .editor-keyboard-tips kbd,
body.light-theme .key-card kbd {
    background: #e2e8f0;
    border: 1px solid #94a3b8;
    color: #5b21b6;
    font-weight: 800;
}

body.light-theme .key-card {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Editor Help Modal Styling */
.editor-help-modal-content {
    max-width: 600px;
    width: 90vw;
}

.help-modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
}

.help-section h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}

.help-keys-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.key-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 18, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.key-card kbd {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace;
    color: #38bdf8;
    font-weight: bold;
}

@media (max-width: 576px) {
    .help-keys-grid {
        grid-template-columns: 1fr;
    }
}

.editor-controls-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-muted);
}

.time-display strong {
    color: var(--text-main);
    font-family: monospace;
}

.segment-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.time-input-group {
    display: flex;
    gap: 8px;
}

.time-input-group input,
.editor-output-section input {
    flex: 1;
    padding: 8px 12px;
    background: rgba(15, 18, 30, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 13px;
}

body.light-theme .time-input-group input,
body.light-theme .editor-output-section input {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}

.selected-segments-section h4 {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.segments-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 130px;
    overflow-y: auto;
    padding: 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.empty-segment-text {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    padding: 12px;
}

.segment-item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.segment-item-text {
    font-weight: 600;
}

@media (max-width: 768px) {
    .editor-modal-body {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }
}

.cookie-status-box {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-help {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.file-upload-area {
    text-align: center;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 16px 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    color: var(--text-main);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left: 4px solid var(--accent); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }

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

/* Responsive (Mobile & Tablet) */
@media (max-width: 768px) {
    .app-container {
        padding: 12px 10px;
        gap: 16px;
    }

    .main-header {
        padding: 14px 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .brand {
        gap: 12px;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 10px;
    }

    .brand h1 {
        font-size: 17px;
    }

    .brand p {
        font-size: 12px;
    }

    .header-actions {
        display: flex;
        align-items: center;
        width: 100%;
        gap: 8px;
    }

    .header-actions .btn {
        flex: 1;
        padding: 9px 8px;
        font-size: 13px;
        justify-content: center;
    }

    .server-status {
        padding: 6px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .card-header {
        padding: 14px 16px;
    }

    .card-header h2 {
        font-size: 16px;
    }

    .card-body {
        padding: 16px;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-wrapper input {
        padding: 12px 36px 12px 38px;
        font-size: 14px;
        border-radius: var(--radius-sm);
    }

    .input-icon {
        left: 12px;
        font-size: 14px;
    }

    .btn-paste {
        width: 100%;
        padding: 10px;
        justify-content: center;
    }

    .mode-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .mode-option {
        padding: 12px 14px;
        gap: 12px;
        border-radius: var(--radius-sm);
    }

    .mode-icon {
        width: 38px;
        height: 38px;
        font-size: 16px;
        border-radius: 8px;
    }

    .mode-title {
        font-size: 14px;
    }

    .mode-desc {
        font-size: 11px;
    }

    .btn-lg {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: var(--radius-sm);
    }

    .files-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .file-card {
        padding: 14px;
        gap: 12px;
        border-radius: var(--radius-sm);
    }

    .file-actions {
        gap: 6px;
    }

    .file-actions .btn {
        padding: 9px 6px;
        font-size: 12px;
    }

    .modal-content {
        max-width: 95vw;
        border-radius: var(--radius-md);
    }

    .modal-body {
        padding: 16px;
    }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 16px;
    }
}
