/* ============================================================
   HEIZUNGS-BEDARFSTOOL SERVER – Professionelles Design
   Seriös · Elegant · Zeitlos · Klassisch
   Dunkelblau (#1a3a5c) + Gold (#b8860b)
   ============================================================ */

:root {
    --primary: #1a3a5c;
    --primary-light: #2c5a8f;
    --primary-dark: #0d1f33;
    --primary-subtle: #e8eef5;
    --accent: #b8860b;
    --accent-light: #d4a843;
    --accent-subtle: #faf5eb;
    --success: #2e7d4f;
    --success-light: #e6f4ec;
    --warning: #c4930a;
    --danger: #a63d40;
    --danger-light: #fef2f2;
    --bg-main: #f5f6f8;
    --bg-card: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #5a6275;
    --text-light: #8e95a5;
    --text-white: #ffffff;
    --border: #e0e3e8;
    --border-light: #eef0f3;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.07);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.09);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 50%;
    --transition: all 0.25s ease;
    --font-main: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.65;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════
   TOP NAVIGATION BAR
   ══════════════════════════════════════════════════ */
.top-nav {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    letter-spacing: -0.01em;
    color: var(--text-white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-link {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

.nav-link.active {
    background: rgba(255,255,255,0.18);
    color: white;
    font-weight: 600;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px;
}

.nav-user {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    padding: 0 10px;
    font-weight: 400;
}

.nav-logout {
    color: rgba(255,180,180,0.9) !important;
    margin-left: 4px;
}

.nav-logout:hover {
    background: rgba(220,38,38,0.25) !important;
    color: white !important;
}

@media (max-width: 768px) {
    .top-nav {
        flex-direction: column;
        height: auto;
        padding: 12px 16px;
        gap: 8px;
    }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 2px;
    }
    .nav-user {
        display: none;
    }
    .nav-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* ══════════════════════════════════════════════════
   APP CONTAINER
   ══════════════════════════════════════════════════ */
.app-container {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px 16px;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════ */
.app-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--text-white);
    padding: 28px 28px;
    border-radius: var(--radius-lg);
    margin-bottom: 28px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.app-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.app-header p {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ══════════════════════════════════════════════════
   LOGIN PAGE
   ══════════════════════════════════════════════════ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
    padding: 20px;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 16px 64px rgba(0,0,0,0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 1.4rem;
    color: white;
    font-weight: 800;
    letter-spacing: -0.05em;
    box-shadow: var(--shadow-md);
}

.login-title {
    text-align: center;
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 28px;
}

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: var(--font-main);
    background: var(--bg-main);
    color: var(--text-primary);
    transition: var(--transition);
}

.login-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
    background: var(--bg-card);
}

.login-field input::placeholder {
    color: var(--text-light);
}

.login-error {
    background: var(--danger-light);
    border: 1px solid #fca5a5;
    color: #dc2626;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.login-success {
    background: var(--success-light);
    border: 1px solid #86efac;
    color: var(--success);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    margin-bottom: 16px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }
}

/* ══════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.card-header p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.card-icon {
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    color: var(--primary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    font-weight: 600;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
}

.card-description {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.55;
}

.card-kategorie {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    background: var(--primary-subtle);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    text-decoration: none;
    letter-spacing: 0.01em;
    font-family: var(--font-main);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-primary:active {
    background: var(--primary-dark);
    transform: translateY(0);
}

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

.btn-accent {
    background: var(--accent);
    color: var(--text-white);
    box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

.btn-small {
    background: var(--bg-main);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 5px 12px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin: 2px;
    font-family: var(--font-main);
    font-weight: 500;
    transition: var(--transition);
}

.btn-small:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-small.btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 16px;
    font-family: var(--font-main);
}

.btn-back:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════
   STARTSEITE / HERO
   ══════════════════════════════════════════════════ */
.hero-section {
    text-align: center;
    padding: 32px 16px;
}

.hero-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 36px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    text-align: left;
    transition: var(--transition);
}

.feature-item:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
}

.feature-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-subtle);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.feature-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* ══════════════════════════════════════════════════
   FORTSCHRITTSBALKEN
   ══════════════════════════════════════════════════ */
.progress-container {
    margin-bottom: 24px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* ══════════════════════════════════════════════════
   NAVIGATION TABS (Fragebogen)
   ══════════════════════════════════════════════════ */
.nav-tabs {
    display: flex;
    gap: 3px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    box-shadow: var(--shadow-xs);
}

.nav-tab {
    flex: 1;
    padding: 10px 6px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-main);
}

.nav-tab.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: var(--shadow-xs);
}

.nav-tab:hover:not(.active) {
    background: var(--bg-main);
    color: var(--text-primary);
}

.nav-tab.answered:not(.active) {
    background: rgba(46, 125, 79, 0.12);
    color: var(--success);
}

/* ══════════════════════════════════════════════════
   FORCED CHOICE (A/B Fragen)
   ══════════════════════════════════════════════════ */
.forced-choice {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.choice-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.choice-btn:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.choice-btn:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.choice-btn:hover {
    background: var(--primary-subtle);
    border-color: var(--primary-light);
}

.choice-btn:active {
    transform: scale(0.99);
}

.choice-btn.choice-selected {
    border-color: var(--primary);
    background: var(--primary-subtle);
    box-shadow: inset 0 0 0 1px var(--primary);
}

.choice-label {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: var(--transition);
}

.choice-selected .choice-label {
    background: var(--primary);
    color: var(--text-white);
}

.choice-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.choice-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin: -1px 0;
}

.choice-divider span {
    background: var(--bg-main);
    color: var(--text-light);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════
   MULTI-CHOICE (3-5 Optionen)
   ══════════════════════════════════════════════════ */
.multi-choice {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.multi-choice .choice-btn {
    border-radius: 0;
    min-height: 48px;
    padding: 12px 16px;
}

.multi-choice .choice-btn:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.multi-choice .choice-btn:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.multi-choice .choice-btn:not(:first-child) {
    border-top: none;
}

.multi-choice .choice-btn.choice-selected {
    border-color: var(--accent);
    background: rgba(184, 134, 11, 0.08);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.multi-choice .choice-selected .choice-label {
    background: var(--accent);
    color: var(--text-white);
}

/* ══════════════════════════════════════════════════
   RANKING / ERGEBNIS
   ══════════════════════════════════════════════════ */
.ranking-container {
    margin-top: 16px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.ranking-item:hover {
    box-shadow: var(--shadow-md);
}

.ranking-item.rang-1 {
    border-left: 3px solid var(--accent);
    background: linear-gradient(135deg, var(--accent-subtle) 0%, var(--bg-card) 100%);
}

.ranking-item.rang-2 {
    border-left: 3px solid #8e95a5;
}

.ranking-item.rang-3 {
    border-left: 3px solid #c4a882;
}

.rang-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.rang-1 .rang-badge {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

.rang-2 .rang-badge {
    background: #8e95a5;
    color: var(--text-white);
}

.rang-3 .rang-badge {
    background: #c4a882;
    color: var(--text-white);
}

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

.ranking-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.ranking-beschreibung {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ranking-bar-bg {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.ranking-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.ranking-prozent {
    font-size: 1.6rem;
    font-weight: 800;
    flex-shrink: 0;
    min-width: 65px;
    text-align: right;
    letter-spacing: -0.03em;
}

.ranking-prozent small {
    font-size: 0.8rem;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════
   QUICK FACTS
   ══════════════════════════════════════════════════ */
.quick-facts {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding: 14px 16px;
    background: rgba(26, 58, 92, 0.04);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}

.quick-fact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.quick-fact-check {
    color: var(--success);
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ══════════════════════════════════════════════════
   ERKLÄRUNG
   ══════════════════════════════════════════════════ */
.erklaerung-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 16px;
}

.erklaerung-card h4 {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.erklaerung-text {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ══════════════════════════════════════════════════
   DETAIL TABLES
   ══════════════════════════════════════════════════ */
.detail-section {
    margin-top: 28px;
}

.detail-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.detail-table,
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.detail-table th,
.data-table th {
    background: var(--primary);
    color: var(--text-white);
    padding: 11px 14px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: left;
}

.detail-table td,
.data-table td {
    padding: 11px 14px;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.detail-table tr:last-child td,
.data-table tr:last-child td {
    border-bottom: none;
}

.detail-table tr:hover td,
.data-table tr:hover td {
    background: #fafbfc;
}

.detail-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 8px;
    font-family: var(--font-main);
}

.detail-toggle:hover {
    background: var(--primary-subtle);
    border-color: var(--primary-light);
}

/* Score Dots & Mini Bars */
.score-dots {
    display: flex;
    gap: 3px;
}

.score-dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--border);
}

.score-dot.filled {
    background: var(--accent);
}

.mini-bar-bg {
    height: 5px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    min-width: 50px;
}

.mini-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

/* ══════════════════════════════════════════════════
   ADMIN PANEL
   ══════════════════════════════════════════════════ */
.slider-row {
    padding: 14px 16px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    margin-bottom: 10px;
    transition: var(--transition);
}

.slider-row:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-xs);
}

input[type="range"] {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    outline: none;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--primary);
    cursor: pointer;
    border: none;
}

/* ══════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}

.modal-card {
    max-width: 420px;
    width: 90%;
    animation: fadeInUp 0.25s ease;
}

/* ══════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.3px;
}

.badge-primary {
    background: var(--primary-subtle);
    color: var(--primary);
}

.badge-accent {
    background: var(--accent-subtle);
    color: var(--accent);
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

/* ══════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

.animate-fade-in { animation: fadeInUp 0.4s ease forwards; }
.animate-scale-in { animation: fadeInUp 0.35s ease forwards; }
.animate-slide-in { animation: slideInLeft 0.35s ease forwards; }

/* ══════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .app-container { padding: 12px 10px; }
    .app-header { padding: 22px 18px; border-radius: var(--radius-md); }
    .app-header h1 { font-size: 1.15rem; }
    .card { padding: 18px; }
    .choice-btn { padding: 16px; gap: 12px; }
    .choice-text { font-size: 0.88rem; }
    .choice-label { width: 32px; height: 32px; font-size: 0.75rem; }
    .ranking-item { padding: 14px; gap: 12px; }
    .ranking-prozent { font-size: 1.3rem; min-width: 50px; }
    .rang-badge { width: 38px; height: 38px; font-size: 0.78rem; }
    .features-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.4rem; }
    .detail-table th, .detail-table td,
    .data-table th, .data-table td { padding: 8px 10px; font-size: 0.72rem; }
    .multi-choice .choice-btn { min-height: 42px; padding: 8px 12px; }
    .quick-facts { padding: 10px 12px; }
    .quick-fact-item { font-size: 0.78rem; }
}

@media (min-width: 768px) {
    .app-container { padding: 28px; }
    .app-header h1 { font-size: 1.5rem; }
    .card { padding: 28px; }
    .hero-title { font-size: 2rem; }
}

/* ══════════════════════════════════════════════════
   OVERRIDE BOOTSTRAP CONFLICTS
   ══════════════════════════════════════════════════ */
.btn:focus,
.btn:focus-visible,
button:focus,
button:focus-visible {
    outline: none;
    box-shadow: none;
}

/* Blazor reconnect UI */
#components-reconnect-modal {
    display: none;
}