/* ============================================================================
   Streams Prefetcher - Stylesheet
   Modern, clean, and lightweight design
   ============================================================================ */

/* Variables - DARK Dark Theme (Eye-Friendly) */
:root {
    --primary-color: #1e40af;
    --primary-glow: rgba(30, 64, 175, 0.5);
    --secondary-color: #1e3a8a;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --warning-bg: #7c2d0c;
    --info-color: #1e40af;
    --info-bg: #0c2d5e;
    --dark-bg: #000000;
    --card-bg: #0a0a0a;
    --card-hover-bg: #0f1419;
    --border-color: #1e293b;
    --text-color: #e5e7eb;
    --text-muted: #6b7280;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.8), 0 0 20px rgba(30, 64, 175, 0.1);
    --transition: all 0.3s ease;
    --input-bg: #0f1419;
    --input-border: #1e293b;
    --primary-color-rgb: 30, 64, 175;
    --cyber-accent: rgba(30, 64, 175, 0.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--dark-bg);
    min-height: 100vh;
    padding: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Header */
header {
    background: linear-gradient(135deg, #0a0e1a, #0f1624, #0a0e1a);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Cyberpunk scan line effect - STATIC (no animation) */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 150, 255, 0.05) 0%,
        transparent 2%,
        transparent 98%,
        rgba(0, 150, 255, 0.05) 100%
    );
    pointer-events: none;
    opacity: 0.4;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;

    /* Epic neon glow effect - STATIC (no animation for performance) */
    color: #00a8d4;
    text-shadow:
        0 0 10px rgba(0, 168, 212, 0.9),
        0 0 20px rgba(0, 168, 212, 0.6),
        0 0 40px rgba(0, 100, 200, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.8);

    /* Performance hint */
    will-change: auto;
}

/* Animated lightning emoji with white pulsating glow */
.lightning-emoji {
    display: inline-block;
    animation: lightningPulse 2s ease-in-out infinite;
}

@keyframes lightningPulse {
    0%, 100% {
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.6))
                drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1))
                drop-shadow(0 0 15px rgba(255, 255, 255, 0.8))
                drop-shadow(0 0 20px rgba(200, 230, 255, 0.5));
    }
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Card Sections */
.card {
    padding: 30px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 0 10px rgba(30, 64, 175, 0.05);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 20px rgba(30, 64, 175, 0.1);
}

.card:last-of-type {
    border-bottom: none;
}

.card h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.75rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
    position: relative;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    padding: 6px;
    position: relative;
    transition: all 0.3s ease;
    min-width: 32px;
    min-height: 32px;
    overflow: visible;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    filter: drop-shadow(0 0 4px rgba(30, 64, 175, 0.3));
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow: visible;
}

.info-icon:hover svg {
    color: #3b82f6;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.8));
    transform: rotate(15deg) scale(1.1);
}

.info-tooltip {
    position: fixed;
    background: rgba(10, 10, 10, 0.98);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 14px;
    min-width: 250px;
    max-width: 350px;
    z-index: 10000;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-color);
    box-shadow: 0 8px 24px rgba(0,0,0,0.8),
                0 0 20px rgba(30, 64, 175, 0.4);
    display: none;
    white-space: pre-line;
    font-weight: normal;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-tooltip.active {
    display: block;
    animation: tooltipFadeIn 0.3s ease forwards;
}

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

.info-tooltip::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
}

.info-tooltip.below::before {
    bottom: 100%;
    border-bottom-color: var(--primary-color);
    filter: drop-shadow(0 -2px 4px rgba(30, 64, 175, 0.3));
}

.info-tooltip.above::before {
    top: 100%;
    border-top-color: var(--primary-color);
    filter: drop-shadow(0 2px 4px rgba(30, 64, 175, 0.3));
}

/* Close button for tooltips */
.tooltip-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

.tooltip-close:hover {
    background: #c82333;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    background: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--card-hover-bg);
    box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.2);
}

.help-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Time Input */
.time-input {
    display: flex;
    gap: 10px;
}

.time-input input {
    flex: 1;
}

.time-input select {
    flex: 1;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    cursor: pointer;
    width: auto;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

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

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 30px var(--primary-glow);

    background: var(--secondary-color);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--dark-bg);
}

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

.btn-success:hover:not(:disabled) {
    background: #218838;
}

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

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

/* Checkbox Label for Unlimited */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-label:hover {
    color: var(--primary-color);
}

input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--dark-bg);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-sm:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-sm:active:not(:disabled) {
    transform: translateY(0);
}

/* Addon URL Sections */
.addon-url-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.addon-section {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    background: var(--input-bg);
}

.addon-section h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1rem;
}

.addon-list {
    min-height: 100px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.addon-item {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 16px 20px;
    cursor: move;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.addon-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.addon-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.25), 0 6px 12px rgba(139, 92, 246, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.addon-item:hover::before {
    opacity: 1;
}

.addon-item.dragging {
    opacity: 0.5;
}

.addon-item .drag-handle {
    cursor: move;
    color: #a5b4fc;
    font-size: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.2s;
    padding-top: 4px;
}

.addon-item:hover .drag-handle {
    color: #c7d2fe;
}

.addon-item-editing {
    cursor: default !important;
}

.addon-item-editing .drag-handle-disabled {
    cursor: not-allowed !important;
    opacity: 0.3;
    pointer-events: none;
}

.addon-item .addon-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.addon-item .addon-url-input {
    width: 100%;
    position: relative;
    z-index: 1;
}

.addon-item .addon-name-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.addon-item .addon-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.addon-item .addon-display-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    flex: 1;
}

.addon-item .addon-actions {
    display: flex;
    gap: 10px;
}

.btn-addon-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    margin-top: 8px;
}

.btn-addon-add svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.btn-addon-add:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.addon-item .edit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    position: relative;
    z-index: 1;
}

.addon-item .edit-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.addon-item .edit-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.addon-item .remove-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    position: relative;
    z-index: 1;
}

.addon-item .remove-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.addon-item .remove-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Mobile Responsive Styles for Addons */
@media (max-width: 768px) {
    .addon-item {
        padding: 12px 16px;
        gap: 12px;
    }

    .addon-item .drag-handle {
        font-size: 18px;
    }

    .addon-item .addon-content {
        gap: 10px;
    }

    .addon-item .addon-name-row {
        gap: 10px;
    }

    .addon-item .addon-logo {
        width: 36px;
        height: 36px;
    }

    .addon-item .addon-display-name {
        font-size: 17px;
    }

    .addon-item .addon-actions {
        gap: 6px;
    }

    .addon-item .edit-btn,
    .addon-item .remove-btn {
        flex: 1;
        justify-content: center;
        padding: 10px;
        font-size: 12px;
    }

    .addon-item .edit-btn svg,
    .addon-item .remove-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Catalog Button Grid */
.catalog-button-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* Mobile: 2x2 grid */
@media (max-width: 768px) {
    .catalog-button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Catalog List */
.catalog-list {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    background: var(--input-bg);
    max-height: 400px;
    overflow-y: auto;
}

.catalog-item {
    background: var(--card-hover-bg);
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    cursor: move;
    display: flex;
    align-items: center;
    gap: 12px;
}

.catalog-item:hover {
    border-color: var(--primary-color);
}

.catalog-item.dragging {
    opacity: 0.5;
}

.catalog-item input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.catalog-item .catalog-info {
    flex: 1;
}

.catalog-item .catalog-name {
    font-weight: 600;
}

.catalog-item .catalog-name .item-type-badge {
    margin-left: 8px;
}

.catalog-item .catalog-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.catalog-item .addon-badge {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
}

.catalog-item .drag-handle {
    cursor: move;
    color: var(--text-muted);
    font-size: 18px;
}

/* Status Boxes */
.status-box {
    padding: 20px;
    border-radius: 8px;
    border: 2px solid;
}

.status-idle {
    background: var(--input-bg);
    border-color: var(--border-color);
}

.status-scheduled {
    background: rgba(88, 166, 255, 0.1);
    border-color: var(--info-color);
}

.status-running {
    background: rgba(210, 153, 34, 0.1);
    border-color: var(--warning-color);
}

.status-completed {
    background: rgba(46, 160, 67, 0.1);
    border-color: var(--success-color);
}

.status-box h3 {
    margin-bottom: 10px;
}

/* Progress Info */
#progress-info {
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.progress-bar {
    height: 25px;
    background: var(--input-bg);
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
    border: 1px solid var(--border-color);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Live Output */
.live-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Info Box */
.info-box {
    background: var(--input-bg);
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid var(--info-color);
    border: 1px solid var(--border-color);
}

/* Footer */
footer {
    background: var(--input-bg);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border-color);
}

/* Loading Spinner */
.spinner {
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    right: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

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

.notification-success {
    background: var(--success-color);
}

.notification-error {
    background: var(--danger-color);
}

.notification-info {
    background: var(--info-color);
}

/* Save Notification - Polished Design */
.save-notification {
    position: fixed;
    right: 24px;
    background: rgba(20, 25, 35, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.1);
    z-index: 1001;
    min-width: 280px;
    max-width: 320px;
    animation: slideInSave 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes slideInSave {
    from {
        transform: translateX(120%) translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutSave {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%) translateY(10px);
        opacity: 0;
    }
}

.save-notification-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #2563eb);
}

.save-notification-content {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.save-notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.save-notification-body {
    flex: 1;
    min-width: 0;
}

.save-notification-title {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.save-notification-message {
    color: #9ca3af;
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}

.save-notification-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(59, 130, 246, 0.15);
}

.save-notification-btn {
    flex: 1;
    background: rgba(30, 64, 175, 0.15);
    border: 1px solid rgba(30, 64, 175, 0.3);
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(30, 64, 175, 0.2);
}

.save-notification-btn:hover {
    background: rgba(30, 64, 175, 0.25);
    border-color: rgba(30, 64, 175, 0.5);
    color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(30, 64, 175, 0.3);
}

.save-notification-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 6px rgba(30, 64, 175, 0.2);
}

.save-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #1e40af, #2563eb);
    animation: progressBar 1s linear;
    transform-origin: left;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

@keyframes progressBarError {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Error Notification (Red version of save notification) */
.error-notification {
    position: fixed;
    right: 24px;
    bottom: 24px;
    background: rgba(20, 25, 35, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.1);
    z-index: 1001;
    min-width: 320px;
    max-width: 380px;
    animation: slideInSave 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.error-notification-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.error-notification-content {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.error-notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.error-notification-body {
    flex: 1;
    min-width: 0;
}

.error-notification-title {
    color: #fca5a5;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.error-notification-message {
    color: #e5e7eb;
    font-size: 12px;
    margin: 0;
    line-height: 1.5;
}

.error-notification-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(239, 68, 68, 0.15);
}

.error-notification-btn {
    flex: 1;
    background: rgba(185, 28, 28, 0.15);
    border: 1px solid rgba(185, 28, 28, 0.3);
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 0 8px rgba(185, 28, 28, 0.2);
}

.error-notification-btn:hover {
    background: rgba(185, 28, 28, 0.25);
    border-color: rgba(185, 28, 28, 0.5);
    color: #fca5a5;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(185, 28, 28, 0.3);
}

.error-notification-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 6px rgba(185, 28, 28, 0.2);
}

.error-notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #b91c1c, #ef4444);
    animation: progressBarError 5s linear;
    transform-origin: left;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .card {
        padding: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .addon-url-sections {
        grid-template-columns: 1fr;
    }

    .notification {
        right: 10px;
        left: 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--input-bg);
}

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

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

/* ============================================================================
   Modern Job Status UI
   ============================================================================ */

.job-status-card {
    overflow: visible;
}

.status-display {
    padding: 40px 30px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--input-bg) 100%);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.status-icon-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.status-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.idle-icon {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.15) 0%, rgba(30, 58, 138, 0.15) 100%);
    border: 2px solid rgba(30, 64, 175, 0.3);
    color: var(--primary-color);
}

.scheduled-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: var(--info-color);
}

.running-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.15) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: var(--success-color);
    animation: pulse 2s ease-in-out infinite;
}

.paused-icon {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
    border: 2px solid rgba(251, 146, 60, 0.4);
    color: #fb923c;
    animation: pausedPulse 2s ease-in-out infinite;
}

@keyframes pausedPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px 3px rgba(251, 146, 60, 0.3);
    }
}

/* Icon transition animation for pause/resume */
.icon-transitioning {
    animation: iconMorph 0.4s ease-out;
}

@keyframes iconMorph {
    0% {
        opacity: 0.3;
        transform: scale(0.8) rotate(-90deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.completed-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(22, 163, 74, 0.2) 100%);
    border: 2px solid rgba(34, 197, 94, 0.4);
    color: var(--success-color);
}

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

.spinner-ring {
    position: absolute;
    width: 88px;
    height: 88px;
    border: 3px solid transparent;
    border-top-color: var(--success-color);
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.status-message h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
}

.status-message p {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Modern Buttons */
.btn-modern {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    min-height: 49px;
    height: 49px;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-start {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
    animation: buttonGlow 3s ease-in-out infinite;
}

@keyframes buttonGlow {
    0%, 100% {
        box-shadow:
            0 4px 15px rgba(30, 64, 175, 0.4),
            0 0 5px rgba(30, 64, 175, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow:
            0 4px 15px rgba(30, 64, 175, 0.5),
            0 0 12px rgba(30, 120, 255, 0.4),
            0 0 20px rgba(30, 120, 255, 0.2);
        transform: scale(1.02);
    }
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.6);
    animation: none; /* Stop pulsing on hover */
}

.btn-start:disabled {
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-terminate {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    flex: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.btn-terminate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

.btn-terminate.terminating {
    pointer-events: all;
    cursor: pointer;
}

.btn-terminate.pulsating {
    animation: pulse-terminate var(--pulse-duration, 2s) ease-in-out infinite;
}

@keyframes pulse-terminate {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.08);
        filter: brightness(1.15);
    }
}

/* Pause Button - Neutral Gray */
.btn-pause {
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.2) 0%, rgba(71, 85, 105, 0.2) 100%);
    border: 2px solid rgba(100, 116, 139, 0.4);
    color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
    flex: 1;
}

.btn-pause:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.5);
    border-color: rgba(148, 163, 184, 0.6);
    background: linear-gradient(135deg, rgba(100, 116, 139, 0.25) 0%, rgba(71, 85, 105, 0.25) 100%);
}

.btn-pause:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Resume Button - Success Green */
.btn-resume {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 2px solid #059669;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    animation: buttonGlowGreen 3s ease-in-out infinite;
    flex: 1;
}

.btn-resume:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.btn-resume:disabled {
    background: linear-gradient(135deg, #4a4a4a 0%, #3a3a3a 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    animation: none;
}

@keyframes buttonGlowGreen {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(16, 185, 129, 0.7);
    }
}

/* Running Status Header */
.status-header-running {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.running-status-text h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.current-action {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Currently Prefetching Item with RPDB Poster */
.currently-prefetching {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 30px auto;
    padding: 0;
    max-width: 300px;
}

.poster-container {
    position: relative;
    width: 180px;
    height: 270px; /* 2:3 aspect ratio */
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 800ms ease-in-out;
}

.current-poster.visible {
    opacity: 1;
}

.item-info {
    text-align: center;
    width: 100%;
}

.item-title-year {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    word-wrap: break-word;
}

.item-episode {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.item-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    margin-top: 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Movie type badge - Blue color (default) */
.item-type-badge.movie {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

/* Series type badge - Purple color */
.item-type-badge.series {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c4b5fd;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-color: rgba(168, 85, 247, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 32px;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
    margin-bottom: 2px;
}

.stat-limit {
    font-size: 11px;
    color: var(--text-muted);
}

/* Progress Section */
.progress-section {
    margin-bottom: 24px;
    text-align: left;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.catalog-name-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-percentage {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-track {
    height: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    transition: width 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255,255,255,0.3) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Schedule Info */
.schedule-info {
    margin-top: 16px;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.8;
}

.schedule-info strong {
    color: var(--primary-color);
}

/* Countdown Timer */
.countdown-timer {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-top: 4px;
    display: inline-block;
    padding: 4px 16px;
    border-radius: 12px;
    background: transparent;
}

.countdown-pulsing {
    animation: countdown-pulse var(--pulse-duration, 2000ms) ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .status-display {
        padding: 30px 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-header-running {
        flex-direction: column;
        text-align: center;
    }
    
    .running-status-text {
        text-align: center;
    }
}

/* Page Fetching Status */
.page-fetch-status {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    animation: fadeIn 0.3s ease-out, pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59, 130, 246, 0);
    }
}

.page-fetch-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 50%;
    color: rgb(59, 130, 246);
}

.page-fetch-icon svg.rotating {
    animation: rotate 2s linear infinite;
}

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

.page-fetch-details {
    flex: 1;
}

.page-fetch-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.page-fetch-title span {
    color: rgb(59, 130, 246);
    font-weight: 700;
}

.page-fetch-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.page-fetch-items {
    font-size: 14px;
    font-weight: 600;
    color: #1e40af;
    display: inline-block;
    padding: 4px 12px;
    background: rgba(30, 64, 175, 0.15);
    border-radius: 20px;
    animation: fadeIn 0.3s ease-out;
}

/* Collapsible Section Styles */
.section-header-collapsible {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.section-header-collapsible:hover {
    background: rgba(255, 255, 255, 0.03);
}

.collapse-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
    color: var(--primary-color);
    order: -1;
}

.collapse-icon:not(.collapsed) {
    /* When expanded, rotate right arrow to point down */
    transform: rotate(90deg);
}

.collapsible-content {
    max-height: 10000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Config Subsections */
.config-subsection {
    margin-bottom: 30px;
    margin-left: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.config-subsection:last-of-type {
    border-bottom: none;
}

.subsection-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subsection-header-collapsible {
    cursor: pointer;
    user-select: none;
    padding: 10px;
    margin: -10px;
    margin-bottom: 5px;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.subsection-header-collapsible:hover {
    background: rgba(255, 255, 255, 0.03);
}

.subsection-content {
    padding-left: 10px;
}

/* Make subsection arrows smaller than main section arrows */
.subsection-header-collapsible .collapse-icon {
    font-size: 16px;
}

/* Smaller toggle switches for subsection headers (60% of normal size) */
.subsection-title .toggle-switch {
    width: 36px;
    height: 17px;
}

.subsection-title .toggle-slider {
    border-radius: 17px;
}

.subsection-title .toggle-slider:before {
    height: 12px;
    width: 12px;
    left: 2.5px;
    bottom: 2.5px;
}

.subsection-title input:checked + .toggle-slider:before {
    transform: translateX(19px);
}

/* Smooth Transitions */
.status-display {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scheduling Section */
.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.scheduling-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.4s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--success-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(32px);
}

/* Schedules List */
.schedules-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 50%;
}

.schedule-item {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.schedule-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.3s;
}

.schedule-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.25), 0 6px 12px rgba(139, 92, 246, 0.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.schedule-item:hover::before {
    opacity: 1;
}

.schedule-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.schedule-time-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.schedule-clock-icon {
    color: var(--primary-color);
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.schedule-time {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.schedule-days-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 36px;
}

.schedule-day-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #a5b4fc;
    transition: all 0.2s;
}

.schedule-day-badge:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.schedule-day-badge.all-days {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    border-color: rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    padding: 6px 14px;
    font-size: 13px;
}

.schedule-actions {
    display: flex;
    gap: 10px;
    margin-left: 16px;
}

.btn-schedule-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-schedule-action.edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.btn-schedule-action.edit:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.25));
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-schedule-action.delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.btn-schedule-action.delete:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(220, 38, 38, 0.25));
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Mobile Responsive Styles for Schedule */
@media (max-width: 768px) {
    .schedules-list {
        max-width: 100%;
    }

    .schedule-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .schedule-left {
        width: 100%;
        gap: 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .schedule-time-display {
        gap: 8px;
    }

    .schedule-clock-icon {
        width: 20px;
        height: 20px;
    }

    .schedule-time {
        font-size: 18px;
    }

    .schedule-days-container {
        margin-left: 12px;
        gap: 4px;
    }

    .schedule-day-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .schedule-day-badge.all-days {
        font-size: 12px;
        padding: 5px 12px;
    }

    .schedule-actions {
        width: 100%;
        margin-left: 0;
        gap: 6px;
    }

    .btn-schedule-action {
        flex: 1;
        justify-content: center;
        padding: 10px;
        font-size: 12px;
    }

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

    /* RPDB Poster mobile responsiveness */
    .currently-prefetching {
        margin: 20px auto;
        padding: 16px;
    }

    .item-title-year {
        font-size: 15px;
    }

    .item-episode {
        font-size: 13px;
    }

    .item-type-badge {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* Legacy classes for backwards compatibility */
.schedule-info {
    flex: 1;
}

.schedule-days {
    font-size: 14px;
    color: var(--text-muted);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.btn-icon:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-icon.edit:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(30, 64, 175, 0.1);
    box-shadow: 0 0 15px rgba(30, 64, 175, 0.3);
}

.btn-icon.edit:hover svg {
    transform: rotate(-5deg);
}

.btn-icon.delete:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-icon.delete:hover svg {
    transform: scale(1.1);
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text-color);
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

/* Days Selection */
.days-selection {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-checkbox {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.day-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.day-checkbox span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.day-checkbox:has(input:checked) {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
}

.day-checkbox:has(input:checked) span {
    color: var(--primary-color);
    font-weight: 600;
}

.day-checkbox:hover {
    border-color: var(--primary-color);
}

/* Empty State */
.empty-schedules {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-schedules svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* ============================================================================
   COMPLETION UI STYLES
   ============================================================================ */

.completion-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.completion-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

.completion-section {
    margin-bottom: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.completion-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Timing Grid */
.timing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.timing-card {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.timing-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.timing-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.timing-value.highlight {
    color: white;
    font-size: 20px;
}

/* Statistics Summary Grid */
.stats-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.summary-stat {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.summary-stat:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(var(--primary-color-rgb), 0.2);
}

.summary-stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.summary-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.summary-stat-value.highlight {
    color: var(--success-color);
}

.summary-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rate Cards */
.rate-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.rate-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.rate-value {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.rate-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

/* Catalog Details Table */
.catalog-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.catalog-details-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--input-bg);
}

.catalog-details-table thead {
    background: var(--card-hover-bg);
}

.catalog-details-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.catalog-details-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.catalog-details-table tbody tr:last-child td {
    border-bottom: none;
}

.catalog-details-table tbody tr:hover {
    background: var(--card-hover-bg);
}

.catalog-details-table .catalog-name {
    font-weight: 500;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-details-table .success-count {
    color: var(--success-color);
    font-weight: 600;
}

.catalog-details-table .failed-count {
    color: var(--danger-color);
    font-weight: 600;
}

.catalog-details-table .cached-count {
    color: var(--warning-color);
    font-weight: 600;
}

/* Completion Actions */
.completion-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timing-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rate-cards {
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 250px;
    }

    .catalog-details-table {
        font-size: 12px;
    }

    .catalog-details-table th,
    .catalog-details-table td {
        padding: 8px 12px;
    }
}

/* ============================================================================
   Reset to Defaults Section
   ============================================================================ */

.reset-section {
    padding: 40px 30px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.btn-reset {
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 600;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

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

.btn-reset.resetting {
    pointer-events: all;
    cursor: pointer;
}

/* Smooth progressive pulsating animation using CSS variables */
@keyframes pulse-reset {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.08);
        filter: brightness(1.15);
    }
}

.btn-reset.pulsating {
    animation: pulse-reset var(--pulse-duration, 2s) ease-in-out infinite;
}
/* ============================================================================
   Error/Failed State
   ============================================================================ */

.status-failed {
    animation: fadeIn 0.4s ease-out;
}

.error-header {
    text-align: center;
    margin-bottom: 40px;
}

.error-icon {
    color: #ef4444;
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.4));
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.error-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 20px 0 8px 0;
}

.error-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: 0;
}

.error-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.error-details-card,
.error-help-card {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.error-details-card:hover,
.error-help-card:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.15);
}

.error-details-header,
.error-help-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: #ef4444;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-details-header svg,
.error-help-header svg {
    flex-shrink: 0;
}

.error-message {
    background: rgba(0, 0, 0, 0.3);
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #fca5a5;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 12px;
}

.error-timestamp {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

.error-suggestions {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.error-suggestions li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

.error-suggestions li::before {
    content: "→";
    color: #ef4444;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Technical Details Section */
.error-technical-section {
    margin-top: 20px;
}

.error-expand-btn {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 16px 20px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.error-expand-btn:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateX(2px);
}

.error-expand-btn svg {
    transition: transform 0.3s ease;
    color: #ef4444;
    flex-shrink: 0;
}

.error-technical-content {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    padding: 20px;
}

.error-type-display {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.08);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-color);
}

.error-type-display strong {
    color: #ef4444;
    margin-right: 8px;
}

.error-traceback-container {
    margin-bottom: 20px;
}

.error-traceback-header {
    margin-bottom: 12px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
}

.error-traceback {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #fca5a5;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
    max-height: 400px;
    overflow-y: auto;
}

.error-traceback::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.error-traceback::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.error-traceback::-webkit-scrollbar-thumb {
    background: rgba(239, 68, 68, 0.4);
    border-radius: 4px;
}

.error-traceback::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 68, 68, 0.6);
}

.error-config-container {
    margin-bottom: 20px;
}

.error-config-header {
    margin-bottom: 12px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
}

.error-config-snapshot {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    padding: 16px;
}

.error-config-snapshot .config-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.error-config-snapshot .config-list li {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
}

.error-config-snapshot .config-list li strong {
    color: #fca5a5;
    margin-right: 6px;
}

.btn-copy-error {
    width: 100%;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px 20px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-copy-error:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-copy-error svg {
    flex-shrink: 0;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn-error-dismiss {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-error-dismiss:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.btn-error-dismiss:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================================
   LOG VIEWER SECTION
   ============================================================================ */

.log-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 15px;
}

.log-list {
    height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.3);
}

.log-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.log-item:last-child {
    border-bottom: none;
}

.log-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.log-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.log-item-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.log-chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
}

.log-chip-time {
    background: rgba(71, 85, 105, 0.5);
    color: #e2e8f0;
}

.log-chip-date {
    background: rgba(30, 64, 175, 0.3);
    color: #93c5fd;
}

.log-viewer-window {
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.log-filename {
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    padding: 12px 15px;
    background: rgba(30, 64, 175, 0.3);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    font-family: 'Courier New', monospace;
}

.log-content {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(15, 23, 42, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    color: #cbd5e1;
    white-space: pre-wrap;
    word-break: break-word;
    box-sizing: border-box;
    margin: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Collapsible Warning Boxes */
.collapsible-warning-box {
    border-radius: 8px;
    margin: 12px 0;
    border-left: 4px solid;
    overflow: hidden;
    transition: var(--transition);
}

.info-box-collapsible {
    background: linear-gradient(135deg, var(--info-bg) 0%, rgba(12, 45, 94, 0.4) 100%);
    border-left-color: var(--info-color);
}

.warning-box-collapsible {
    background: linear-gradient(135deg, var(--warning-bg) 0%, rgba(124, 45, 12, 0.4) 100%);
    border-left-color: var(--warning-color);
}

.warning-box-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.warning-box-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-box-collapsible .warning-box-header strong {
    color: #bfdbfe;
    font-size: 14px;
}

.warning-box-collapsible .warning-box-header strong {
    color: #fed7aa;
    font-size: 14px;
}

.warning-box-icon-small {
    font-size: 18px;
    flex-shrink: 0;
}

.warning-collapse-icon {
    font-size: 12px;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.6);
}

.warning-collapse-icon.expanded {
    transform: rotate(90deg);
}

.warning-box-collapsible-content {
    padding: 0 18px 16px 18px;
    font-size: 14px;
    line-height: 1.6;
}

.info-box-collapsible .warning-box-collapsible-content {
    color: #bfdbfe;
}

.warning-box-collapsible .warning-box-collapsible-content {
    color: #fed7aa;
}

.warning-box-collapsible-content p {
    margin: 0 0 12px 0;
}

.warning-box-collapsible-content ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.warning-box-collapsible-content li {
    margin: 6px 0;
}

.warning-box-collapsible-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.collapsible-warning-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Timezone Mismatch Banner - Warning Design with Urgency */
.timezone-mismatch-banner {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.12) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeInBannerUrgent 0.5s ease-out;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(239, 68, 68, 0.2);
}

.timezone-mismatch-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.35);
    border-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(220, 38, 38, 0.15) 100%);
}

.timezone-banner-icon {
    font-size: 24px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-radius: 50%;
    animation: pulseGlowWarning 2s ease-in-out infinite;
}

.timezone-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timezone-banner-title {
    font-size: 15px;
    font-weight: 700;
    color: #fca5a5;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.timezone-banner-message {
    font-size: 14px;
    line-height: 1.5;
    color: #fecaca;
}

.timezone-banner-message strong {
    color: #fca5a5;
    font-weight: 700;
}

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

@keyframes pulseGlowWarning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 5px rgba(239, 68, 68, 0.4);
        transform: scale(1.05);
    }
}
