/* Runpod status block */
.runpod-status-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    background: #232526;
    border-radius: 10px;
    box-shadow: 0 2px 8px #0003;
    padding: 18px 24px;
    margin-bottom: 38px;
    margin-top: 24px;
    font-size: 1.18em;
}
.runpod-last-online {
    margin-left: 18px;
    color: #8be9fd;
    font-size: 0.98em;
    font-weight: 500;
    min-width: 120px;
    text-align: right;
}
.runpod-title {
    font-weight: 700;
    color: #8be9fd;
    font-size: 1.18em;
}
.runpod-status {
    font-weight: 600;
    font-size: 1.1em;
    padding: 4px 14px;
    border-radius: 8px;
    background: #35374b;
    color: #ff5555;
    margin-left: 8px;
    margin-right: 8px;
    min-width: 90px;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}
.runpod-status.on {
    background: #8be9fd;
    color: #232526;
}
.runpod-status.off {
    background: #35374b;
    color: #ff5555;
}
.runpod-go-btn {
    min-width: 110px;
    font-size: 1em;
    margin-left: 8px;
}
body {
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    background: linear-gradient(135deg, #191724 0%, #232526 100%);
    margin: 0;
    padding: 0;
    text-align: center;
    color: #ececec;
}
.summary-block {
    display: flex;
    justify-content: center;
    gap: 32px;
    font-size: 1.2em;
    margin-bottom: 18px;
    margin-top: 8px;
    background: #232526;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 2px 8px #0005;
}
.summary-block span {
    font-weight: 600;
    color: #ffb86c;
}
.container {
    max-width: 1100px;
    margin: 40px auto 0 auto;
    background: #232526;
    border-radius: 18px;
    padding: 36px 32px 32px 32px;
    box-shadow: 0 6px 40px #000a;
    position: relative;
    overflow: hidden;
}
h1 {
    margin-top: 0;
    font-weight: 700;
    font-size: 2.2em;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #ffb86c 0%, #8be9fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}
.filters {
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}
.filters input, .filters button, .open-log-btn {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #35374b;
    font-size: 1em;
    outline: none;
    background: #232526;
    color: #ececec;
    margin: 0 2px;
}
.filters button, .open-log-btn {
    background: linear-gradient(90deg, #8be9fd 0%, #ffb86c 100%);
    border: none;
    color: #232526;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    margin: 0 2px;
    box-shadow: 0 2px 12px #0003;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}
.open-log-btn {
    background: linear-gradient(90deg, #8be9fd 0%, #ffb86c 100%);
    border: none;
    color: #232526;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    margin: 0 2px;
    box-shadow: 0 2px 12px #0003;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    vertical-align: middle;
}
.open-log-btn:hover {
    background: linear-gradient(90deg, #ffb86c 0%, #8be9fd 100%);
    box-shadow: 0 4px 18px #0005;
    transform: translateY(-2px) scale(1.04);
}
.open-log-btn:active {
    filter: brightness(0.95);
    transform: scale(0.98);
}
.delete-log-btn {
    background: linear-gradient(90deg, #ff5555 0%, #ff0000 100%) !important;
    color: #fff !important;
    border: none;
}
.delete-log-btn:hover {
    background: linear-gradient(90deg, #ff0000 0%, #ff5555 100%) !important;
}
.reset-btn {
    background: linear-gradient(90deg, #ff5555 0%, #ff0000 100%) !important;
    color: #fff !important;
    border: none;
}
.reset-btn:hover {
    background: linear-gradient(90deg, #ff0000 0%, #ff5555 100%) !important;
}
.charts {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}
canvas {
    margin: 0 auto;
    display: block;
    background: #191724;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
#logsTableContainer {
    margin-top: 36px;
    background: #232526;
    border-radius: 12px;
    padding: 18px 12px 12px 12px;
    box-shadow: 0 2px 8px #0003;
}
#logsTable {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 1em;
    color: #ececec;
}
#logsTable th, #logsTable td {
    padding: 8px 10px;
    border-bottom: 1px solid #35374b;
}
#logsTable th {
    background: #35374b;
    font-weight: 600;
}
#logsTable tr:hover {
    background: #282a36;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(25, 23, 36, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: #232526;
    margin: auto;
    padding: 32px 28px 24px 28px;
    border-radius: 14px;
    max-width: 700px;
    min-width: 320px;
    box-shadow: 0 8px 40px #000a;
    position: relative;
    text-align: left;
    color: #ececec;
    word-break: break-word;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.modal .close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2em;
    color: #8be9fd;
    cursor: pointer;
}
.log-text-block {
    background: #111117;
    border-radius: 8px;
    padding: 18px 16px;
    margin-top: 12px;
    margin-bottom: 12px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Fira Mono', 'Consolas', monospace;
    font-size: 1.08em;
    color: #ececec;
}
@media (max-width: 800px) {
    .modal-content {
        max-width: 98vw;
        min-width: 0;
        padding: 18px 6vw 18px 6vw;
    }
}

@media (max-width: 600px) {
    .container {
        max-width: 100vw;
        margin: 0;
        border-radius: 0;
        padding: 10px 2vw 10px 2vw;
        box-shadow: none;
    }
    .summary-block {
        flex-direction: column;
        gap: 8px;
        font-size: 1em;
        padding: 8px 0;
    }
    .filters {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    .filters input, .filters button, .open-log-btn {
        font-size: 0.98em;
        padding: 8px 8px;
        min-width: 0;
    }
    h1 {
        font-size: 1.3em;
    }
    .charts {
        gap: 12px;
    }
    .charts canvas {
        width: 98vw !important;
        min-width: 320px;
        max-width: 100vw;
        height: 180px !important;
    }
    #logsTableContainer {
        padding: 8px 2px 8px 2px;
    }
    #logsTable {
        font-size: 0.95em;
        min-width: 500px;
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    #logsTable th, #logsTable td {
        padding: 6px 6px;
    }
    .runpod-status-block {
        flex-direction: column;
        gap: 8px;
        padding: 10px 6px;
        font-size: 1em;
    }
    .settings-block {
        padding: 12px 6px 10px 6px;
        max-width: 100vw;
    }
    .styled-checkbox {
        font-size: 0.98em;
    }
    .modal-content {
        padding: 10px 2vw 10px 2vw;
    }
    #paginationContainer button.open-log-btn {
        font-size: 0.95em;
        padding: 6px 8px;
    }
}
::-webkit-scrollbar {
    width: 10px;
    background: #232526;
}
::-webkit-scrollbar-thumb {
    background: #35374b;
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
    background: #44465a;
}
.styled-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 1em;
    user-select: none;
    color: #ececec;
    min-height: 24px;
}
.styled-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.styled-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: #232526;
    border: 2px solid #8be9fd;
    border-radius: 5px;
    transition: background 0.2s;
}
.styled-checkbox input[type="checkbox"]:checked ~ .checkmark {
    background-color: #8be9fd;
    border-color: #8be9fd;
}
.styled-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.styled-checkbox input[type="checkbox"]:checked ~ .checkmark:after {
    display: block;
}
.styled-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #232526;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}
.styled-checkbox input[type="checkbox"] + .checkmark {
    display: inline-block;
}
.settings-block {
    background: #232526;
    border-radius: 12px;
    box-shadow: 0 2px 12px #0004;
    padding: 24px 24px 18px 24px;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.settings-block h2 {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 1.15em;
    color: #8be9fd;
    font-weight: 600;
    letter-spacing: 1px;
}
.settings-block label {
    display: block;
    margin-bottom: 12px;
}
.settings-block input[type="text"],
.settings-block input[type="number"] {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #35374b;
    font-size: 1em;
    outline: none;
    background: #232526;
    color: #ececec;
    width: 100%;
    box-sizing: border-box;
    margin-top: 4px;
}
#modelCheckboxes {
    margin-bottom: 0;
}
.spinner {
    border: 4px solid #232526;
    border-top: 4px solid #8be9fd;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite;
    display: inline-block;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#paginationContainer {
    margin-top: 12px;
}
#paginationContainer button.open-log-btn {
    margin: 0 4px;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #35374b;
    background: #232526;
    color: #8be9fd;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
#paginationContainer button.open-log-btn.active {
    background: #8be9fd;
    color: #232526;
    font-weight: bold;
}
.loading-modal::before {
    content: '';
    position: fixed;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(25,23,36,0.35);
    z-index: 2000;
    pointer-events: all;
}
.loading-modal .modal-content {
    filter: blur(1.5px) grayscale(0.2);
    opacity: 0.7;
}
.loading-btn {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}
.loading-btn::after {
    content: '';
    position: absolute;
    right: 10px; top: 50%;
    width: 18px; height: 18px;
    margin-top: -9px;
    border: 2.5px solid #ff5555;
    border-top: 2.5px solid transparent;
    border-radius: 50%;
    animation: spinBtn 0.7s linear infinite;
}
@keyframes spinBtn {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Transcribe page */
.transcribe-container {
    max-width: 900px;
    margin: 40px auto;
}
.transcribe-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}
.muted {
    color: #bbb;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 12px 0 8px 0;
}
.status-card {
    background: #1e1f29;
    border: 1px solid #35374b;
    border-radius: 10px;
    padding: 12px;
    text-align: left;
}
.status-title { color: #8be9fd; font-weight: 600; font-size: 0.95em; }
.status-value { margin-top: 6px; font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.dot.red { background: #ff5555; }
.dot.green { background: #50fa7b; }
.dot.yellow { background: #f1fa8c; }
.mono { font-family: 'Fira Mono','Consolas',monospace; font-size: 0.95em; }

/* File input styling */
.file-input {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.file-input input[type="file"] {
    display: none;
}
.file-input .file-btn {
    cursor: pointer;
}

/* Drag & drop zone */
.dropzone {
    margin-top: 10px;
    border: 2px dashed #35374b;
    border-radius: 10px;
    padding: 18px;
    background: #191a22;
    color: #bbb;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
}
.dropzone.highlight {
    background: #20232e;
    border-color: #8be9fd;
    color: #8be9fd;
}
.files-list {
    margin-top: 8px;
    text-align: left;
}
.files-list .file-item { margin: 2px 0; }
.log-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    background: #35374b;
    color: #ececec;
    font-size: 0.9em;
}
.log-line { white-space: pre-wrap; }
.log-info { color: #8be9fd; }
.log-warn { color: #f1fa8c; }
.log-error { color: #ff5555; }