:root {
    --sidebar-w: 260px;
    --nav-height: 64px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Rounded", 'Onest', sans-serif;
    --font-mono: 'SF Mono', Monaco, monospace;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --dur-fast: 0.2s;
    --dur-base: 0.3s;
    --dur-slow: 0.5s;
    --bg: #000000;
    --bg-soft: #0a0a0f;
    --bg-elevated: #111118;
    --bg-rgb: 0, 0, 0;
    --minus-bg-rgb: 242, 244, 248;
    --surface: rgba(28, 28, 35, 0.6);
    --surface-elevated: rgba(35, 35, 45, 0.7);
    --surface-muted: rgba(20, 20, 28, 0.5);
    --surface-glass: rgba(25, 25, 35, 0.75);
    --text: #f5f5f7;
    --text-secondary: rgba(245, 245, 247, 0.7);
    --text-muted: rgba(245, 245, 247, 0.45);
    --text-faint: rgba(245, 245, 247, 0.25);
    --border: rgba(255, 255, 255, 0.08);
    --border-soft: rgba(255, 255, 255, 0.04);
    --border-strong: rgba(255, 255, 255, 0.12);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 80px rgba(59, 130, 246, 0.25);
    --accent: #3B82F6;
    --accent-2: #8B5CF6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --accent-2-soft: rgba(139, 92, 246, 0.15);
    --success: #22C55E;
    --success-soft: rgba(34, 197, 94, 0.15);
    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --error: #EF4444;
    --error-soft: rgba(239, 68, 68, 0.15);
    --glass-blur: blur(40px) saturate(180%);
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-2));
    --gradient-text: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.9) 100%);
}

[data-theme="light"] {
    --bg: #f2f4f8;
    --bg-soft: #ffffff;
    --bg-elevated: #ffffff;
    --bg-rgb: 242, 244, 248;
    --minus-bg-rgb: 0, 0, 0;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-elevated: rgba(255, 255, 255, 0.6);
    --surface-muted: rgba(240, 243, 248, 0.55);
    --surface-glass: rgba(255, 255, 255, 0.5);
    --text: #0f172a;
    --text-secondary: rgba(15, 23, 42, 0.8);
    --text-muted: rgba(15, 23, 42, 0.7);
    --text-faint: rgba(15, 23, 42, 0.6);
    --border: rgba(148, 163, 184, 0.25);
    --border-soft: rgba(148, 163, 184, 0.15);
    --border-strong: rgba(148, 163, 184, 0.35);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.08), 0 8px 16px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.12), 0 12px 32px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 0 40px rgba(37, 99, 235, 0.2);
    --accent: #2563EB;
    --accent-2: #7C3AED;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --accent-2-soft: rgba(124, 58, 237, 0.12);
    --success: #16A34A;
    --success-soft: rgba(22, 163, 74, 0.15);
    --warning: #D97706;
    --warning-soft: rgba(217, 119, 6, 0.15);
    --error: #DC2626;
    --error-soft: rgba(220, 38, 38, 0.15);
    --glass-blur: blur(20px) saturate(180%);
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--accent-2));
    --gradient-text: linear-gradient(135deg, #0f172a 20%, rgba(15, 23, 42, 0.85));
}

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

* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

input, textarea, .selectable {
    user-select: text;
}

a {
    text-decoration: none;
    color: inherit;
    outline: none;
}

html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'ss01', 'cv11';
    background: var(--bg);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(env(safe-area-inset-top) + 60px);
    backdrop-filter: blur(4px) saturate(50%);
    -webkit-backdrop-filter: blur(4px) saturate(50%);
    background: rgba(var(--bg-rgb), 0.4);
    z-index: 9998;
    pointer-events: none;
    mask-image: linear-gradient(
            to bottom,
            black 0%,
            black 25%,
            rgba(0, 0, 0, 0.95) 35%,
            rgba(0, 0, 0, 0.85) 45%,
            rgba(0, 0, 0, 0.7) 55%,
            rgba(0, 0, 0, 0.5) 65%,
            rgba(0, 0, 0, 0.3) 72%,
            rgba(0, 0, 0, 0.15) 80%,
            rgba(0, 0, 0, 0.08) 85%,
            rgba(0, 0, 0, 0.03) 90%,
            rgba(0, 0, 0, 0.01) 95%,
            transparent 100%
    );
    -webkit-mask-image: linear-gradient(
            to bottom,
            black 0%,
            black 25%,
            rgba(0, 0, 0, 0.95) 35%,
            rgba(0, 0, 0, 0.85) 45%,
            rgba(0, 0, 0, 0.7) 55%,
            rgba(0, 0, 0, 0.5) 65%,
            rgba(0, 0, 0, 0.3) 72%,
            rgba(0, 0, 0, 0.15) 80%,
            rgba(0, 0, 0, 0.08) 85%,
            rgba(0, 0, 0, 0.03) 90%,
            rgba(0, 0, 0, 0.01) 95%,
            transparent 100%
    );
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(env(safe-area-inset-top) + 50px);
    background: linear-gradient(
            to bottom,
            rgba(var(--bg-rgb), 0.4) 0%,
            rgba(var(--bg-rgb), 0.3) 20%,
            rgba(var(--bg-rgb), 0.2) 40%,
            rgba(var(--bg-rgb), 0.1) 55%,
            rgba(var(--bg-rgb), 0.05) 70%,
            rgba(var(--bg-rgb), 0.025) 82%,
            rgba(var(--bg-rgb), 0.015) 90%,
            transparent 100%
    );
    z-index: 9999;
    pointer-events: none;
}

.content, .main, .app, .glass {
    overflow: visible !important;
}

.glass {
    background: var(--surface-glass);
    color: var(--text);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    isolation: isolate;
    transform: translateZ(0);
}

[data-theme="light"] .glass {
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

[data-theme="light"] .glass::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 50%);
}

.skeleton {
    background: linear-gradient(90deg,
    var(--surface-muted) 25%,
    var(--surface) 50%,
    var(--surface-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 200px;
    margin-bottom: 16px;
}

.skeleton-line {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 8px;
}

.auth-form input {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    transition: all 0.3s ease;
    outline: none;
}

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

.auth-form input:focus {
    background: var(--surface-elevated);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.auth-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: -8px;
    margin-left: 4px;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

@media (hover: hover) and (pointer: fine) {
    .auth-switch a:hover {
        filter: brightness(1.2);
        text-decoration: underline;
    }
}

.auth-info-box {
    background: var(--accent-soft);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.auth-info-box-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-info-box ol {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-info-box b {
    color: var(--text);
    font-weight: 600;
}

.verify-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.verify-text {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.verify-text b {
    color: var(--accent);
    font-weight: 600;
}

.verify-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.preview-box {
    display: none;
    background: var(--success-soft);
    border: 1px solid var(--success);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--success);
    margin-top: -4px;
    animation: fadeIn 0.3s ease;
}

.auth-error {
    background: var(--error-soft);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 500;
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset;
    border: 1px solid var(--accent);
}

@media (hover: hover) and (pointer: fine) {
    input:-webkit-autofill:hover {
        -webkit-text-fill-color: var(--text);
        -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset;
        border: 1px solid var(--accent);
    }
}


@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(-5deg)
    }
    50% {
        transform: translateY(-10px) rotate(5deg)
    }
}

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

.preview-box-label {
    margin-right: 8px;
    opacity: 0.8;
}

.preview-box-value {
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 1px;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    padding: 16px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    background: var(--surface-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border);
}

.sidebar-header {
    flex-shrink: 0;
    margin-top: calc(env(safe-area-inset-top) + 8px);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
}

.sidebar-nav {
    flex: 1;
    overflow-y: scroll !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-right: -8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 12px;
    padding-top: 16px;
    margin-top: auto;
    border-top: 1px solid var(--border-soft);
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 14px 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
}

.logo-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px var(--shadow-glow);
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-sub {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.svg-icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.btn-icon {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
}

@media (hover: hover) and (pointer: fine) {
    .nav-item:hover {
        background: var(--surface-elevated);
        color: var(--text);
    }
}

.nav-item.active {
    background: var(--accent-soft);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), var(--shadow-sm);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 3px;
    background: var(--gradient-accent);
    border-radius: 0 2px 2px 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99em;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: background var(--dur-base);
}

@media (hover: hover) and (pointer: fine) {
    .user-card:hover {
        background: var(--surface-elevated);
    }
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    margin-top: env(safe-area-inset-top);
    min-height: 100vh;
}

@keyframes searchPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

.or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--border) 50%, transparent 100%);
}

.or-divider::before {
    margin-right: 16px;
}

.or-divider::after {
    margin-left: 16px;
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.results-toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.hide-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s var(--ease-out);
    font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
    .hide-results-btn:hover {
        background: var(--error-soft);
        border-color: var(--error);
        color: var(--error);
    }
}

.hide-results-btn svg {
    fill: currentColor;
    transition: transform 0.2s var(--ease-out);
}

.hide-results-btn:hover svg {
    transform: rotate(90deg);
}

.search-with-suggestions {
    position: relative;
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.search-with-suggestions input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-md) var(--radius-md) var(--radius-xl);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-with-suggestions .btn {
    white-space: nowrap;
    border-radius: var(--radius-md) var(--radius-xl) var(--radius-xl) var(--radius-md);
}

.search-with-suggestions input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

#quickSearchResults.hiding {
    animation: fadeOut 0.3s var(--ease-out) forwards;
}

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

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--dur-base);
    position: relative;
    color: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
    .icon-btn:hover {
        background: var(--surface-elevated);
        color: var(--text);
        transform: translateY(-1px);
    }
}

.icon-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.icon-btn .dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    border: 2px solid var(--bg);
}

.content {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.page {
    display: none;
    animation: pageIn var(--dur-slow) var(--ease-out);
}

.page.active {
    display: block;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

[data-theme="light"] .hero-badge {
    border-color: rgba(2, 136, 209, 0.3);
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.02;
    margin-bottom: 16px;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual {
    width: 320px;
    height: 280px;
    position: relative;
}

.typo-element {
    position: absolute;
    font-weight: 900;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse-scale 3s infinite ease-in-out;
    filter: drop-shadow(0 10px 30px var(--shadow-glow));
}

.typo-year {
    font-size: 80px;
    left: 5%;
    opacity: 0.9;
}

.typo-plus {
    font-size: 120px;
    top: 15%;
    left: 40%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-2), var(--error));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-delay: -1s;
}

.typo-vuz {
    font-size: 90px;
    top: 55%;
    right: 5%;
    background: linear-gradient(135deg, var(--success), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation-delay: -2s;
}

@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1) rotate(-1deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.04) rotate(1deg);
        opacity: 1;
    }
}

.btn {
    padding: 14px 24px;
    border-radius: 99em;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-base) var(--ease-out);
    box-shadow: var(--shadow-sm);
    appearance: none;
    gap: 10px;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

.btn:active {
    transform: scale(0.98);
}

.btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.btn-primary {
    background: var(--gradient-accent);
    border: none !important;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        filter: brightness(1.1);
        transform: translateY(-1px);
    }
}

.btn-logout {
    background: transparent;
    color: var(--text-muted);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: color var(--dur-slow) ease, border-color var(--dur-slow) ease;
}

.btn-logout::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background-color: var(--error);
    border-radius: 64px;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: -1;
}

@media (hover: hover) and (pointer: fine) {
    .btn-logout:hover {
        color: white;
        border-color: var(--error);
    }

    .btn-logout:hover::after {
        transform: translate(-50%, -50%) scale(1);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.si-1 {
    background: linear-gradient(135deg, var(--accent), #0288D1);
}

.si-2 {
    background: linear-gradient(135deg, var(--accent-2), #6A1B9A);
}

.si-3 {
    background: linear-gradient(135deg, var(--success), #2E7D32);
}

.si-4 {
    background: linear-gradient(135deg, var(--warning), #E65100);
}

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

.section-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.section-link {
    font-size: 13px;
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--dur-fast);
}

@media (hover: hover) and (pointer: fine) {
    .section-link:hover {
        opacity: 0.8;
    }
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.quick-card {
    padding: 24px;
    cursor: pointer;
    transition: transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .quick-card:hover {
        transform: translateY(-3px);
    }
}

.quick-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quick-card-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.quick-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.quick-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.qc-1 .quick-card-icon {
    background: linear-gradient(135deg, var(--accent), #0288D1);
}

.qc-2 .quick-card-icon {
    background: linear-gradient(135deg, var(--accent-2), #6A1B9A);
}

.qc-3 .quick-card-icon {
    background: linear-gradient(135deg, var(--success), #2E7D32);
}

.wizard {
    padding: 32px;
}

.wizard-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.wizard-step {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-xl);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .wizard-step:hover {
        background: var(--surface);
    }
}

.wizard-step.active {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.wizard-step.done {
    background: var(--success-soft);
    border-color: var(--success);
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.wizard-step.active .step-num {
    background: var(--gradient-accent);
    color: white;
}

.wizard-step.done .step-num {
    background: var(--success);
    color: white;
}

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

.step-title {
    font-size: 13px;
    font-weight: 600;
}

.step-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.wizard-content {
    min-height: 200px;
}

.wizard-panel {
    display: none;
    animation: pageIn 0.3s;
}

.wizard-panel.active {
    display: block;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.chip {
    padding: 12px 18px;
    border-radius: 99em;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dur-base) var(--ease-bounce);
    user-select: none;
}

@media (hover: hover) and (pointer: fine) {
    .chip:hover {
        background: var(--surface-elevated);
        transform: translateY(-1px);
    }
}

.chip.selected {
    background: var(--gradient-accent);
    background-clip: padding-box;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 16px var(--shadow-glow);
}

.chip.mandatory {
    background: var(--error-soft);
    border-color: var(--error);
}

.chip.mandatory.selected {
    background: linear-gradient(135deg, var(--error), var(--accent-2));
    color: white;
}

.progress-card {
    padding: 20px 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
}

.progress-track {
    height: 10px;
    background: var(--surface-muted);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 5px;
    transition: width 0.5s var(--ease-bounce);
    box-shadow: 0 0 12px var(--shadow-glow);
}

input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-display {
    text-align: center;
    padding: 40px 0 30px;
}

.score-value {
    font-size: 96px;
    font-weight: 800;
    letter-spacing: -4px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.score-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score-slider {
    padding: 0 12px;
}

.score-slider input {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--surface-muted);
    outline: none;
}

.score-slider input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--accent));
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 16px var(--shadow-glow), inset 0 2px 4px rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.score-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 10px;
    padding: 0 8px;
}

.score-meaning {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    border-left: 3px solid var(--accent);
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.subject-score-block input[type="checkbox"],
.subject-score-block input[type="radio"] {
    width: 12px;
    height: 12px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--accent);
    transform: scale(1.3);
    transform-origin: left center;
}

.subject-score-block {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s var(--ease-out);
}

.subject-score-block.selected {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.subject-score-value:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface-elevated);
}

.subject-score-value:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.subject-score-value {
    width: 80px;
    min-width: 60px;
    padding: 4px 8px;
    font-size: 24px;
    font-weight: 800;
    text-align: right;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--accent);
    -moz-appearance: textfield;
}

.subject-score-block:not(.selected) .subject-score-name {
    color: var(--text-muted);
    transition: color var(--dur-base) var(--ease-out);
}

.subject-score-block:not(.selected) .subject-score-value {
    color: var(--text-muted);
    opacity: 0.5;
}

.subject-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subject-score-name {
    font-size: 15px;
    font-weight: 600;
}

.subject-score-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--surface-muted);
    outline: none;
    -webkit-appearance: none;
}

.subject-score-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, var(--accent));
    box-shadow: 0 4px 12px var(--shadow-glow), inset 0 2px 4px rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.subject-score-block:not(.selected) .subject-score-slider {
    background: var(--surface);
    opacity: 0.7;
    pointer-events: none;
}

.subject-score-block:not(.selected) .subject-score-slider::-webkit-slider-thumb {
    background: radial-gradient(circle at 30% 30%, #fff, #999);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.subject-score-block:not(.selected) .subject-score-slider::-moz-range-thumb {
    background: radial-gradient(circle at 30% 30%, #fff, #999);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.subject-score-block:not(.selected) .subject-score-value {
    background: var(--surface-muted);
}

.total-score-display {
    padding: 24px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 24px;
}

.total-score-value {
    font-size: 64px;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3;
}

.total-score-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.uni-card {
    padding: 22px;
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    min-height: 480px;
    position: relative;
    overflow: visible;
    color: var(--text);
}

.uni-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .uni-card::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 50%);
}

.uni-card > * {
    position: relative;
    z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
    .uni-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
        border-color: var(--border-strong);
    }
}

.uni-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.uni-chance {
    padding: 5px 12px;
    border-radius: 99em;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ch-high {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success);
}

.ch-mid {
    background: var(--warning-soft);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.ch-low {
    background: var(--error-soft);
    color: var(--error);
    border: 1px solid var(--error);
}

.uni-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.uni-direction {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.uni-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 80px;
}

.uni-stat-mini {
    padding: 10px 12px;
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
}

.uni-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.uni-stat-val {
    font-size: 15px;
    font-weight: 700;
}

.uni-chance-block {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    min-height: 50px;
}

.uni-chance-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
}

.uni-chance-text.ch-high {
    color: var(--success);
}

.uni-chance-text.ch-mid {
    color: var(--warning);
}

.uni-chance-text.ch-low {
    color: var(--error);
}

.uni-subjects-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subjects-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subjects-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uni-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 40px;
    align-items: flex-start;
}

.uni-subj-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: 13px;
    font-weight: 500;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    transition: all var(--dur-base);
}

.uni-subj-chip.mandatory {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.uni-subj-chip.elective {
    background: var(--success-soft);
    color: var(--success);
    border-color: var(--success);
}

.uni-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.uni-action-btn {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (hover: hover) and (pointer: fine) {
    .uni-action-btn:hover {
        background: var(--surface-elevated);
        color: var(--text);
    }
}

.uni-action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.favorite-heart {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s var(--ease-out);
    padding: 0;
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .favorite-heart {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.4);
}

.favorite-heart svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.5;
    transition: all 0.3s var(--ease-bounce);
}

@media (hover: hover) and (pointer: fine) {
    .favorite-heart:hover {
        transform: scale(1.1);
        background: rgba(255, 69, 58, 0.15);
        color: #FF453A;
    }
}

.favorite-heart.is-favorite {
    background: linear-gradient(135deg, #FF453A, #FF6B6B);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 16px rgba(255, 69, 58, 0.2);
}

.favorite-heart.is-favorite svg {
    fill: rgba(255, 255, 255, 0.6);
    stroke: rgba(255, 255, 255, 0.6);
    animation: heart-pop 0.5s var(--ease-bounce);
}

@keyframes heart-pop {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.4) rotate(-15deg);
    }
    60% {
        transform: scale(0.9) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

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

.live-competition-block {
    margin-bottom: 12px;
}

.competition-stats {
    padding: 12px 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    font-size: 13px;
}

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

.competition-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.4);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 0 6px rgba(48, 209, 88, 0);
    }
}

.live-count {
    font-size: 16px;
    color: var(--text);
}

.live-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.competition-trend {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 99em;
    font-weight: 600;
}

.trend-up {
    background: var(--warning-soft);
    color: var(--warning);
}

.trend-down {
    background: var(--success-soft);
    color: var(--success);
}

.my-position {
    padding: 8px 10px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.position-rank {
    color: var(--text);
    font-weight: 500;
}

.position-percentile {
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.competition-percentiles {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.percentile-item {
    flex: 1;
    padding: 6px 8px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    text-align: center;
}

.p-label {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.p-value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.competition-updated {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.live-competition-block.just-updated .competition-stats {
    animation: highlight-update 1s ease-out;
}

@keyframes highlight-update {
    0% {
        background: var(--accent-soft);
    }
    100% {
        background: var(--surface-muted);
    }
}

.calendar-timeline {
    position: relative;
    padding-left: 40px;
}

.calendar-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--gradient-accent);
    opacity: 0.3;
}

.cal-item {
    position: relative;
    padding: 20px 24px;
    margin-bottom: 14px;
}

.cal-item::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 26px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 3px solid var(--accent);
}

.cal-item.done::before {
    background: var(--success);
    border-color: var(--success);
}

.cal-item.current::before {
    background: var(--warning);
    border-color: var(--warning);
    box-shadow: 0 0 0 6px var(--warning-soft);
}

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

.cal-month-tag {
    padding: 3px 10px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 99em;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.cal-status {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.st-done {
    color: var(--success);
}

.st-current {
    color: var(--warning);
}

.st-upcoming {
    color: var(--text-muted);
}

.cal-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.cal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.cal-tip {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--accent-2-soft);
    border-left: 3px solid var(--accent-2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
}

.ai-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.ai-chat-box {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    margin: 0 -8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.ai-msg {
    padding: 14px 18px;
    border-radius: var(--radius-xl);
    max-width: 75%;
    font-size: 14px;
    line-height: 1.5;
    animation: msgIn 0.3s var(--ease-bounce);
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-msg.bot {
    background: var(--accent-soft);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.ai-msg.user {
    background: var(--gradient-accent);
    color: white;
    border: none !important;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.ai-typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    align-self: flex-start;
    background: var(--accent-soft);
    border-radius: 18px 18px 18px 6px;
}

.ai-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: typing 1.2s infinite ease-in-out;
}

.ai-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

.ai-input-wrap {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.ai-input-wrap input {
    flex: 1;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl) var(--radius-md) var(--radius-md) var(--radius-xl);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.ai-input-wrap input:focus {
    border-color: var(--accent);
}

.ai-send-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md) var(--radius-xl) var(--radius-xl) var(--radius-md);
    background: var(--gradient-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--dur-fast);
    flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
    .ai-send-btn:hover {
        transform: scale(1.05);
    }
}

.ai-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.ai-sidebar {
    padding: 24px;
    height: fit-content;
}

.ai-suggest-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.ai-suggest-item {
    padding: 12px 14px;
    border-radius: var(--radius-xl);
    background: var(--surface-muted);
    border: 1px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all var(--dur-base);
}

@media (hover: hover) and (pointer: fine) {
    .ai-suggest-item:hover {
        background: var(--surface);
        border-color: var(--accent);
    }
}

.typing-cursor {
    display: inline-block;
    color: var(--accent);
    animation: blink 0.8s infinite;
    margin-left: 2px;
    font-weight: 400;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

.ach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.ach-card {
    padding: 20px;
    text-align: center;
    transition: transform var(--dur-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .ach-card:hover {
        transform: translateY(-3px);
    }
}

.ach-card.locked {
    opacity: 0.5;
    filter: grayscale(0.7);
}

.ach-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow-md);
}

.ach-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ach-desc {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.review-card {
    padding: 22px;
}

.review-head {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.review-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.review-author {
    font-size: 14px;
    font-weight: 600;
}

.review-uni {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.review-stars {
    margin-left: auto;
    color: var(--warning);
    font-size: 14px;
}

.review-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    min-height: 50px;
    max-height: 250px;
    resize: none;
    overflow-y: auto;
    field-sizing: content;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--dur-base) var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 32px;
    border-radius: var(--radius-lg);
    position: relative;
    transform: translateY(20px);
    transition: transform var(--dur-base) var(--ease-out);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.star-rating {
    display: flex;
    gap: 12px;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 36px;
    cursor: pointer;
    user-select: none;
}

.star-rating span {
    color: var(--text-faint);
    transition: all 0.3s ease;
    transform: scale(1);
}

.star-rating span.active {
    color: #FFD700 !important;
    transform: scale(1.1);
}

@media (hover: hover) and (pointer: fine) {
    .star-rating span:hover,
    .star-rating span:hover ~ span {
        color: #FFD700 !important;
        transform: scale(1.1);
    }

}

.settings-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
}

.settings-tabs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.settings-tab {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all var(--dur-base);
    display: flex;
    align-items: center;
    gap: 10px;
}


@media (hover: hover) and (pointer: fine) {
.settings-tab:hover {
    background: var(--surface);
}
}

.settings-tab.active {
    background: var(--accent-soft);
    color: var(--text);
}

.settings-tab svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.settings-panel {
    padding: 28px;
}

.settings-content {
    animation: pageIn 0.3s;
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.toggle-row + .toggle-row {
    border-top: 1px solid var(--border);
}

.toggle-info {
    flex: 1;
}

.toggle-label {
    font-size: 14px;
    font-weight: 600;
}

.toggle-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toggle {
    display: inline-block;
    vertical-align: middle;
    width: 52px;
    height: 28px;
    border-radius: 99em;
    background: var(--surface-muted);
    appearance: none;
    -webkit-appearance: none;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow:
        inset 0 0 0 1px var(--border),
        inset 0 1px 3px rgba(0, 0, 0, 0.25);
    transition:
        background 0.4s var(--ease-out),
        box-shadow 0.45s var(--ease-out);
}

.toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 99em;
    top: 3px;
    left: 3px;
    background: linear-gradient(180deg, #ffffff 0%, #e7e7ea 100%);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition:
        left 0.45s var(--ease-spring),
        width 0.25s var(--ease-out),
        background 0.4s var(--ease-out),
        box-shadow 0.4s var(--ease-out);
}

.toggle.on {
    background: var(--gradient-accent);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 0 18px var(--accent-soft),
        0 2px 10px rgba(59, 130, 246, 0.35);
}

.toggle.on::after {
    left: 27px;
    background: linear-gradient(180deg, #ffffff 0%, #eef3ff 100%);
}

.toggle:active::after { width: 26px; }
.toggle.on:active::after { left: 23px; }

@media (hover: hover) and (pointer: fine) {
    .toggle:hover::after {
        box-shadow:
            0 3px 9px rgba(0, 0, 0, 0.45),
            0 1px 2px rgba(0, 0, 0, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
    }
    .toggle.on:hover {
        box-shadow:
            inset 0 0 0 1px rgba(255, 255, 255, 0.22),
            0 0 26px var(--accent-soft),
            0 2px 14px rgba(59, 130, 246, 0.45);
    }
}

.toggle:focus-visible {
    box-shadow:
        inset 0 0 0 1px var(--accent),
        0 0 0 3px var(--accent-soft);
}

[data-theme="light"] .toggle {
    background: rgba(148, 163, 184, 0.28);
    box-shadow:
        inset 0 0 0 1px var(--border),
        inset 0 1px 2px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .toggle::after {
    box-shadow:
        0 2px 5px rgba(15, 23, 42, 0.22),
        0 1px 2px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 #fff;
}
[data-theme="light"] .toggle.on {
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.3),
        0 0 16px var(--accent-soft),
        0 2px 8px rgba(37, 99, 235, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .toggle,
    .toggle::after {
        transition-duration: 0.01ms !important;
    }
}


.profile-card {
    text-align: center;
    padding: 40px 24px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gradient-accent);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 800;
    color: white;
    box-shadow: 0 8px 32px var(--shadow-glow), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.profile-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent 50%);
    pointer-events: none;
}

.profile-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.profile-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.stat-tile {
    padding: 18px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--dur-base);
}


@media (hover: hover) and (pointer: fine) {
    .stat-tile:hover {
        transform: translateY(-2px);
    }
}

.stat-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 50%);
    pointer-events: none;
}

.stat-tile-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.stat-tile-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.stat-tile.blue {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

.stat-tile.blue .stat-tile-value {
    color: var(--accent);
}

.stat-tile.green {
    background: var(--success-soft);
    border: 1px solid var(--success);
}

.stat-tile.green .stat-tile-value {
    color: var(--success);
}

.stat-tile.purple {
    background: var(--accent-2-soft);
    border: 1px solid var(--accent-2);
}

.stat-tile.purple .stat-tile-value {
    color: var(--accent-2);
}

.stat-tile.orange {
    background: var(--warning-soft);
    border: 1px solid var(--warning);
}

.stat-tile.orange .stat-tile-value {
    color: var(--warning);
}

.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-chip {
    padding: 6px 14px;
    border-radius: 99em;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--dur-fast);
}

@media (hover: hover) and (pointer: fine) {
    .mini-chip:hover {
        transform: translateY(-1px);
    }
}

.mini-chip.blue {
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.mini-chip.purple {
    background: var(--accent-2-soft);
    border: 1px solid var(--accent-2);
    color: var(--accent-2);
}

.ref-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ref-input {
    flex: 1;
    min-width: 0;
}

.ref-btn {
    flex-shrink: 0;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ref-btn:active {
    transform: scale(0.98);
}

.copy-icon {
    font-size: 16px;
    line-height: 1;
}

.copy-text {
    font-size: 14px;
    font-weight: 600;
}

.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--border-soft);
    margin-bottom: 8px;
    transition: background var(--dur-base);
}

@media (hover: hover) and (pointer: fine) {
    .param-row:hover {
        background: var(--surface-elevated);
    }
}

.param-info {
    flex: 1;
}

.param-label {
    font-size: 14px;
    font-weight: 600;
}

.param-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.param-value {
    padding: 4px 12px;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: 99em;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
}

.chance-circle {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.chance-circle svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.chance-circle-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.chance-circle-emoji {
    font-size: 14px;
    line-height: 1;
    margin-bottom: 2px;
}

.chance-circle-percent {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.chance-circle.chance-high .chance-circle-percent {
    color: var(--success);
}

.chance-circle.chance-mid .chance-circle-percent {
    color: var(--warning);
}

.chance-circle.chance-low .chance-circle-percent {
    color: var(--error);
}

.chance-progress {
    transition: stroke-dashoffset 1s ease-in-out;
}

.footer {
    padding: 32px;
    margin-top: 48px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    padding: 16px 22px;
    border-radius: var(--radius-xl);
    background: var(--surface-elevated);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    transform: translateX(calc(100% + 48px));
    transition: transform var(--dur-slow) var(--ease-bounce);
    max-width: min(360px, calc(100vw - 48px));
    width: max-content;
}

.toast.show {
    transform: translateX(0);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: var(--surface);
}

.toast-title {
    font-size: 14px;
    font-weight: 700;
}

.toast-msg {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.theme-switch {
    --toggle-size: 13px;
    --container-width: 5.625em;
    --container-height: 2.5em;
    --container-radius: 6.25em;
    --container-light-bg: #3D7EAE;
    --container-night-bg: #1D1F2C;
    --circle-container-diameter: 3.375em;
    --sun-moon-diameter: 2.125em;
    --sun-bg: #ECCA2F;
    --moon-bg: #C4C9D1;
    --spot-color: #959DB1;
    --circle-container-offset: calc((var(--circle-container-diameter) - var(--container-height)) / 2 * -1);
    --stars-color: #fff;
    --clouds-color: #F3FDFF;
    --back-clouds-color: #AACADF;
    --transition: .5s cubic-bezier(0, -0.02, 0.4, 1.25);
    --circle-transition: .3s cubic-bezier(0, -0.02, 0.35, 1.17);
    cursor: pointer;
    display: inline-block;
}

.theme-switch, .theme-switch *, .theme-switch *::before, .theme-switch *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: var(--toggle-size);
}

.theme-switch__container {
    width: var(--container-width);
    height: var(--container-height);
    background-color: var(--container-light-bg);
    border-radius: var(--container-radius);
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 -0.062em 0.062em rgba(0, 0, 0, 0.25), 0 0.062em 0.125em rgba(255, 255, 255, 0.94);
    transition: var(--transition);
    position: relative;
}

.theme-switch__container::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    box-shadow: 0 0.05em 0.187em rgba(0, 0, 0, 0.25) inset, 0 0.05em 0.187em rgba(0, 0, 0, 0.25) inset;
    border-radius: var(--container-radius);
}

.theme-switch__checkbox {
    display: none;
}

.theme-switch__circle-container {
    width: var(--circle-container-diameter);
    height: var(--circle-container-diameter);
    background-color: rgba(255, 255, 255, 0.1);
    position: absolute;
    left: var(--circle-container-offset);
    top: var(--circle-container-offset);
    border-radius: var(--container-radius);
    box-shadow: inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), inset 0 0 0 3.375em rgba(255, 255, 255, 0.1), 0 0 0 0.625em rgba(255, 255, 255, 0.1), 0 0 0 1.25em rgba(255, 255, 255, 0.1);
    display: flex;
    transition: var(--circle-transition);
    pointer-events: none;
}

.theme-switch__sun-moon-container {
    pointer-events: auto;
    position: relative;
    z-index: 2;
    width: var(--sun-moon-diameter);
    height: var(--sun-moon-diameter);
    margin: auto;
    border-radius: var(--container-radius);
    background-color: var(--sun-bg);
    box-shadow: 0.062em 0.062em 0.062em 0 rgba(254, 255, 239, 0.61) inset, 0 -0.062em 0.062em 0 #a1872a inset;
    filter: drop-shadow(0.062em 0.125em 0.125em rgba(0, 0, 0, 0.25)) drop-shadow(0em 0.062em 0.125em rgba(0, 0, 0, 0.25));
    overflow: hidden;
    transition: var(--transition);
}

.theme-switch__moon {
    transform: translateX(100%);
    width: 100%;
    height: 100%;
    background-color: var(--moon-bg);
    border-radius: inherit;
    box-shadow: 0.062em 0.062em 0.062em 0 rgba(254, 255, 239, 0.61) inset, 0 -0.062em 0.062em 0 #969696 inset;
    transition: var(--transition);
    position: relative;
}

.theme-switch__spot {
    position: absolute;
    top: 0.75em;
    left: 0.312em;
    width: 0.75em;
    height: 0.75em;
    border-radius: var(--container-radius);
    background-color: var(--spot-color);
    box-shadow: 0 0.0312em 0.062em rgba(0, 0, 0, 0.25) inset;
}

.theme-switch__spot:nth-of-type(2) {
    width: 0.375em;
    height: 0.375em;
    top: 0.937em;
    left: 1.375em;
}

.theme-switch__spot:nth-last-of-type(3) {
    width: 0.25em;
    height: 0.25em;
    top: 0.312em;
    left: 0.812em;
}

.theme-switch__clouds {
    width: 1.25em;
    height: 1.25em;
    background-color: var(--clouds-color);
    border-radius: var(--container-radius);
    position: absolute;
    bottom: -0.625em;
    left: 0.312em;
    box-shadow: 0.937em 0.312em var(--clouds-color), -0.312em -0.312em var(--back-clouds-color), 1.437em 0.375em var(--clouds-color), 0.5em -0.125em var(--back-clouds-color), 2.187em 0 var(--clouds-color), 1.25em -0.062em var(--back-clouds-color), 2.937em 0.312em var(--clouds-color), 2em -0.312em var(--back-clouds-color), 3.625em -0.062em var(--clouds-color), 2.625em 0 var(--back-clouds-color), 4.5em -0.312em var(--clouds-color), 3.375em -0.437em var(--back-clouds-color), 4.625em -1.75em 0 0.437em var(--clouds-color), 4em -0.625em var(--back-clouds-color), 4.125em -2.125em 0 0.437em var(--back-clouds-color);
    transition: 0.5s cubic-bezier(0, -0.02, 0.4, 1.25);
}

.theme-switch__stars-container {
    position: absolute;
    color: var(--stars-color);
    top: -100%;
    left: 0.312em;
    width: 2.75em;
    height: auto;
    transition: var(--transition);
}

.theme-switch__checkbox:checked + .theme-switch__container {
    background-color: var(--container-night-bg);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container {
    left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter));
}

@media (hover: hover) and (pointer: fine) {
    .theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container:hover {
        left: calc(100% - var(--circle-container-offset) - var(--circle-container-diameter) - 0.187em);
    }
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__moon {
    transform: translate(0);
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__clouds {
    bottom: -4.062em;
}

.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__stars-container {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: calc(var(--nav-height) + 20px + 8px);
    height: var(--nav-height);
    border-radius: 99em;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: space-around;
    z-index: 200;
}

.mobile-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--surface-elevated);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    z-index: -2;
}

.mnav-pill {
    position: absolute;
    top: 50%;
    left: 0;
    height: calc(100% - 6px);
    background: rgba(var(--minus-bg-rgb), 0.1);
    border-radius: 99em;
    z-index: 1;
    pointer-events: none;
    backdrop-filter: blur(4px) saturate(180%);
    -webkit-backdrop-filter: blur(4px) saturate(180%);
    transition: transform 0.55s cubic-bezier(0.34, 1, 0.64, 1), width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav .mnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 4px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
    position: relative;
    z-index: 250;
    transition: color 0.35s var(--ease-out);
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav .mnav-item svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
    transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav .mnav-item span {
    transition: transform 0.35s var(--ease-out);
    line-height: 1;
}

.mobile-nav .mnav-item.active {
    color: var(--accent);
}

.mobile-nav .mnav-item.active svg {
    transform: translateY(-1px) scale(1.08);
}

.mobile-nav .mnav-item.active span {
    transform: translateY(-1px);
}

.mobile-nav .mnav-item:active {
    transform: scale(0.9);
    transition: transform 0.1s ease;
}

@media (prefers-reduced-motion: reduce) {
    .mnav-pill {
        transition: none !important;
    }
}

.mobile-search-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: var(--nav-height);
    height: var(--nav-height);
    border-radius: 50%;
    background: var(--surface-elevated);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    z-index: 20002;
    transition: all 1s cubic-bezier(0.32, 0.72, 0, 1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-search-btn .icon-search,
.mobile-search-btn .icon-close {
    position: absolute;
    width: 32px;
    height: 32px;
    fill: currentColor;
    transition: all 1s cubic-bezier(0.32, 0.72, 0, 1);
}

.mobile-search-btn .icon-search {
    transform: scale(1) rotate(0);
    opacity: 1;
}

.mobile-search-btn .icon-close {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
    width: 24px;
    height: 24px;
}

.mobile-search-btn.active {
    transform: translateY(calc(-100dvh + env(safe-area-inset-top, 0px) + 76px));
    width: 44px;
    height: 44px;
    border-color: transparent;
    color: var(--text-muted);
    box-shadow: none;
}

.mobile-search-btn.active .icon-search {
    transform: scale(0) rotate(90deg);
    opacity: 0;
}

.mobile-search-btn.active .icon-close {
    transform: scale(1) rotate(0);
    opacity: 1;
}

.mobile-search-expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 20000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.3s;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.mobile-search-expanded.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.mobile-search-header {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 48px 16px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
}

.mobile-search-input-wrapper {
    position: absolute;
    right: 16px;
    top: calc(12px + env(safe-area-inset-top, 0px));
    height: 44px;
    width: 44px;
    border-radius: 99em;
    background: var(--surface);
    overflow: hidden;
    opacity: 0;
    transform: translateX(0);
    animation: searchFieldExpand 0.7s cubic-bezier(0.2, 0.8, 0.2, 1.05) 0.8s forwards;
}

@keyframes searchFieldExpand {
    0% {
        width: 44px;
        transform: translateX(0);
        opacity: 0;
    }
    100% {
        width: calc(100% - 100px);
        transform: translateX(-60px);
        opacity: 1;
    }
}

.mobile-search-input {
    width: 100%;
    height: 100%;
    padding: 0 16px 0 44px;
    background: var(--surface-elevated);
    border: none;
    color: var(--text);
    font-size: 17px;
    font-family: var(--font-sans);
    outline: none;
    opacity: 0;
    animation: fieldContentAppear 0.3s ease 1.2s forwards;
}

@keyframes fieldContentAppear {
    to {
        opacity: 1;
    }
}

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

.mobile-search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fieldContentAppear 0.3s ease 1.2s forwards;
}

.mobile-search-input-icon svg {
    width: 18px;
    height: 18px;
}

.search-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 8px;
    margin-top: 8px;
    width: 100%;
    flex-shrink: 0;
    opacity: 0;
    animation: sectionHeaderAppear 0.4s ease forwards;
}

.search-section-header:nth-of-type(1) {
    animation-delay: 0s;
}

.search-section-header:nth-of-type(2) {
    animation-delay: 0.3s;
}

.search-section-header:nth-of-type(3) {
    animation-delay: 0.6s;
}

@keyframes sectionHeaderAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-section-action {
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

.search-section-action:active {
    opacity: 0.6;
}

.search-glossary-item {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: fadeInUp 0.3s ease forwards;
    margin-bottom: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .search-glossary-item:hover {
        border-color: var(--accent-soft);
    }
}

.search-glossary-item.expanded {
    border-color: var(--accent);
}

.search-glossary-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.search-glossary-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #26A69A, #00796B);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-glossary-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.search-glossary-title {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.search-glossary-title mark.search-highlight {
    background: linear-gradient(120deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 0 3px;
    border-radius: 3px;
}

.search-glossary-expand-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.search-glossary-expand-icon svg {
    width: 20px;
    height: 20px;
}

.search-glossary-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    padding: 0 16px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.search-glossary-item.expanded .search-glossary-desc {
    padding: 0 16px 14px 16px;
}

.search-glossary-desc mark.search-highlight {
    background: linear-gradient(120deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

[data-theme="dark"] .search-specialty-name mark.search-highlight,
[data-theme="dark"] .search-glossary-title mark.search-highlight,
[data-theme="dark"] .search-glossary-desc mark.search-highlight {
    background: linear-gradient(120deg, #FF8C00 0%, #FF6347 100%);
    color: #fff;
}

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

.search-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    text-align: center;
    color: var(--text-muted);
}

.search-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.search-empty-text {
    font-size: 15px;
    line-height: 1.5;
    max-width: 280px;
}

.search-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.search-loading-icon {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

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

.search-results-section {
    animation: fadeIn 0.3s ease;
}

.search-results-section + .search-results-section {
    margin-top: 8px;
}

.mobile-search-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px calc(16px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.mobile-search-expanded.active .mobile-search-content {
    opacity: 1;
    transform: translateY(0);
}

.search-page-item,
.search-vuz-item,
.search-review-item {
    opacity: 0;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.search-faq-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-soft);
}

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

@media (hover: hover) and (pointer: fine) {
    .search-faq-item:active {
        background: var(--surface);
    }
}

.search-faq-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-faq-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.search-faq-text {
    flex: 1;
    min-width: 0;
}

.search-faq-question {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.search-faq-category {
    font-size: 12px;
    color: var(--text-muted);
}

.search-page-item:nth-child(1) {
    animation-delay: 0.15s;
}

.search-page-item:nth-child(2) {
    animation-delay: 0.20s;
}

.search-page-item:nth-child(3) {
    animation-delay: 0.25s;
}

.search-page-item:nth-child(4) {
    animation-delay: 0.30s;
}

.search-page-item:nth-child(5) {
    animation-delay: 0.35s;
}

.search-page-item:nth-child(6) {
    animation-delay: 0.40s;
}

.search-page-item:nth-child(7) {
    animation-delay: 0.45s;
}

.search-page-item:nth-child(8) {
    animation-delay: 0.50s;
}

.search-page-item:nth-child(9) {
    animation-delay: 0.55s;
}

.search-page-item:nth-child(10) {
    animation-delay: 0.60s;
}

.search-vuz-item:nth-child(1) {
    animation-delay: 0.20s;
}

.search-vuz-item:nth-child(2) {
    animation-delay: 0.25s;
}

.search-vuz-item:nth-child(3) {
    animation-delay: 0.30s;
}

.search-vuz-item:nth-child(4) {
    animation-delay: 0.35s;
}

.search-vuz-item:nth-child(5) {
    animation-delay: 0.40s;
}

.search-review-item:nth-child(1) {
    animation-delay: 0.25s;
}

.search-review-item:nth-child(2) {
    animation-delay: 0.30s;
}

.search-review-item:nth-child(3) {
    animation-delay: 0.35s;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-page-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s ease;
}

.search-page-item:active {
    background: var(--surface);
}

.search-page-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-page-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--accent);
}

.search-page-text {
    flex: 1;
    min-width: 0;
}

.search-page-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.search-page-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.search-vuz-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

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

.search-vuz-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.search-vuz-direction {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.search-vuz-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.search-vuz-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-review-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
}

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

.search-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.search-review-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.search-review-stars {
    color: var(--warning);
    font-size: 13px;
}

.search-review-uni {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.search-review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .mobile-search-btn {
        display: flex;
    }

    .mobile-search-input {
        font-size: 16px;
    }
}

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 30000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}


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

.sheet-profile-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sheet-profile-id {
    font-size: 13px;
    color: var(--text-muted);
}
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    background: var(--bg-elevated);
    border-radius: 24px 24px 0 0;
    z-index: 30001;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate3d(0, 100%, 0);
    transition: transform 0.75s cubic-bezier(0.32, 0.72, 0, 1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    -webkit-font-smoothing: subpixel-antialiased;
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 12px auto;
    touch-action: none;
    cursor: grab;
}

[data-theme="light"] .bottom-sheet {
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
}

.bottom-sheet.active {
    transform: translate3d(0, 0, 0);
}

body.sheet-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.sheet-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sheet-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sheet-menu {
    padding: 8px 0;
}

.sheet-menu-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px 8px;
}

.sheet-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .sheet-menu-item:hover {
        background: var(--surface);
    }
}

.sheet-menu-item.active {
    background: var(--accent-soft);
}

.sheet-menu-item.active .sheet-menu-title {
    color: var(--accent);
    font-weight: 600;
}

.sheet-menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sheet-menu-icon svg {
    width: 22px;
    height: 22px;
}

.sheet-menu-text {
    flex: 1;
    min-width: 0;
}

.sheet-menu-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.sheet-menu-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.sheet-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

#openMoreMenu {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    background: transparent;
}

#openMoreMenu:focus,
#openMoreMenu:active,
#openMoreMenu.active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

[data-theme="light"] .bottom-sheet-item {
    color: #1a1a1a;
}

@media (hover: hover) and (pointer: fine) {
    .bottom-sheet-item:hover {
        background: rgba(255, 255, 255, 0.05);
        }

[data-theme="light"] .bottom-sheet-item:hover {
    background: rgba(0, 0, 0, 0.04);
}
}

.bottom-sheet-item.active {
    background: var(--accent-soft);
    color: var(--accent);
}

[data-theme="light"] .bottom-sheet-item.active {
    background: rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
}

.bottom-sheet-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    fill: currentColor;
    opacity: 0.85;
}

.bottom-sheet-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }

    .ai-layout {
        grid-template-columns: 1fr;
    }

    .ai-sidebar {
        order: -1;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        margin: 0 auto;
    }

    .hero-title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    #results-container,
    .uni-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .uni-card {
        padding: 16px;
        min-height: auto;
    }

    .uni-stats-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .uni-actions {
        flex-direction: column;
    }

    .wizard {
        padding: 16px;
    }

    .wizard-panel {
        padding: 0;
        width: 100%;
    }

    .content, .main {
        width: 100%;
        overflow-x: hidden;
    }

    .subject-score-slider {
        width: 100%;
    }

    .city-chip {
        font-size: 14px;
        padding: 8px 16px;
    }

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
        padding-bottom: calc(var(--nav-height) + 20px);
    }

    .content {
        padding: 16px;
    }

    .topbar {
        padding: 12px 16px;
    }

    .search-box {
        min-width: 0;
        flex: 1;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero-title {
        font-size: 32px;
        letter-spacing: -1px;
    }

    .wizard-steps {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .score-value {
        font-size: 72px;
        letter-spacing: -2px;
    }

    .mobile-search-btn {
        display: flex;
    }

    .search-with-suggestions {
        flex-direction: row;
    }

    .search-with-suggestions .btn {
        margin-left: 0 !important;
    }

    .topbar-title {
        font-size: 16px;
    }

    .mobile-nav {
        display: flex;
    }

    .stats-grid-compact {
        grid-template-columns: 1fr 1fr;
    }

    .toast {
        top: calc(env(safe-area-inset-top) + 16px);
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
        transform: translateY(-300%);
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .toast.show {
        transform: translateY(0);
    }

    .blob {
        animation: none !important;
        filter: blur(60px) !important;
        opacity: 0.2 !important;
        will-change: auto !important;
    }

    .blob, [data-theme="light"] .blob {
        mix-blend-mode: normal !important;
    }

    .glass, .sidebar, .topbar {
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
    }

    .ref-container {
        flex-direction: column;
        align-items: stretch;
    }

    .ref-input {
        text-align: center;
        padding: 8px 0;
    }

    .ref-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .copy-icon {
        font-size: 18px;
    }

    .copy-text {
        font-size: 15px;
    }

    .ach-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .sheet-profile {
        padding: 16px;
    }

    .sheet-profile-avatar {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .sheet-menu-item {
        padding: 10px 16px;
    }

    .sheet-menu-icon {
        width: 36px;
        height: 36px;
    }

    .sheet-menu-icon svg {
        width: 20px;
        height: 20px;
    }

    .sheet-menu-title {
        font-size: 14px;
    }

    .sheet-menu-desc {
        font-size: 12px;
    }
}

.install-banner {
    position: fixed;
    bottom: calc(var(--nav-height) + 20px);
    left: 16px;
    right: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: slideUp 0.4s var(--ease-bounce);
}

.install-banner-content {
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.install-banner-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
}

.install-banner-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
}

.install-banner-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.install-banner-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.install-banner-actions .btn {
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

@media (display-mode: standalone) {
    .install-banner {
        display: none !important;
    }
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

@media (hover: hover) and (pointer: fine) {
    .btn-ghost:hover {
        background: var(--surface);
        color: var(--text);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}