* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #0d0d0d;
    --surface: #1a1a1a;
    --surface-hover: #252525;
    --border: #333;
    --text: #eee;
    --text-dim: #888;
    --green: #6ee6a0;
    --red: #e64c4c;
    --yellow: #e6d14c;
    --selected: rgba(110, 230, 160, 0.2);
}

html, body { height: 100%; overflow: hidden; touch-action: manipulation; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-size: 16px;
}

header {
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

header h1 { font-size: 18px; font-weight: 700; color: var(--green); }
header input {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    width: 120px;
}

.transport {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.transport button {
    flex: 1;
    padding: 16px 8px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.transport button i { font-size: 20px; }

.btn-go { background: var(--green); color: #000; }
.btn-stop { background: var(--red); color: #fff; }
.btn-panic { background: #333; color: #fff; flex: 0.7; }

.main {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.cue-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 8px;
    background: var(--surface);
    border-radius: 12px;
    border-left: 4px solid transparent;
    cursor: pointer;
}

.cue-item.selected { background: var(--selected); border-left-color: var(--green); }
.cue-item.running { background: rgba(110, 230, 160, 0.3); border-left-color: var(--green); }

.cue-item .num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dim);
    width: 36px;
}

.cue-item .info { flex: 1; }
.cue-item .name { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.cue-item .type { font-size: 12px; color: var(--text-dim); }

.cue-item .duration {
    font-size: 14px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

.progress {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--green);
    opacity: 0.2;
    transition: width 0.2s;
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 50%;
    color: var(--text-dim);
}

.add-bar {
    position: fixed;
    bottom: 80px;
    right: 20px;
}

.add-bar button {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    background: var(--green);
    border: none;
    color: #000;
    font-size: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    cursor: pointer;
}

footer {
    background: var(--surface);
    padding: 12px 16px;
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
}

.status { display: flex; align-items: center; gap: 8px; }
.status span { color: var(--green); }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.modal.active { display: flex; }
.modal > div {
    background: var(--surface);
    padding: 20px;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
}

.modal h2 { color: var(--green); margin-bottom: 16px; }

.modal input, .modal select, .modal textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 12px;
}

.modal button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}

.btn-primary { background: var(--green); color: #000; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }

.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
}

.settings-link {
    position: fixed;
    top: 12px;
    right: 12px;
    color: var(--text-dim);
    font-size: 16px;
    z-index: 50;
}