/* ── DnD Freitagsrunde — Player UI (Dark Theme) ── */

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #0f3460;
    --bg-input: #1a1a3e;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --text-muted: #707080;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #0984e3;
    --border: #2a2a4a;
    --radius: 8px;
    --shadow: 0 4px 12px rgba(0,0,0,0.3);
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.player-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.6;
}

/* ── Container ── */

.player-container {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    margin: 24px;
}

.player-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 36px;
    box-shadow: var(--shadow);
}

.player-card.wide {
    max-width: 560px;
}

.player-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
    text-align: center;
}

.player-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

/* ── Form ── */

.form-group {
    margin-bottom: 20px;
}

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

.form-input,
.form-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

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

.form-input-row .form-input {
    flex: 1;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: #1a4070;
    border-color: var(--accent);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.82rem;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover:not(:disabled) {
    background: #00d2a0;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn-ghost:hover:not(:disabled) {
    background: rgba(233, 69, 96, 0.1);
}

/* ── Alert / Error ── */

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    margin-bottom: 20px;
    display: none;
    animation: fadeIn 0.2s ease;
}

.alert.visible {
    display: block;
}

.alert-error {
    background: rgba(214, 48, 49, 0.15);
    border: 1px solid var(--danger);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(0, 184, 148, 0.15);
    border: 1px solid var(--success);
    color: #55efc4;
}

.alert-info {
    background: rgba(9, 132, 227, 0.15);
    border: 1px solid var(--info);
    color: #74b9ff;
}

/* ── Spinner ── */

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner.dark {
    border-color: rgba(255,255,255,0.2);
    border-top-color: var(--accent);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

/* ── Button row ── */

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

.btn-row .btn {
    flex: 1;
}

/* ── Separator ── */

.separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Generated name ── */

.generated-name-display {
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 480px) {
    .player-card {
        padding: 28px 20px;
    }
    .btn-row {
        flex-direction: column;
    }
}
