/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-accent {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    position: relative;
    overflow: hidden;
}

.card-accent::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 70%);
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
}

.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.btn-small {
    padding: 8px 16px;
    font-size: 13px;
    width: auto;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--surface-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--accent);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Error/success messages */
.msg {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 16px;
}

.msg-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.msg-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

/* Stats grid */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

/* List items */
.list-item {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s;
    cursor: pointer;
}

.list-item:active {
    transform: scale(0.98);
}

.list-item + .list-item {
    margin-top: 10px;
}

.list-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    background: var(--accent-dim);
}

.list-info {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.list-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.list-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

/* Badge */
.badge {
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Section title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 40px);
    max-width: 440px;
}

.toast {
    background: var(--surface-2);
    color: var(--text);
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.toast.out {
    animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Timer display */
.timer-display {
    font-size: 64px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    padding: 20px 0;
}

/* Phase action buttons */
.btn-phase {
    display: block;
    width: 100%;
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.btn-phase:active {
    transform: scale(0.97);
}

.btn-phase:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-run {
    background: #22c55e;
    color: #fff;
}

.btn-run-stop {
    background: #ef4444;
    color: #fff;
}

.btn-rest-stop {
    background: #f59e0b;
    color: #0a0a0a;
}

.btn-exercise-stop {
    background: var(--accent);
    color: #0a0a0a;
}

/* Phase indicator */
.phase-indicator {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.phase-step {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.phase-step.phase-active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.phase-step.phase-done {
    opacity: 0.4;
}

/* Join code display */
.join-code-display {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 12px;
    text-align: center;
    color: var(--accent);
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 2px solid var(--accent);
}

/* Large button */
.btn-large {
    padding: 18px 24px;
    font-size: 17px;
}
