/* Eurovision Color Palette */
:root {
    --eurovision-pink: #ff46f1;
    --eurovision-cyan: #00f6f9;
    --eurovision-gold: #b88704;
    --eurovision-silver: #6b6b70;
    --eurovision-bronze: #a1512e;

    --bg-primary: #000000;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-hover: rgba(255, 255, 255, 0.12);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-pink: rgba(255, 70, 241, 0.15);
    --bg-glass-cyan: rgba(0, 246, 249, 0.15);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.35);

    --border-color: rgba(255, 255, 255, 0.1);
    --divider-color: rgba(255, 255, 255, 0.1);

    --tab-bar-height: 100px;
    --header-height: 56px;
    --max-content-width: 768px;

    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* SVG Icons */
.svg-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-stack);
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: url('../images/mobile.svg') no-repeat center center fixed;
    background-size: cover;
    position: relative;
}

/* Eurovision background gradient overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 70, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 246, 249, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 768px) {
    body {
        background-image: url('../images/desktop.svg');
    }
}

/* Layout */
.loading-screen {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 1000;
}

.loading-screen.active {
    display: flex;
}

.app-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1;
}

.app-container.active {
    display: flex;
    flex-direction: column;
}

/* Views */
.view {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.view.active {
    display: flex;
}

.view.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: url('../images/mobile.svg') no-repeat center center;
    background-size: cover;
}

.view.overlay::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 70, 241, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 246, 249, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 768px) {
    .view.overlay {
        background-image: url('../images/desktop.svg');
    }
}

.view.overlay > * {
    position: relative;
    z-index: 1;
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: url('../images/mobile.svg') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .modal {
        background-image: url('../images/desktop.svg');
        width: 600px;
        max-height: 80vh;
        margin: auto;
        border-radius: 20px;
        border: none;
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.4),
            0 0 48px rgba(0, 0, 0, 0.2);
    }

    .modal::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        box-shadow:
            inset 1px 1px 1px 0 rgba(255, 255, 255, 0.2),
            inset -1px -1px 1px 0 rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.15);
        pointer-events: none;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    min-height: var(--header-height);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    transition: background-color 0.2s, backdrop-filter 0.2s, -webkit-backdrop-filter 0.2s;
}

.modal-header.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.modal-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

/* View Header */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: var(--header-height);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    transition: background-color 0.2s, backdrop-filter 0.2s, -webkit-backdrop-filter 0.2s;
}

.view-header.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.view-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Scrollable Content */
.scroll-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(var(--header-height) + 16px) 16px 16px;
    padding-bottom: calc(16px + var(--tab-bar-height));
}

.view.overlay .scroll-content {
    padding-bottom: 16px;
}

.modal .scroll-content {
    padding-bottom: 24px;
}

/* Sections */
.section {
    margin-bottom: 24px;
}

.section-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Event Year Header */
.event-year-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 0 0 16px;
}

.year-bold {
    font-size: 1.25rem;
    font-weight: 700;
}

.event-label {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* ========================================
   Liquid Glass System
   Uses ::before for blur+distortion layer,
   ::after for shine/edge highlight layer,
   and the element background for tint.
   ======================================== */
.liquid-glass {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.2),
        0 0 12px rgba(0, 0, 0, 0.08);
}

/* Blur + distortion layer */
.liquid-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: inherit;
}

/* Shine + edge highlight layer */
.liquid-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

/* Tint — on the element itself, sits between ::before and ::after */
.liquid-glass > * {
    position: relative;
    z-index: 1;
}

/* ========================================
   Glass Card (liquid glass variant)
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    transition: background-color 0.2s;
}

.glass-card.glass-pink {
    background: rgba(255, 70, 241, 0.1);
}

.glass-card.glass-pink::after {
    border-color: rgba(255, 70, 241, 0.2);
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 70, 241, 0.15),
        inset -1px -1px 1px 0 rgba(255, 70, 241, 0.08);
}

.glass-card.clickable {
    cursor: pointer;
}

.glass-card.clickable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.glass-card.clickable:active {
    background: rgba(255, 255, 255, 0.13);
}

/* Country List */
.country-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Country Row & Score Row */
.country-row,
.score-row {
    padding: 10px 12px;
}

.country-row-inner,
.score-row-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.running-order {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.flag-emoji {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.flag-emoji.large {
    font-size: 2.5rem;
}

.country-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.country-name {
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-name.large {
    font-size: 1.25rem;
}

.country-song {
    font-size: 0.7rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-artist {
    font-size: 0.65rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-trailing {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
}

.chevron .svg-icon {
    width: 1rem;
    height: 1rem;
}

/* Vote Indicators */
.vote-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vote-indicator .svg-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.vote-indicator.voted {
    color: var(--eurovision-cyan);
}

.vote-indicator.locked {
    color: var(--text-secondary);
}

.vote-indicator.locked .svg-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Score Display */
.score-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.score-value.muted {
    color: var(--text-secondary);
}

.score-votes {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Expand Chevron */
.expand-chevron {
    color: var(--text-tertiary);
    transition: transform 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.expand-chevron .svg-icon {
    width: 0.65rem;
    height: 0.65rem;
}

.expand-chevron.expanded {
    transform: rotate(180deg);
}

/* Expanded Details */
.expanded-details {
    padding: 6px 12px;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.detail-header {
    display: flex;
    padding: 4px 0 8px;
}

.detail-header .detail-label {
    flex: 1;
}

.detail-col-header {
    width: 72px;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 6px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid var(--divider-color);
}

.detail-label {
    flex: 1;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.detail-value {
    width: 72px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Sheet (Voting Detail) */
.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: var(--header-height);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    transition: background-color 0.2s, backdrop-filter 0.2s, -webkit-backdrop-filter 0.2s;
}

.sheet-header.scrolled {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), transparent);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

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

.country-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Category Sections */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
}

.category-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.category-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Vote Select (dropdown) */
.vote-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-stack);
    cursor: pointer;
    min-width: 80px;
    text-align: center;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 0 8px rgba(0, 0, 0, 0.06);
}

.vote-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vote-select:focus {
    outline: none;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(0, 246, 249, 0.4);
}

.vote-locked {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 80px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.15),
        0 0 8px rgba(0, 0, 0, 0.06);
}

.lock-icon {
    display: inline-flex;
    align-items: center;
}

.lock-icon .svg-icon {
    width: 0.75rem;
    height: 0.75rem;
}

/* Glass Pill (generic) */
.glass-pill {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 999px;
    padding: 8px 20px;
}

/* Buttons */
.icon-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    line-height: 1;
    font-size: inherit;
    font-family: var(--font-stack);
}

.icon-btn .svg-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.icon-btn:hover {
    background: var(--bg-glass);
}

.icon-btn.has-label {
    width: auto;
    padding: 0 12px;
    gap: 4px;
}

.icon-btn.danger {
    color: #ff6b6b;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: var(--font-stack);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    border-radius: inherit;
}

.btn-glass::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.btn-glass > * {
    position: relative;
    z-index: 1;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-glass:disabled {
    opacity: 0.4;
    cursor: default;
}

.btn-glass.full-width {
    width: 100%;
}

/* Hint Cards */
.hint-card {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    padding: 16px;
    margin-bottom: 16px;
}

.hint-card.hint-pink {
    background: rgba(255, 70, 241, 0.1);
}

.hint-card.hint-pink::after {
    border-color: rgba(255, 70, 241, 0.2);
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 70, 241, 0.15),
        inset -1px -1px 1px 0 rgba(255, 70, 241, 0.08);
}

.hint-card.hint-cyan {
    background: rgba(0, 246, 249, 0.1);
}

.hint-card.hint-cyan::after {
    border-color: rgba(0, 246, 249, 0.2);
    box-shadow:
        inset 1px 1px 1px 0 rgba(0, 246, 249, 0.15),
        inset -1px -1px 1px 0 rgba(0, 246, 249, 0.08);
}

.hint-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.hint-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hint-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hint-close::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: inherit;
}

.hint-close::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.hint-close .svg-icon {
    position: relative;
    z-index: 1;
    width: 0.75rem;
    height: 0.75rem;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 40;
    padding: 8px 10px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 0));
}

.tab-bar-inner {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 8px;
}

/* Shared glass pill for tab bar groups */
.tab-bar-group {
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(0, 0, 0, 0.15);
}

.tab-bar-group::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: inherit;
}

.tab-bar-group::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.25),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.tab-bar-group > * {
    position: relative;
    z-index: 3;
}

.tab-bar-tabs {
    flex: 3 1 0;
    max-width: 50%;
    min-width: 0;
}

.tab-event-header {
    flex: 1 3 0;
    max-width: 50%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 16px;
}

.tab-bar.hidden {
    display: none;
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    z-index: 3;
    font-family: var(--font-stack);
    transition: color 0.2s;
}

.tab.active {
    color: var(--eurovision-pink);
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-icon .svg-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.tab-label {
    font-size: 0.65rem;
    font-weight: 500;
}

.tab-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    background: #ff3b30;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Event Header Component */
.event-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.event-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.dot-green {
    background: #34c759;
}

.dot-red {
    background: #ff3b30;
}

.status-text {
    font-size: 0.8rem;
    font-weight: 600;
}

.event-name {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Statistics */
.stats-card {
    padding: 16px;
    margin-bottom: 10px;
}

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

.stat-row span:first-child,
.stat-label {
    font-weight: 600;
    font-size: 0.875rem;
}

.stat-value {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.stat-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-divider {
    height: 1px;
    background: var(--divider-color);
    margin: 14px 0;
}

.category-stat {
    flex-direction: row;
    align-items: flex-start;
}

/* Settings */
.settings-card {
    padding: 16px;
    margin-bottom: 10px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.setting-label {
    font-size: 0.875rem;
}

.setting-value {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.setting-value.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

.setting-caption {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.3;
}

.link-row {
    cursor: pointer;
    transition: opacity 0.2s;
}

.link-row:hover {
    opacity: 0.7;
}

.link-icon {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
}

.link-icon .svg-icon {
    width: 0.875rem;
    height: 0.875rem;
}

/* Empty & Loading States */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    flex: 1;
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    max-width: 280px;
    line-height: 1.4;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 1;
    padding: 60px;
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

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

/* Toast */
.toast {
    position: fixed;
    bottom: calc(var(--tab-bar-height) + 20px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 0.85rem;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    overflow: hidden;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 0 24px rgba(0, 0, 0, 0.15);
}

.toast::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-radius: inherit;
}

.toast::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    box-shadow:
        inset 1px 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -1px -1px 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Locked row */
.locked-row {
    opacity: 0.5;
    cursor: pointer;
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    .scroll-content {
        max-width: var(--max-content-width);
        margin: 0 auto;
        width: 100%;
    }

    .view-header {
        padding-left: max(16px, calc((100% - var(--max-content-width)) / 2 + 16px));
        padding-right: max(16px, calc((100% - var(--max-content-width)) / 2 + 16px));
    }

    .tab-bar-inner {
        max-width: var(--max-content-width);
    }

    .score-row,
    .country-row {
        padding: 12px 16px;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .tab-bar {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}
