
:root {
    --bg-body: #0f172a;
    --bg-card: #111827;
    --bg-card-alt: #020617;
    --bg-accent: #0ea5e9;
    --bg-accent-soft: #0ea5e91a;
    --border-subtle: #1f2937;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-strong: #f9fafb;
    --danger: #f97316;
    --danger-soft: #f973161a;
    --success: #22c55e;
    --success-soft: #22c55e1a;
    --shadow-soft: 0 18px 45px rgba(15,23,42,0.65);
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-pill: 999px;
    --transition-fast: 150ms ease-out;
}

/* Global layout */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1f2937 0, #020617 50%, #000 100%);
    color: var(--text-main);
    min-height: 100%;
}

body {
    display: flex;
    justify-content: center;
    padding: 24px 12px;
}

/* Main container */

.container {
    width: 100%;
    max-width: 1040px;
    background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-card-alt) 60%, #020617 100%);
    border-radius: 24px;
    padding: 24px 20px 24px 20px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

/* Subtle glow frame */

.container::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(56, 189, 248, 0.14);
    pointer-events: none;
}

/* Header */

h1 {
    margin: 0 0 6px 0;
    text-align: left;
    font-weight: 650;
    font-size: 26px;
    letter-spacing: 0.03em;
    color: var(--text-strong);
    display: flex;
    align-items: center;
    gap: 8px;
}

h1::before {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 10px;
    background: conic-gradient(from 180deg, #f97316, #facc15, #22c55e, #0ea5e9, #818cf8, #f97316);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.7);
}

h2 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-strong);
}

h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-strong);
}

/* Cards / sections */

section {
    margin: 0 0 12px 0;
}

.section-card {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.08), transparent 45%),
                radial-gradient(circle at bottom right, rgba(248, 113, 113, 0.08), transparent 50%);
    border-radius: var(--radius-lg);
    padding: 14px 14px 16px 14px;
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(15, 23, 42, 0.7);
    pointer-events: none;
}

.section-card.secondary {
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 50%),
                #020617;
}

/* Helper text */

.helper-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Buttons */

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

button,
.button {
    cursor: pointer;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.4), rgba(37, 99, 235, 0.5));
    color: #f9fafb;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), opacity var(--transition-fast);
    text-decoration: none;
}

button:hover,
.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.55);
    border-color: rgba(59, 130, 246, 0.9);
}

button:active,
.button:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.8);
}

button.secondary {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
}

button.secondary:hover {
    background: rgba(15, 23, 42, 1);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.9);
}

button.danger {
    background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.9), rgba(220, 38, 38, 0.95));
    border-color: rgba(248, 113, 113, 0.9);
}

button.danger:hover {
    box-shadow: 0 12px 26px rgba(248, 113, 113, 0.7);
}

/* Role buttons */

#step-role .button-row button {
    flex: 1 1 160px;
}

#step-role .button-row button:nth-child(1) {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.5), rgba(37, 99, 235, 0.7));
}
#step-role .button-row button:nth-child(2) {
    background: radial-gradient(circle at top left, rgba(249, 115, 22, 0.6), rgba(185, 28, 28, 0.8));
}
#step-role .button-row button:nth-child(3) {
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.6), rgba(22, 163, 74, 0.8));
}

/* Inputs */

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 3px;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    max-width: 320px;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder {
    color: #6b7280;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    border-color: rgba(56, 189, 248, 0.9);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45);
    background-color: #020617;
}

/* Steps visibility */

.hidden {
    display: none !important;
}

/* Operator panel */

.operator-panel {
    margin-top: 10px;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.6), #020617 55%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.9);
}

.operator-panel h3 {
    margin-bottom: 4px;
}

#participants {
    margin-top: 8px;
    border-radius: var(--radius-md);
    padding: 8px 8px 6px 8px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(31, 41, 55, 0.9);
    max-height: 260px;
    overflow-y: auto;
}

#participants p {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(55, 65, 81, 0.8);
    font-size: 13px;
}

#participants p:last-child {
    border-bottom: none;
}

/* Indeks panel */

.indeks-panel {
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(251, 191, 36, 0.5);
    background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.15), rgba(15, 23, 42, 0.98));
}

.indeks-step-text {
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-main);
}

.indeks-buttons button {
    margin-right: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

/* Metronome panel */

.metronome-panel {
    margin-top: 10px;
    padding: 10px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(56, 189, 248, 0.6);
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.98));
}

.metronome-modes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.metronome-modes input[type="radio"] {
    margin-right: 4px;
}

#metronomeDisplay {
    margin-top: 6px;
    font-weight: 600;
    font-size: 14px;
    min-height: 1.4em;
    color: var(--text-strong);
}

/* Role title & session info */

#roleTitle {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: var(--text-muted);
}

/* Simple info text */

#simpleInfo {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-main);
}

#simpleInfo p {
    margin: 4px 0;
}

/* Status styles */

.hl-activated {
    color: var(--success);
    font-weight: 600;
}

.hl-message {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-strong);
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: var(--success-soft);
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.hl-accept-btn {
    padding: 7px 16px;
    margin-top: 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(34, 197, 94, 0.9);
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.85), rgba(22, 163, 74, 0.95));
    color: #f9fafb;
    font-weight: 500;
    font-size: 13px;
}

.hl-accept-btn:hover {
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.7);
}

.incoming-call {
    color: var(--danger);
    font-weight: 600;
    margin-top: 6px;
    font-size: 13px;
    padding: 6px 10px;
    border-radius: var(--radius-pill);
    background: var(--danger-soft);
    border: 1px solid rgba(248, 113, 113, 0.5);
}

/* Call AMK link */

.call-amk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.85), rgba(22, 163, 74, 0.95));
    border: 1px solid rgba(34, 197, 94, 0.9);
    color: #f9fafb;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.call-amk:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(22, 163, 74, 0.8);
}

.info-small {
    font-size: 11px;
    color: var(--text-muted);
}
