@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700;900&family=Roboto:wght@400;700&display=swap');

:root {
    /* Bus Theme - Cyan/Teal */
    --primary: #00bcd4; 
    --primary-dim: #008ba3;
    --bg-glass: rgba(18, 18, 18, 0.95);
    --text-main: #ffffff;
    --text-dim: #aaaaaa;
    --border: 1px solid rgba(0, 188, 212, 0.3);
    --green: #00e676;
    --orange: #ff9800;
    --red: #ff5252;
    --accent: #4dd0e1;
}

body {
    margin: 0; padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    overflow: hidden;
    height: 100vh; width: 100vw;
    user-select: none;
}

#tracker-app {
    position: absolute;
    top: 50px; left: 50px;
    width: 320px;
    background: var(--bg-glass);
    border: var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    display: flex; flex-direction: column;
    resize: both; overflow: hidden;
    min-height: 200px;
}

/* --- HEADER --- */
header {
    background: linear-gradient(90deg, var(--primary-dim), var(--primary));
    height: 32px; 
    padding: 0 10px;
    cursor: move;
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-title {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Rajdhani', sans-serif; 
    font-weight: 900; font-size: 1.1em;
    text-transform: uppercase; letter-spacing: 2px;
    color: #000; pointer-events: none; white-space: nowrap;
}

.nav-icon { text-decoration: none; font-size: 1.1em; cursor: pointer; }
#clock { font-family: 'Rajdhani', sans-serif; font-weight: 700; color: #000; font-size: 0.85em; }

#content { padding: 10px; flex: 1; overflow-y: auto; scrollbar-width: thin; }

/* --- COMPACT ROUTE INFO --- */
.route-box {
    background: rgba(0, 188, 212, 0.1);
    border: 1px dashed var(--accent);
    border-radius: 6px; 
    padding: 5px; 
    margin-bottom: 6px; 
    text-align: center;
}
.route-label {
    font-size: 0.6em; color: var(--accent);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1px;
}
.route-name {
    font-family: 'Rajdhani', sans-serif; font-size: 0.95em; font-weight: 700;
    color: #fff; line-height: 1.1; margin-bottom: 2px;
}
.route-progress {
    font-size: 0.75em; color: var(--text-dim); font-weight: bold;
}

/* --- STATUS & TIMER (Extra Compact) --- */
.status-container {
    background: rgba(255,255,255,0.05); 
    border-radius: 6px; 
    padding: 4px; 
    margin-bottom: 10px;
    text-align: center;
    display: flex; flex-direction: column; gap: 2px;
}

.status-line {
    font-family: 'Rajdhani', sans-serif; 
    font-weight: 700; 
    font-size: 0.8em; 
    color: #ccc;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.timer-line {
    font-family: 'Rajdhani', sans-serif; 
    font-weight: 900; 
    font-size: 1.1em; 
    color: var(--text-dim); 
    line-height: 1;
    transition: color 0.2s ease;
}

.timer-line.active { color: var(--green); text-shadow: 0 0 8px rgba(0, 230, 118, 0.4); }
.timer-line.urgent { color: var(--red); text-shadow: 0 0 8px rgba(255, 82, 82, 0.6); }

/* --- STATS --- */
.section { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.section:last-child { border-bottom: none; }
.label { font-size: 0.7em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 2px; }
.value { font-size: 1.1em; font-weight: bold; color: var(--text-main); }
.value.highlight { color: var(--primary); }
.value.bxp { color: var(--green); }

.progress-container {
    position: relative; height: 14px; 
    background: rgba(0,0,0,0.5); border-radius: 4px; margin: 4px 0 4px 0;
    overflow: hidden; border: 1px solid rgba(255,255,255,0.1);
}
.progress-bar { height: 100%; background: var(--primary); width: 0%; transition: width 0.3s ease; }
.progress-text {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 0.65em; text-shadow: 1px 1px 2px black; font-weight: bold; z-index: 2;
}
.xp-remaining-text { text-align: center; font-size: 0.75em; color: var(--text-dim); margin-bottom: 8px; }
.xp-remaining-text b { color: var(--primary); }

/* SESSION BOX */
.run-box {
    background: rgba(0, 188, 212, 0.1);
    border: 1px solid rgba(0, 188, 212, 0.3);
    border-radius: 4px; padding: 6px; margin-bottom: 8px;
}
.run-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.85em; }
.run-val { font-weight: bold; color: #fff; }
.run-label { font-size: 0.8em; color: #aaa; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.stat-box { background: rgba(255,255,255,0.05); padding: 5px; border-radius: 4px; text-align: center; }

/* CALCULATOR */
input[type="number"] {
    width: 90%; background: rgba(0,0,0,0.3);
    border: 1px solid #444; color: white; padding: 4px;
    border-radius: 4px; margin-top: 4px; font-family: inherit; font-size: 0.9em;
}
input:focus { outline: 1px solid var(--primary); }
.calc-output { margin-top: 4px; font-size: 0.75em; line-height: 1.2; color: var(--text-dim); word-wrap: break-word; }

/* QUICK BUTTONS */
.quick-btn-row {
    display: flex; gap: 5px; margin-top: 5px; justify-content: center;
}
.quick-btn {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
    color: #ccc; font-size: 0.7em; padding: 2px 6px; border-radius: 3px; cursor: pointer;
    font-family: 'Rajdhani', sans-serif; font-weight: bold; flex: 1;
}
.quick-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

#settings-panel, #job-list, #summary-table { display: none !important; }
