/* --- THEME: DARKISH AESTHETIC ENHANCED (STATIC VERSION - NO GLOW) --- */
:root {
    --bg-primary: #0D0D0D;
    --bg-secondary: #1A1A1A;
    --bg-tertiary: #252525;
    --border-color: #333333;
    --border-color-light: #4A4A4A;
    --text-primary: #E8E8E8;
    --text-secondary: #B0B0B0;
    --text-tertiary: #777777;
    --accent-primary: #8A2BE2;
    --accent-primary-dark: #6A1B9A;
    --accent-primary-rgb: 138, 43, 226;
    --accent-primary-text: #FFFFFF;

    --status-success: #28a745;
    --status-success-light: rgba(40, 167, 69, 0.2);
    --status-success-rgb: 40, 167, 69;
    --status-success-text: #ffffff;
    --status-success-on-dark: var(--status-success);

    --status-live: #9370DB;
    --status-warning: #ff9800;
    --status-live-light: rgba(147, 112, 219, 0.2);
    --status-live-rgb: 147, 112, 219;
    --status-live-text: #FFFFFF;
    --status-live-on-dark: var(--status-live);

    --status-declined: #dc3545;
    --status-danger: #dc3545;
    --status-declined-light: rgba(220, 53, 69, 0.2);
    --status-declined-rgb: 220, 53, 69;
    --status-declined-text: #ffffff;
    --status-declined-on-dark: var(--status-declined);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-full: 999px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.7);
    --shadow-accent: 0 0 12px rgba(var(--accent-primary-rgb), 0.5);
    --scrollbar-thumb-color: #555;
    --scrollbar-track-color: var(--bg-primary);
    --scrollbar-thumb-hover-color: var(--accent-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hero-title {
    text-align: center;
    position: relative;
    z-index: 10;
}

.main-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.5rem;
    -webkit-text-stroke: 2px red;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.secondary-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-bottom: 0.5rem;
    -webkit-text-stroke: 1px red;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.title-underline {
    width: 200px;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--accent-primary), transparent);
    margin: 0 auto;
}

html {
    font-size: 100%;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1a1a 50%, var(--bg-primary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
    font-weight: 400;
    font-size: 13px;
}

.card {
    background: rgba(30, 30, 30, 0.95);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    position: relative;
    z-index: 5;
}

.card:hover {
    border-color: var(--border-color-light);
}

.card:first-child {
    margin-top: 0;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.black-vatican {
    background-color: rgba(18, 18, 18, 0.95);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Statistics Dashboard */
.stats-dashboard {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
}

.stats-grid {
    gap: 1rem;
}

.stat-box {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.stat-box:hover {
    border-color: var(--accent-primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-size: 1.5rem;
}

.success-icon {
    background: var(--status-success-light);
    color: var(--status-success);
}

.vbv-icon {
    background: var(--status-live-light);
    color: var(--status-live);
}

.dead-icon {
    background: var(--status-declined-light);
    color: var(--status-declined);
}

.rate-icon {
    background: rgba(var(--accent-primary-rgb), 0.2);
    color: var(--accent-primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box-small {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.stat-value-small {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--accent-primary);
}

.stat-label-small {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

/* Buttons */
.btn {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.btn-success {
    background: linear-gradient(135deg, var(--status-success) 0%, #20c997 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--status-warning) 0%, #ffc107 100%);
    border: none;
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, var(--status-declined) 0%, #c82333 100%);
    border: none;
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-dark) 100%);
    border: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    border: none;
}

.btn-outline-light {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.btn-outline-light:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Controls */
.form-control {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.form-control:focus {
    background: var(--bg-primary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--accent-primary-rgb), 0.25);
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

/* Worker Settings */
.worker-control {
    margin-bottom: 1rem;
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.form-range {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

.form-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

.form-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
}

.worker-value {
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 30px;
    text-align: center;
}

.checking-status {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.status-value {
    color: var(--text-primary);
    font-weight: bold;
}

.status-badge {
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: bold;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--accent-primary);
    width: 0%;
    border-radius: var(--radius-full);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--text-primary);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

/* Card Count Badge */
.card-count-badge {
    background: rgba(var(--accent-primary-rgb), 0.2);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(var(--accent-primary-rgb), 0.3);
}

/* Result Cards */
.result-card {
    opacity: 1;
}

#success-div, #vbv-div, #dead-div {
    font-size: 0.85em;
    color: white;
    opacity: 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

#success-div.show, #vbv-div.show, #dead-div.show {
    opacity: 1;
}

#success-div > div, #vbv-div > div, #dead-div > div {
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

#success-div > div {
    border-left-color: var(--status-success);
}

#success-div > div:hover {
    background: rgba(var(--status-success-rgb), 0.1);
}

#vbv-div > div {
    border-left-color: var(--status-live);
}

#vbv-div > div:hover {
    background: rgba(var(--status-live-rgb), 0.1);
}

#dead-div > div {
    border-left-color: var(--status-declined);
}

#dead-div > div:hover {
    background: rgba(var(--status-declined-rgb), 0.1);
}

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.info-success {
    background: var(--status-success);
    color: white;
}

.info-vbv {
    background: var(--status-live);
    color: white;
}

.info-dead {
    background: var(--status-declined);
    color: white;
}

/* Button Pressed State */
.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
}

.material-symbols-outlined {
    font-size: 1.2rem;
}

#success-show-btn.pressed, #vbv-show-btn.pressed, #dead-show-btn.pressed {
    background-color: rgba(var(--accent-primary-rgb), 0.3);
    border-color: var(--accent-primary);
}

/* Modal Styling */
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

.btn-close-white {
    filter: invert(1);
}

/* Scrollbar styling */
#success-div::-webkit-scrollbar,
#vbv-div::-webkit-scrollbar,
#dead-div::-webkit-scrollbar {
    width: 8px;
}

#success-div::-webkit-scrollbar-track,
#vbv-div::-webkit-scrollbar-track,
#dead-div::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

#success-div::-webkit-scrollbar-thumb,
#vbv-div::-webkit-scrollbar-thumb,
#dead-div::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb-color);
    border-radius: 10px;
}

#success-div::-webkit-scrollbar-thumb:hover,
#vbv-div::-webkit-scrollbar-thumb:hover,
#dead-div::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover-color);
}

/* SweetAlert2 Custom Styling */
.swal2-popup {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.swal2-title {
    color: var(--accent-primary) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background-color: var(--status-success) !important;
    border: none !important;
}

.swal2-cancel {
    background-color: var(--status-declined) !important;
    border: none !important;
}

/* Custom Tabs */
.custom-tabs {
    background: transparent;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 0;
}

.custom-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    border-bottom: 3px solid transparent;
}

.custom-tabs .nav-link:hover {
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.1);
}

.custom-tabs .nav-link.active {
    color: var(--accent-primary);
    background: rgba(var(--accent-primary-rgb), 0.15);
    border-bottom-color: var(--accent-primary);
}

.tab-content {
    position: relative;
    z-index: 5;
}

/* Responsive design */
@media (max-width: 768px) {
    .card,
    .card-header,
    .card-body,
    .btn,
    .nav-link,
    .tab-content,
    .tab-pane {
        position: relative;
        z-index: 1;
    }

    .row.mt-2 > [class*="col"],
    .row.mb-2 > [class*="col"] {
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
        margin-bottom: 0.35rem;
    }

    .row.mt-2 .btn,
    .row.mb-2 .btn {
        min-height: 38px;
        white-space: nowrap;
        touch-action: manipulation;
        pointer-events: auto;
    }

    .d-flex.gap-2 .btn {
        min-width: 38px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .container {
        padding: 0 10px;
    }

    .row.mx-7 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .custom-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .main-title {
        font-size: 2rem;
        -webkit-text-stroke: 1px red;
    }

    .secondary-title {
        font-size: 1rem;
        -webkit-text-stroke: 0.5px red;
    }

    .card {
        padding: 0.5rem;
        margin-top: 0.5rem !important;
        margin-bottom: 0rem;
    }

    .col-md, .col-md-4, .col-md-8 {
        margin-bottom: 0.5rem;
    }

    .card-header {
        font-size: 0.8rem;
        padding-bottom: 0.3rem;
        margin-bottom: 0.5rem;
        flex-wrap: wrap;
    }

    .btn {
        font-size: 0.6rem;
        padding: 0.3rem 0.5rem;
        letter-spacing: 0.3px;
    }

    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }

    textarea {
        font-size: 0.75rem !important;
        rows: 4 !important;
    }

    .form-control {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    select.form-control {
        font-size: 0.65rem;
    }

    .slider-container {
        font-size: 0.75rem;
    }

    .worker-value, #concurrent-value, #pm-concurrent-value, #jon-concurrent-value {
        font-size: 0.9rem;
    }

    .col-auto {
        font-size: 0.75rem;
        padding: 0 0.25rem;
    }

    .progress-bar-container {
        height: 6px;
        margin-top: 0.5rem;
    }

    .progress-text {
        font-size: 0.6rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .stats-grid {
        gap: 0.5rem;
    }

    .material-symbols-outlined {
        font-size: 1rem;
    }

    #current-time {
        font-size: 0.9rem !important;
    }

    .btn-group {
        gap: 0.25rem;
    }

    /* Fix button layout in mobile */
    .row.mb-2, .row.mb-3 {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .row.mb-2 .col-6, .row.mb-3 .col-6 {
        flex: 0 0 calc(50% - 0.125rem);
        max-width: calc(50% - 0.125rem);
    }

    .row.mb-2 .col-12, .row.mb-3 .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
        -webkit-text-stroke: 1px red;
    }

    .secondary-title {
        font-size: 0.9rem;
        -webkit-text-stroke: 0.5px red;
    }

    .custom-tabs .nav-link {
        padding: 0.4rem 0.5rem;
        font-size: 0.6rem;
    }

    .card {
        padding: 0.4rem;
    }

    .card-header {
        font-size: 0.7rem;
    }

    .btn {
        font-size: 0.55rem;
        padding: 0.25rem 0.4rem;
    }

    .btn-sm {
        padding: 0.15rem 0.3rem;
        font-size: 0.55rem;
    }

    textarea {
        font-size: 0.7rem !important;
    }

    .form-control {
        font-size: 0.7rem;
        padding: 0.3rem;
    }

    select.form-control {
        font-size: 0.6rem;
    }

    .col-auto {
        font-size: 0.65rem;
        padding: 0 0.15rem;
    }

    .worker-value, #concurrent-value, #pm-concurrent-value, #jon-concurrent-value {
        font-size: 0.8rem;
    }

    .progress-text {
        font-size: 0.55rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-value-small {
        font-size: 1rem;
    }

    .material-symbols-outlined {
        font-size: 0.9rem;
    }

    #current-time {
        font-size: 0.75rem !important;
        margin-top: 5px !important;
    }

    .title-underline {
        width: 150px;
    }

    .row.text-center {
        font-size: 0.65rem !important;
    }
}
