:root {
    --card-bg: rgba(255, 255, 255, 0.76);
    --card-subtle: rgba(255, 255, 255, 0.55);
    --border: rgba(255, 255, 255, 0.45);
    --border-hover: #0284c7;
    --text-main: #0f172a;
    --text-muted: #475569;
    --accent: #0284c7;
    --accent-soft: rgba(2, 132, 199, 0.14);
    --danger: #dc2626;
    --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.12);
}

body.dark-mode {
    --card-bg: rgba(15, 23, 42, 0.68);
    --card-subtle: rgba(30, 41, 59, 0.62);
    --border: rgba(148, 163, 184, 0.18);
    --border-hover: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.18);
    --shadow-card: 0 10px 32px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
    background-color: #0f172a;
    color: var(--text-main);
    margin: 0;
    padding: 0 0 50px 0;
    min-height: 100vh;
    font-variant-numeric: tabular-nums;
    overflow-x: hidden;
}

/* Vollbild Real-Weather Canvas */
#weatherCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.app-layer {
    position: relative;
    z-index: 2;
}

/* Translucent Topbar */
.topbar {
    background: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    color: #ffffff;
    padding: 14px 16px 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-inner, .container {
    max-width: 1320px;
    margin: 0 auto;
}

.container { padding: 18px 14px 0 14px; }

.brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.brand-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-earth-link {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-radius: 12px;
    padding: 2px 6px 2px 2px;
    transition: transform 0.15s ease, background 0.2s ease;
}

.brand-earth-link:active,
.header-space-btn:active {
    transform: scale(0.95);
}

.brand-earth-link.is-active .brand-logo {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand-title h1 {
    margin: 0;
    font-size: 1.24rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.brand-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    display: block;
    font-weight: 500;
}

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

.header-space-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: radial-gradient(circle at 30% 25%, #1e293b 0%, #090d16 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.header-space-btn:hover {
    border-color: rgba(56, 189, 248, 0.7);
}

.header-space-btn.is-active {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45), 0 4px 14px rgba(56, 189, 248, 0.25);
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.28); }

/* Navigation Tabs */
.tab-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: rgba(15, 23, 42, 0.35);
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    padding: 9px 6px;
    border-radius: 9px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tab-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

/* Search Bar */
.search-container {
    max-width: 680px;
    margin: 0 auto 20px auto;
    position: relative;
}

.search-box {
    display: flex;
    gap: 8px;
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 6px;
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-main);
    padding: 10px 10px;
    font-size: 0.95rem;
    outline: none;
}

select {
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

.btn-gps {
    padding: 10px 13px;
    background: var(--accent-soft);
    color: var(--accent);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
}

.btn-primary {
    padding: 10px 18px;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.search-results {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-hover);
    border-radius: 14px;
    z-index: 120;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.3);
}
.search-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--accent-soft); }

/* Transparent Hero Stage */
.hero-stage {
    border-radius: 24px;
    padding: 24px 22px;
    margin-bottom: 24px;
    color: #ffffff;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.52) 100%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transition: transform 0.2s ease;
}
.hero-stage:hover { transform: translateY(-2px); }

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-city-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-city-name {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.28);
}

.hero-cond {
    font-size: 0.98rem;
    opacity: 0.95;
    margin-top: 2px;
    font-weight: 500;
}

.hero-temp {
    font-size: 4.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    text-shadow: 0 4px 16px rgba(0,0,0,0.28);
}

.hero-metrics {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.85rem;
    font-weight: 600;
}

.hero-chart-box {
    margin-top: 16px;
    background: rgba(15, 23, 42, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 12px 14px 8px 14px;
    overflow-x: auto;
}

/* GeoSphere Unwetterwarnungen */
.warn-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.warn-banner {
    border-radius: 14px;
    padding: 11px 14px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    text-align: left;
}
.warn-banner.yellow { background: linear-gradient(135deg, rgba(217, 119, 6, 0.92), rgba(245, 158, 11, 0.92)); }
.warn-banner.orange { background: linear-gradient(135deg, rgba(194, 65, 12, 0.94), rgba(234, 88, 12, 0.94)); }
.warn-banner.red    { background: linear-gradient(135deg, rgba(153, 27, 27, 0.96), rgba(220, 38, 38, 0.96)); }

.warn-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 0.88rem;
}
.warn-time {
    font-size: 0.74rem;
    opacity: 0.92;
    margin-top: 2px;
    font-weight: 600;
}
.warn-body {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    white-space: pre-line;
}

/* 15-Minuten Nowcast & C-LAEF 1-km Box */
.nowcast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.nowcast-summary {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}
.model-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
}
.nowcast-bars {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 5px;
    align-items: end;
    height: 62px;
    margin-top: 12px;
    padding-top: 8px;
}
.nowcast-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}
.nowcast-bar-track {
    width: 100%;
    height: 40px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.nowcast-bar-fill {
    width: 100%;
    border-radius: 6px;
    transition: height 0.3s ease;
}
.nowcast-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 700;
}
.claef-meta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Section Headers */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 22px 0 12px 0;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.34);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: #ffffff;
}
.section-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}
.section-hint {
    font-size: 0.78rem;
    opacity: 0.85;
    font-weight: 600;
}

/* Glass City Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 14px;
}

.card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

body.compact-cards .grid .card {
    padding: 12px 15px;
}
body.compact-cards .grid .card .temp-row {
    margin: 8px 0 2px 0;
}
body.compact-cards .grid .card .sun-times,
body.compact-cards .grid .card .action-bar {
    display: none;
}

.drag-handle {
    cursor: grab;
    font-size: 1.15rem;
    color: var(--text-muted);
    padding-right: 6px;
    user-select: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.card-header h3 {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 800;
    display: flex;
    align-items: center;
}

.condition-badge {
    display: inline-block;
    margin-top: 3px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.temp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 12px 0;
}

.temp-large {
    font-size: 2.95rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.5px;
    color: var(--text-main);
}

.feels-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.meta-pills {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

.sun-times {
    font-size: 0.78rem;
    color: #d97706;
    display: flex;
    justify-content: space-between;
    background: var(--card-subtle);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 700;
}
body.dark-mode .sun-times { color: #fbbf24; }

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 700;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.fav-btn {
    background: var(--card-subtle);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    padding: 4px 9px;
    color: var(--danger);
    font-weight: 700;
}

/* Fullscreen Detail Modal */
.full-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(15, 23, 42, 0.56);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    z-index: 2000;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-x: contain;
    padding-bottom: 50px;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(35px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-banner {
    padding: 18px 16px 24px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.28) 100%);
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.modal-inner { max-width: 780px; margin: 0 auto; padding: 0 16px; }

.modal-header {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-size: 1.15rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-hero {
    text-align: center;
    padding: 10px 0 4px 0;
}

.modal-section-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.52);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    display: inline-block;
    padding: 5px 12px;
    border-radius: 10px;
    margin: 22px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radar-frame-box {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    touch-action: none;
    overscroll-behavior: contain;
}

.chart-card, .forecast-box, .climate-controls {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.hourly-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-top: 10px;
}
.hourly-item {
    background: var(--card-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 9px 8px;
    min-width: 66px;
    text-align: center;
    flex-shrink: 0;
}
.hourly-pop {
    font-size: 0.72rem;
    color: var(--accent);
    min-height: 15px;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 600px) {
    .detail-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 12px;
    text-align: center;
    box-shadow: var(--shadow-card);
}
.stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.stat-val { font-size: 1.22rem; font-weight: 800; margin-top: 5px; color: var(--text-main); }
.stat-sub { font-size: 0.72rem; color: var(--accent); margin-top: 3px; font-weight: 600; }

.daylight-track {
    height: 7px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    margin: 12px 0 4px 0;
    overflow: hidden;
}
.daylight-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 999px;
}

.forecast-row {
    display: grid;
    grid-template-columns: 56px 34px 48px 1fr 40px;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.forecast-row:last-child { border-bottom: none; }
.temp-bar-bg {
    height: 7px;
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    position: relative;
    overflow: hidden;
}
.temp-bar-fill {
    position: absolute;
    top: 0; bottom: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #f59e0b);
}

.climate-controls { display: flex; flex-direction: column; gap: 12px; }
.climate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.climate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

#modalMeteogram {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.loading { text-align: center; font-size: 1rem; color: #ffffff; padding: 50px 20px; font-weight: 600; }
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    display: none;
}

/* 3-Strich-Menü (App Drawer), Weltraumwetter & Einstellungen */
.menu-btn {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: none;
}
.app-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 82vw;
    background: #0f172a;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    z-index: 2600;
    padding: 20px 14px;
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #f8fafc;
}
.app-drawer.open { transform: translateX(0); }
.drawer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(30, 41, 59, 0.55);
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}
.drawer-item.active {
    background: rgba(56, 189, 248, 0.18);
    border-color: #38bdf8;
    color: #38bdf8;
}
.space-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.space-row:last-child { border-bottom: none; }
.countdown-pill {
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
}

/* Einstellungen-Komponenten */
.settings-card {
    background: var(--card-bg);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 6px 16px;
    box-shadow: var(--shadow-card);
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.setting-row:last-child { border-bottom: none; }
.setting-info {
    flex: 1;
    min-width: 180px;
}
.setting-title {
    font-weight: 800;
    font-size: 0.94rem;
    color: var(--text-main);
}
.setting-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.35;
}
.seg-group {
    display: inline-flex;
    background: var(--card-subtle);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
}
.seg-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 7px 12px;
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.seg-btn.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.32);
}
.switch-toggle {
    position: relative;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    transition: 0.22s;
}
.switch-slider::before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: 0.22s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}
.switch-toggle input:checked + .switch-slider {
    background: var(--accent);
}
.switch-toggle input:checked + .switch-slider::before {
    transform: translateX(22px);
}
.setting-select {
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card-subtle);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 700;
    outline: none;
}
.btn-secondary {
    padding: 9px 14px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.btn-danger-soft {
    padding: 9px 14px;
    background: rgba(220, 38, 38, 0.14);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}