body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 700px;
    text-align: center;
}

h1, h2 {
    color: #1a253c;
}

h2 {
    margin-top: 2rem;
}

/* Drop Area */
#drop-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

#drop-area.highlight {
    background-color: #e9f5ff;
    border-color: #007bff;
}

/* Pulsante Streaming */
#stream-button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 5px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.2s;
}

#stream-button:hover {
    background-color: #0056b3;
}

#stream-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

#stream-button.streaming {
    background-color: #dc3545;
}

#stream-button.streaming:hover {
    background-color: #c82333;
}

/* Area Visualizzazione Trascrizione */
#transcription-display {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 1rem;
    min-height: 100px;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.placeholder {
    color: #888;
}

/* Stili per la pagina delle trascrizioni */
.table-container {
    margin-top: 2rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 0.8rem;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f1f1f1;
}

.date-cell {
    white-space: nowrap;
}

.transcription-cell {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Stili per i pulsanti di navigazione */
.button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: white;
    background-color: #6c757d;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.button:hover {
    background-color: #5a6268;
}

.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.nav-header h1 {
    margin: 0;
}

.controls {
    margin-bottom: 1rem;
}

/* Stili per l'overlay di caricamento */
#loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

#loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

#loading-overlay p {
    font-size: 1.2rem;
    font-weight: 500;
}

#loading-overlay .small-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

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

/* =============================
   Neo Dark Theme (teal/cyber)
   Fonts: Orbitron (titles), Share Tech Mono (body)
   ============================= */

:root {
    --bg: #0e242e;
    --panel: #102b36;
    --text: #d6f1ff;
    --muted: #9bb6c3;
    --accent: #00e6ff;
    --accent-2: #14b7c9;
    --border: #1b3f4a;
    --hover: #143845;
}

body {
    font-family: "Share Tech Mono", Menlo, Consolas, monospace;
    background-color: var(--bg);
    color: var(--text);
}

.container {
    background: var(--panel);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.45);
    border: 1px solid var(--border);
    max-width: 900px;
}

h1, h2 {
    font-family: "Orbitron", system-ui, sans-serif;
    color: var(--text);
    letter-spacing: .5px;
}

.nav-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: .5rem;
}

#drop-area {
    border: 2px dashed var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--muted);
}

#drop-area.highlight {
    background-color: rgba(0, 230, 255, 0.08);
    border-color: var(--accent);
}

#stream-button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background-color: var(--accent-2);
    color: #00161c;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: background-color 0.2s;
    font-weight: 600;
}

#stream-button:hover { background-color: var(--accent); }
#stream-button:disabled { background-color: #486a74; color: #cfe3ea; cursor: not-allowed; }
#stream-button.streaming { background-color: #c83b3b; }
#stream-button.streaming:hover { background-color: #a92f2f; }

#transcription-display {
    background-color: #0d212a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.placeholder { color: var(--muted); }

.table-container { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; text-align: left; color: var(--text); }

th, td { padding: 0.8rem; border-bottom: 1px solid var(--border); }

th { background-color: #0d2029; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

tr:hover { background-color: var(--hover); }

.date-cell { white-space: nowrap; }
.transcription-cell { white-space: pre-wrap; word-break: break-word; }

.button {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    text-decoration: none;
    background-color: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    border-radius: 8px;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.button:hover { background-color: rgba(0, 230, 255, 0.12); border-color: var(--accent); color: var(--text); }

/* Scrollbar styling (WebKit) */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: #0b1e26; }
*::-webkit-scrollbar-thumb { background: #134150; border-radius: 6px; }
*::-webkit-scrollbar-thumb:hover { background: #176072; }