/* ==========================================================================
   LOCAL GUIDES RANKING – UNIFIED DESIGN SYSTEM
   Base: Prototype 1 + Glassmorphism, Floating Rows & Minicharts from Prototype 2
   Optimized for Ultra-Performance, SEO & 100% Smartphone Responsiveness
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN SYSTEM & CSS VARIABLES (LIGHT & DARK MODE)
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --brand-50: #f5f3ff;
    --brand-100: #ede9fe;
    --brand-200: #ddd6fe;
    --brand-400: #a78bfa;
    --brand-500: #8b5cf6;
    --brand-600: #6f42c1; /* Original Primary Color */
    --brand-700: #5b21b6;
    --brand-800: #4c1d95;
    --brand-glow: rgba(111, 66, 193, 0.25);

    /* Akzentfarben */
    --accent-coral: #ff4b6e;
    --accent-coral-hover: #ff335a;
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-text: #047857;
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --warning-text: #b45309;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-text: #b91c1c;

    /* Light Theme Surfaces & Glass */
    --bg-body: #f4f5f9;
    --bg-base: #eef0f8;
    --bg-surface: #ffffff;
    --bg-surface-2: #f8fafc;
    --bg-surface-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --bg-sticky: rgba(255, 255, 255, 0.92);

    --glass-surface: rgba(255, 255, 255, 0.78);
    --glass-surface-strong: rgba(255, 255, 255, 0.92);
    --glass-row: rgba(255, 255, 255, 0.88);
    --glass-row-hover: #ffffff;
    --glass-pill-dark: rgba(255, 255, 255, 0.9);
    --glass-input: rgba(255, 255, 255, 0.9);
    --glass-dropdown: rgba(255, 255, 255, 0.98);
    --glass-sticky-col: rgba(255, 255, 255, 0.96);

    --glass-border: rgba(111, 66, 193, 0.12);
    --glass-border-bright: rgba(111, 66, 193, 0.26);
    --glass-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
    --shadow-glass: 0 14px 32px -8px rgba(67, 35, 113, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
    --shadow-row: 0 4px 14px -3px rgba(67, 35, 113, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);

    /* Typography Colors */
    --text-main: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-on-brand: #ffffff;
    --th-active-bg: rgba(111, 66, 193, 0.12);
    --spark-stroke: #059669;

    /* Shadows & Borders */
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 40px -12px rgba(111, 66, 193, 0.18);

    /* Layout & Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;
    --nav-height: 66px;
}

/* --------------------------------------------------------------------------
   DARK GLASS THEME
   -------------------------------------------------------------------------- */
[data-theme="dark"] {
    --bg-body: #0d091a;
    --bg-base: #130a24;
    --bg-surface: #18112e;
    --bg-surface-2: #20173d;
    --bg-surface-hover: #291e4e;
    --bg-glass: rgba(24, 17, 46, 0.85);
    --bg-sticky: rgba(20, 13, 38, 0.94);

    --glass-surface: rgba(255, 255, 255, 0.07);
    --glass-surface-strong: rgba(26, 15, 48, 0.85);
    --glass-row: rgba(255, 255, 255, 0.075);
    --glass-row-hover: rgba(255, 255, 255, 0.13);
    --glass-pill-dark: rgba(15, 8, 30, 0.65);
    --glass-input: rgba(18, 10, 36, 0.6);
    --glass-dropdown: rgba(24, 13, 48, 0.98);
    --glass-sticky-col: #18112e;

    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-bright: rgba(255, 255, 255, 0.24);
    --glass-highlight: inset 0 1px 0 0 rgba(255, 255, 255, 0.18);
    --shadow-glass: 0 16px 36px -8px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    --shadow-row: 0 6px 18px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --th-active-bg: rgba(255, 255, 255, 0.15);
    --spark-stroke: #34d399;

    --border-color: #2a1f4a;
    --border-subtle: #20173d;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.75);

    --brand-600: #8b5cf6;
    --brand-500: #a78bfa;
    --brand-50: rgba(139, 92, 246, 0.16);
    --brand-100: rgba(139, 92, 246, 0.25);

    --success-bg: rgba(16, 185, 129, 0.2);
    --success-text: #34d399;
    --danger-bg: rgba(239, 68, 68, 0.2);
    --danger-text: #f87171;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--brand-600);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover {
    color: var(--brand-500);
}

/* Tabellarische Zahlen für saubere Lesbarkeit von Rängen & Statistiken */
.num, 
.table-leaderboard td, 
.stat-card-value, 
.kpi-val, 
.heatmap-table td, 
.rank-showcase-num,
.leaderboard-table td {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.container-ultra {
    width: 100%;
    max-width: clamp(600px, 94vw, 1720px);
    margin: 0 auto;
    padding: 0 1rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --------------------------------------------------------------------------
   3. AMBIENT MESH BACKGROUND (Subtiler Glow-Effekt)
   -------------------------------------------------------------------------- */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.18;
    will-change: transform;
}

[data-theme="dark"] .mesh-blob {
    opacity: 0.28;
}

.blob-1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -100px;
    background: #7c3aed;
}

.blob-2 {
    width: 600px;
    height: 600px;
    top: 25%;
    right: -150px;
    background: #ec4899;
}

.blob-3 {
    width: 550px;
    height: 550px;
    bottom: -150px;
    left: 30%;
    background: #4f46e5;
}

/* --------------------------------------------------------------------------
   4. GLASSMORPHISM COMMON CLASSES
   -------------------------------------------------------------------------- */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass);
    border-radius: var(--radius-xl);
}

.bg-glass {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.shadow-glass {
    box-shadow: var(--shadow-glass) !important;
}

/* --------------------------------------------------------------------------
   5. STICKY GLASS NAVBAR
   -------------------------------------------------------------------------- */
.navbar {
    position: sticky;
    top: 0;
    height: var(--nav-height);
    background: var(--bg-sticky);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 1.25rem;
    gap: 16px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.22rem;
    letter-spacing: 0.5px;
    color: var(--text-main);
    text-decoration: none;
    flex-shrink: 0;
}
.brand-logo:hover {
    color: var(--brand-600);
}

.brand-logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6f42c1, #9333ea);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.35);
    font-size: 0.95rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--text-main);
    background: var(--bg-surface-hover);
}

.nav-link.active {
    color: var(--brand-600);
    background: var(--brand-50);
    font-weight: 600;
}

.nav-badge {
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Crawler Live Sync Pill */
.crawler-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--success-bg);
    color: var(--success-text);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}

/* Theme Toggle Button & Language Pill */
.theme-btn, .lang-btn {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    height: 38px;
    padding: 0 13px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.theme-btn:hover, .lang-btn:hover {
    border-color: var(--brand-500);
    background: var(--bg-surface-hover);
    color: var(--brand-600);
}

.lang-btn img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   6. HERO SECTION & ONBOARDING (BENTO GRID)
   -------------------------------------------------------------------------- */
.hero-section {
    position: relative;
    padding: 32px 0 20px;
    background: transparent;
    overflow: visible;
}

.hero-glass {
    background: var(--glass-surface-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    text-align: center;
    color: var(--text-main);
    box-shadow: var(--shadow-glass);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

[data-theme="dark"] .hero-glass {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-glass h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
    color: var(--text-main);
}

.hero-glass p {
    font-size: clamp(0.95rem, 1.3vw, 1.08rem);
    color: var(--text-secondary);
    max-width: 820px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.hero-widget-promo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-widget-promo:hover {
    border-color: var(--brand-500);
    color: var(--brand-600);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.badge-new {
    background: linear-gradient(135deg, #ff4b6e, #f43f5e);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Onboarding Bento Grid */
.onboarding-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 20px;
    position: relative;
    z-index: 2;
    margin-bottom: 32px;
}

.bento-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.bento-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.url-input-group {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.input-modern {
    flex: 1;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 0;
}

.input-modern:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-primary-modern {
    background: linear-gradient(135deg, #6f42c1, #7c3aed);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.2s;
    min-height: 44px;
}

.btn-primary-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(111, 66, 193, 0.4);
    color: #fff;
}

.queue-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-surface-2);
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0;
    list-style: none;
}

.step-item {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.step-num {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--brand-100);
    color: var(--brand-600);
    font-weight: 700;
    font-size: 0.72rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   7. STICKY TOOLBAR (LEADERBOARD CONTROLS)
   -------------------------------------------------------------------------- */
.leaderboard-toolbar {
    position: sticky;
    top: var(--nav-height);
    z-index: 20;
    background: var(--bg-sticky);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.toolbar-stats h2 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin: 0;
}

.toolbar-stats span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.toolbar-controls {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 540px;
    justify-content: flex-end;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i.fa-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 40px 10px 38px;
    border-radius: 999px;
    font-size: 0.88rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-600);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.btn-search-reset {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.85rem;
}
.btn-search-reset:hover {
    color: var(--danger);
}

/* --------------------------------------------------------------------------
   8. FLOATING ROWS LEADERBOARD TABLE (DIE ZENTRALE TABELLE)
   -------------------------------------------------------------------------- */
.table-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 24px;
    margin: 0 -4px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* Erzeugt den Schwebungseffekt zwischen den Zeilen! */
    text-align: right;
    margin-bottom: 0;
}

.leaderboard-table thead th {
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    user-select: none;
    border: none;
    vertical-align: middle;
}

.leaderboard-table thead th:first-child { 
    text-align: center; 
    width: 56px; 
}

.leaderboard-table thead th:nth-child(2) { 
    text-align: left; 
}

/* Aktive Sortier-Kapsel im Header */
.th-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.th-pill:hover {
    background: var(--glass-row);
    color: var(--text-main);
}

.th-pill.active {
    background: var(--th-active-bg);
    color: var(--brand-600);
    font-weight: 700;
    box-shadow: var(--glass-highlight);
}

/* Schwebende Glaskapseln pro Zeile */
.leaderboard-table tbody tr {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.leaderboard-table tbody tr:hover {
    transform: translateY(-2px);
}

.leaderboard-table tbody td {
    background: var(--glass-row);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 11px 14px;
    font-size: 0.93rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    vertical-align: middle;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.leaderboard-table tbody tr:hover td {
    background: var(--glass-row-hover);
    border-top-color: var(--glass-border-bright);
    border-bottom-color: var(--glass-border-bright);
}

/* Runde Kapsel-Enden */
.leaderboard-table tbody td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
}

.leaderboard-table tbody td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.leaderboard-table tbody tr:hover td:first-child { border-left-color: var(--glass-border-bright); }
.leaderboard-table tbody tr:hover td:last-child { border-right-color: var(--glass-border-bright); }

/* Profilbild + Name in der Rangliste */
.guide-row-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.guide-avatar-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.guide-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border-bright);
    display: block;
    background: var(--bg-surface-2);
}

.guide-mini-star {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    font-size: 0.52rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-surface);
}

.guide-row-name {
    font-weight: 700;
    color: var(--text-main);
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none;
}
.guide-row-name:hover {
    color: var(--brand-600);
}

/* Glass Level Pills */
.glass-level-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--glass-pill-dark);
    border: 1px solid var(--glass-border-bright);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

.glass-level-pill.lvl-10 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.45), rgba(236, 72, 153, 0.45));
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

/* SVG Minichart Sparkline in Floating Rows */
.mini-spark {
    width: 92px;
    height: 26px;
    vertical-align: middle;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   9. PAGINATION (GLASS STYLE)
   -------------------------------------------------------------------------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 32px 0 48px;
    list-style: none;
    flex-wrap: wrap;
}

.page-item .page-link {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    min-width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.page-item .page-link:hover {
    border-color: var(--brand-600);
    background: var(--brand-50);
    color: var(--brand-600);
}

.page-item.active .page-link {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.35);
}

.page-item.disabled .page-link {
    opacity: 0.45;
    pointer-events: none;
    background: var(--bg-surface-2);
}

/* --------------------------------------------------------------------------
   10. PROFILE VIEW (profile.php REDESIGN)
   -------------------------------------------------------------------------- */
.profile-header-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.profile-header-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #6f42c1, #ec4899, #f59e0b);
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.avatar-wrapper {
    position: relative;
    width: 108px;
    height: 108px;
    flex-shrink: 0;
}

.avatar-lg {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-surface);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    background: var(--bg-surface-2);
}

.lg-star-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    border: 3px solid var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.profile-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-title-row h1 {
    font-size: clamp(1.4rem, 2.4vw, 1.95rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    margin: 0;
}

.status-badge-daily {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Rank Showcase Box (Profile) */
.rank-showcase {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-color);
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.rank-nav-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    text-decoration: none;
}

.rank-nav-arrow:hover {
    background: var(--brand-600);
    color: #fff;
    border-color: var(--brand-600);
}

.rank-showcase-center {
    text-align: center;
    min-width: 90px;
}

.rank-showcase-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
}

.rank-showcase-num {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--brand-600), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Funfact Banner */
.funfact-banner {
    margin-top: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--brand-600);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    box-shadow: var(--shadow-xs);
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.funfact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.funfact-text {
    font-size: 0.93rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.funfact-text strong {
    color: var(--text-main);
}

/* KPI Stat Cards Grid */
.kpi-grid-primary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.kpi-grid-secondary {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.kpi-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px 0 20px;
    box-shadow: var(--shadow-xs);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-rank-tag {
    font-size: 0.73rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-600);
    border: 1px solid var(--brand-100);
}

.kpi-rank-tag.top-10 {
    background: linear-gradient(135deg, #fef08a, #f59e0b);
    color: #78350f;
    border: none;
}

.kpi-main-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.kpi-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.kpi-grid-secondary .kpi-val {
    font-size: 1.2rem;
}

.kpi-growth {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.kpi-growth.up {
    background: var(--success-bg);
    color: var(--success-text);
}

.kpi-growth.flat {
    color: var(--text-muted);
}

.kpi-spark-container {
    margin: 0 -20px;
    height: 48px;
    display: flex;
    align-items: flex-end;
}

.kpi-spark-svg {
    width: 100%;
    height: 48px;
    display: block;
}

/* Milestone Box */
.milestone-box {
    padding: 20px;
    margin-top: 24px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.progress-track {
    width: 100%;
    height: 12px;
    background: var(--bg-surface-2);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0 8px;
    border: 1px solid var(--border-color);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6f42c1, #ec4899);
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* Heatmap Table */
.heatmap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    text-align: center;
    font-size: 0.8rem;
}

.heatmap-table th {
    padding: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.heatmap-table td {
    padding: 10px 6px;
    border-radius: 6px;
    background: var(--bg-surface-2);
    color: var(--text-main);
}

.heat-1 { background: rgba(111, 66, 193, 0.14) !important; }
.heat-2 { background: rgba(111, 66, 193, 0.30) !important; }
.heat-3 { background: rgba(111, 66, 193, 0.55) !important; color: #fff !important; font-weight: 600; }
.heat-4 { background: rgba(111, 66, 193, 0.85) !important; color: #fff !important; font-weight: 700; }

/* Guide Cards Bento Grid (Ähnliche Profile) */
.guide-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.guide-card-modern {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: var(--shadow-xs);
    text-decoration: none;
    color: inherit;
}

.guide-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-400);
    color: inherit;
}

.gc-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.gc-avatar-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.gc-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-surface-2);
}

.gc-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    margin-bottom: 4px;
}

.gc-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--bg-surface-2);
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 14px;
}

.gc-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.gc-stat-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.gc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   11. FOOTER & FLOATING WHATS NEW
   -------------------------------------------------------------------------- */
.footer-modern {
    margin-top: auto;
    padding: 56px 0 28px;
    background-color: #3b0764;
    background-image:
        radial-gradient(at 0% 0%, #6f42c1 0px, transparent 55%),
        radial-gradient(at 100% 100%, #1e1b4b 0px, transparent 55%);
    color: rgba(255, 255, 255, 0.8);
    position: relative;
}

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

.footer-modern h5 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-modern p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    font-size: 0.92rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
}

.footer-runtime {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-copyright {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.server-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.9);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: statusPulse 2s infinite ease-in-out;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

/* Floating Whats New Button & Popover */
#whatsnew {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}

#wn-btn {
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(111, 66, 193, 0.45);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

#wn-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(111, 66, 193, 0.65);
}

#wn-dot.live {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    display: inline-block;
}

#wn-pop {
    position: fixed;
    bottom: 74px;
    right: 24px;
    width: clamp(280px, 90vw, 380px);
    max-height: 480px;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: 20px;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.35);
    z-index: 1000;
    display: none;
    color: var(--text-main);
}

[data-theme="dark"] #wn-pop {
    background: #18112e;
    border-color: #2f2252;
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.7);
}

#wn-pop.open {
    display: block;
    animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

#wn-pop h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 8px 0 4px;
    color: var(--text-main);
    line-height: 1.35;
}

#wn-pop time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#wn-pop p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

#wn-pop a.readbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-600);
    text-decoration: none;
    padding: 5px 12px;
    background: var(--brand-50);
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}

#wn-pop a.readbtn:hover {
    background: var(--brand-100);
}

#wn-pop a.readbtn svg {
    width: 14px;
    height: 14px;
}

#wn-pop hr {
    border: none;
    border-top: 1px solid var(--border-subtle);
    margin: 16px 0;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE & ABSOLUTE SMARTPHONE OPTIMIZATION
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .onboarding-grid { grid-template-columns: 1fr; }
    .kpi-grid-primary { grid-template-columns: 1fr 1fr; }
    .kpi-grid-secondary { grid-template-columns: repeat(3, 1fr); }
    .guide-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* Mobile Navbar */
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-sticky);
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        box-shadow: var(--shadow-md);
    }
    .nav-links.open {
        display: flex;
    }
    .mobile-nav-toggle {
        display: inline-flex;
    }

    .crawler-pill span {
        display: none; /* Nur Dreh-Icon anzeigen auf Mobile */
    }

    /* Onboarding Steps */
    .steps-list { grid-template-columns: 1fr; }

    /* Profile Header Stacking */
    .profile-header-card { 
        flex-direction: column; 
        text-align: center; 
        padding: 20px;
    }
    .profile-hero-left { 
        flex-direction: column; 
        gap: 16px;
    }
    .profile-title-row { 
        justify-content: center; 
    }
    .profile-meta-row { 
        justify-content: center; 
    }
    .rank-showcase { 
        width: 100%; 
        justify-content: center; 
    }

    /* KPI Grids */
    .kpi-grid-primary { grid-template-columns: 1fr; }
    .kpi-grid-secondary { grid-template-columns: repeat(2, 1fr); }
    .guide-cards-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }

    /* SMARTPHONE-PERFEKTION IN DER RANGLISTE */
    .table-scroll-wrap {
        padding-left: 0;
        padding-right: 0;
        margin: 0 -1rem;
    }

    /* Sticky Rank (#) und Name-Spalte beim horizontalen Scrollen auf dem Smartphone */
    .leaderboard-table th:first-child,
    .leaderboard-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 6;
        background: var(--glass-sticky-col);
        box-shadow: 2px 0 6px rgba(0, 0, 0, 0.08);
    }

    .leaderboard-table th:nth-child(2),
    .leaderboard-table td:nth-child(2) {
        position: sticky;
        left: 56px;
        z-index: 5;
        background: var(--glass-sticky-col);
        box-shadow: 4px 0 10px rgba(0, 0, 0, 0.12);
        max-width: 160px;
    }

    .guide-row-name {
        max-width: 120px;
    }

    .th-pill {
        padding: 4px 8px;
        font-size: 0.76rem;
    }
}

@media (max-width: 480px) {
    .hero-glass {
        padding: 24px 16px;
    }
    .url-input-group {
        flex-direction: column;
    }
    .btn-primary-modern {
        width: 100%;
        justify-content: center;
    }
    .kpi-grid-secondary { 
        grid-template-columns: 1fr; 
    }
}

.hidden { display: none !important; }

/* --------------------------------------------------------------------------
   13. AUTOCOMPLETE, SEARCH RESULTS & SPECIAL DROPDOWNS (GLASS LOOK)
   -------------------------------------------------------------------------- */
#searchResults, #oldProfileResults, #newProfileResults {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 48px -10px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    overflow-y: auto;
    max-height: 420px;
    display: none;
    z-index: 1050;
    padding: 6px 0;
}

[data-theme="dark"] #searchResults,
[data-theme="dark"] #oldProfileResults,
[data-theme="dark"] #newProfileResults {
    background: #18112e;
    border-color: #2f2252;
    box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.7);
}

#searchResults.show,
#oldProfileResults.show,
#newProfileResults.show {
    display: block;
    animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.autocomplete-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    color: var(--text-main);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: var(--bg-surface-hover);
}

.autocomplete-item.active {
    background: var(--brand-50);
}
[data-theme="dark"] .autocomplete-item.active {
    background: rgba(139, 92, 246, 0.2);
}

.autocomplete-item .column-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.autocomplete-item .subcolumn-left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.autocomplete-item .subcolumn-left img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    background: var(--bg-surface-2);
}

.autocomplete-item .subcolumn-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.autocomplete-item .first-row {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.autocomplete-item span.search-string-highlight {
    background: rgba(245, 158, 11, 0.22);
    color: #d97706;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 800;
}
[data-theme="dark"] .autocomplete-item span.search-string-highlight {
    background: rgba(245, 158, 11, 0.32);
    color: #fbbf24;
}

.autocomplete-item .second-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.autocomplete-item .second-row div {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.autocomplete-item .second-row i {
    font-size: 0.72rem;
    opacity: 0.85;
}

.autocomplete-item .second-row i.fa-eye { color: var(--brand-500); }
.autocomplete-item .second-row i.fa-camera { color: #0284c7; }
.autocomplete-item .second-row i.fa-medal { color: #f59e0b; }
.autocomplete-item .second-row i.fa-trophy { color: #eab308; }

.autocomplete-item .column-right {
    flex-shrink: 0;
    margin-left: 10px;
}

.autocomplete-footer-item {
    display: flex;
    justify-content: flex-end;
    padding: 6px 14px;
    font-size: 0.72rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
}

.autocomplete-no-items-found {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 1.5rem 1rem;
}

/* --------------------------------------------------------------------------
   14. COMPARISON TOOL & MODALS (GLASS STYLE)
   -------------------------------------------------------------------------- */
.comparison-btn-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-to-comparison {
    background: linear-gradient(135deg, #6f42c1, #ec4899);
    color: #fff !important;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-to-comparison:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(111, 66, 193, 0.4);
}

.shared-comparison-alert {
    background: var(--brand-50);
    border: 1px solid var(--brand-200);
    color: var(--brand-800);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 24px;
}
[data-theme="dark"] .shared-comparison-alert {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.35);
    color: #ede9fe;
}

.table-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}
.table-comparison th, .table-comparison td {
    background: var(--glass-row);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 14px;
    color: var(--text-main);
    font-variant-numeric: tabular-nums;
}
.table-comparison th:first-child, .table-comparison td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}
.table-comparison th:last-child, .table-comparison td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.stat-rank-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--brand-50);
    color: var(--brand-600);
    border: 1px solid var(--brand-100);
}
.stat-rank-badge.rank-top-10 {
    background: linear-gradient(135deg, #fef08a, #f59e0b);
    color: #78350f;
    border: none;
}

/* Modals */
.modal-content {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-lg) !important;
}
.modal-header, .modal-footer {
    border-color: var(--border-color) !important;
}
.btn-close {
    filter: invert(var(--theme-invert, 0));
}
[data-theme="dark"] .btn-close {
    filter: invert(1);
}

/* --------------------------------------------------------------------------
   15. PROFILE CARDS & GUIDE GLASS CARDS (PROTOTYPE 2 STYLE)
   -------------------------------------------------------------------------- */
.profile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.profile-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-400);
}

.profile-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 14px;
    flex: 1;
}

.profile-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-card-avatar-wrap {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.profile-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border-bright);
    background: var(--bg-surface-2);
}

.profile-card-star {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ff4b6e;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    box-shadow: 0 2px 6px rgba(255, 75, 110, 0.45);
}

.profile-card-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-card-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.profile-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 6px;
    text-align: center;
    margin-top: auto;
}

.profile-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-stat-item .stat-lbl {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.profile-stat-item .stat-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.profile-card-footer {
    padding: 10px 18px;
    background: var(--bg-surface-2);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.profile-card-footer .info-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Fallback for old card body markup if present */
.profile-card-body {
    padding: 20px 18px 14px;
    text-align: center;
}
.profile-card-image img {
    border-radius: 50%;
    border: 2px solid var(--glass-border-bright);
    object-fit: cover;
    background: var(--bg-surface-2);
}
.profile-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 10px 0 6px;
}
.profile-card-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Heatmap Tables (Monatlicher Zuwachs) */
.table-profile {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    margin-top: 12px;
}

.table-profile thead th {
    background: var(--bg-surface-2);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 6px;
    border: none;
    border-radius: var(--radius-sm);
}

.table-profile tbody td {
    padding: 9px 6px;
    border-radius: 6px;
    font-size: 0.82rem;
    border: none;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.table-profile tbody td:first-child {
    font-weight: 700;
    background: var(--bg-surface-2);
    color: var(--text-main);
}


/* ==========================================================================
   STAT CARDS, INSIGHTS & COMPARE (Glassmorphism & Responsiveness)
   ========================================================================== */

.welcome-box,
.welcome-box-glass,
.hero-glass {
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.welcome-box h1,
.welcome-box h2,
.welcome-box-glass h1,
.welcome-box-glass h2 {
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--text-main);
    margin-bottom: 0.75rem;
}

.welcome-box p.lead,
.welcome-box-glass p.lead {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 820px;
    margin: 0 auto;
}

/* Stat Cards */
.stat-card {
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
    padding: 1.25rem 1.5rem;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-card-heading {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

/* Randlose Metric Cards mit Minicharts (Profile & Insights) */
.stat-card-new {
    position: relative;
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card-new:hover {
    transform: translateY(-3px);
    border-color: var(--brand-400);
    box-shadow: var(--shadow-lg);
}

.stat-card-new .stat-rank-badge {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
}

.stat-card-heading-new {
    padding: 14px 18px 4px 18px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.stat-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 18px 8px 18px;
    margin: 0;
    gap: 8px;
    z-index: 2;
}

.stat-card-value {
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.stat-card.inisghts {
    text-align: center;
}

.stat-card.inisghts h5 {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.35rem;
    font-variant-numeric: tabular-nums;
}

.stat-card.inisghts p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.stat-card.about {
    text-align: left;
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--glass-shadow);
}

.stat-card.about h2,
.stat-card.about h3 {
    font-weight: 800;
    color: var(--text-main);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.stat-card.about h2:first-child {
    margin-top: 0;
}

.stat-card.about p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.95rem;
}

.sparkline-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    display: block;
    overflow: hidden;
    margin-top: auto;
    margin-bottom: -1px;
}

.sparkline-wrapper svg {
    width: 100% !important;
    height: 40px !important;
    display: block;
    margin-bottom: -1px;
}

/* Comparison Layout & Table */
.comparison-top-box {
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    color: var(--text-main);
}

.table-comparison {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.table-comparison thead th {
    background: var(--bg-surface-2);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.table-comparison thead th.comparison-th {
    border-right: 1px solid var(--border-subtle);
}

.table-comparison thead th:last-child {
    border-right: none;
}

.table-comparison tbody tr {
    transition: background-color 0.15s ease;
}

.table-comparison tbody tr:hover {
    background: var(--glass-hover);
}

.table-comparison tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.9rem;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}

.table-comparison tbody td:last-child {
    border-right: none;
}

.table-comparison tbody tr:last-child td {
    border-bottom: none;
}

.compare-metric-td-fw {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-surface-2);
    width: 220px;
}

.compare-rank-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 8px;
    background: var(--bg-surface-3);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.compare-rank-badge.rank-gold,
.rank-gold {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
    border-color: rgba(234, 179, 8, 0.3);
}

.compare-rank-badge.rank-silver,
.rank-silver {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: rgba(148, 163, 184, 0.3);
}

.compare-rank-badge.rank-bronze,
.rank-bronze {
    background: rgba(217, 119, 6, 0.15);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.3);
}

.remove-profile {
    cursor: pointer;
    color: var(--text-muted);
    margin-left: 8px;
    transition: color 0.15s ease, transform 0.15s ease;
}

.remove-profile:hover {
    color: #ef4444;
    transform: scale(1.15);
}

/* Charts: Metric & Time-Range Buttons */
.button-container-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.button-container.metric {
    flex: 1 1 55%;
}

.button-container.range {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.metric-button,
.time-range-button {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-button:hover,
.time-range-button:hover {
    background: var(--glass-hover);
    color: var(--brand-500);
    border-color: var(--brand-400);
    transform: translateY(-1px);
}

.metric-button.active,
.time-range-button.active {
    background: var(--brand-600);
    color: #ffffff;
    border-color: var(--brand-600);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
}

.metric-button:focus,
.time-range-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.chart-container {
    background: var(--glass-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    position: relative;
}

.chart-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius-lg);
    z-index: 10;
}

@media (max-width: 768px) {
    .table-comparison th:first-child,
    .table-comparison td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--bg-surface);
    }
    .button-container.metric,
    .button-container.range {
        width: 100%;
        justify-content: flex-start;
    }
}