:root {
    --sv-accent: var(--accent);
    --sv-bg: var(--bg);
    --sv-fg: var(--fg);
    --sv-muted: var(--muted);
    --sv-card: var(--glass2);
    --sv-line: var(--line);
}

[data-theme="light"] {
    --sv-bg: #f8fafc;
    --sv-fg: #1e293b;
    --sv-muted: #64748b;
    --sv-card: #ffffff;
    --sv-line: #e2e8f0;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--t-base), border-color var(--t-base), color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
body, html {
    background-color: var(--sv-bg);
    color: var(--sv-fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100%;
    overflow: hidden;
    user-select: none;
}
.white-flash-shield {
    position: fixed;
    inset: 0;
    background: var(--sv-bg);
    z-index: 9999;
    pointer-events: none;
    animation: fadeOut 0.5s ease-out forwards;
}
@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}
.sv-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: radial-gradient(circle at 50% -10%, var(--glass3), transparent 60%);
    position: relative;
    z-index: 1;
}
.topbar {
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 0.5px solid var(--sv-line);
    z-index: 100;
}
.topbar-title {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    pointer-events: none;
}
.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius2);
    color: var(--sv-accent);
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
    transition: transform var(--t-snap);
}
.back-btn:active {
    transform: scale(0.92);
}
.sv-content {
    flex: 1;
    padding: 0 16px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sv-hero {
    padding: 40px 24px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sv-icon-glow {
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--out1), var(--out2));
    border-radius: var(--radius3);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform var(--t-slow);
}

.sv-hero:hover .sv-icon-glow {
    transform: scale(1.08) translateY(-4px);
    box-shadow: 0 12px 24px -8px var(--out1);
}

.sv-hero:active .sv-icon-glow {
    transform: scale(0.95) translateY(2px);
    transition: transform var(--t-snap);
}
.sv-hero h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}
.sv-hero p {
    font-size: 15px;
    color: var(--sv-muted);
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}
.sv-storage-card {
    background: var(--sv-card);
    padding: 20px;
    border-radius: var(--radius3);
    margin-bottom: 24px;
    border: 0.5px solid var(--sv-line);
    box-shadow: var(--shadow-sm);
}
.sv-storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.sv-storage-title {
    font-weight: 700;
    font-size: 15px;
}
.sv-storage-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--sv-accent);
}
.sv-progress-bar {
    height: 8px;
    background: var(--glass3);
    border-radius: 10px;
    overflow: hidden;
}
.sv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--out1), var(--out2));
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.sv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.sv-cat-card {
    background: var(--sv-card);
    padding: 16px;
    border-radius: var(--radius3);
    border: 0.5px solid var(--sv-line);
    transition: transform var(--t-snap);
}
.sv-cat-card:active {
    transform: scale(0.96) translateY(2px);
    background: var(--glass3);
}
.sv-cat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.sv-cat-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}
.sv-cat-count {
    font-size: 12px;
    color: var(--sv-muted);
    font-weight: 500;
}
.sv-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--t-slow), transform var(--t-slow);
}
.sv-visible {
    opacity: 1;
    transform: translateY(0);
}
[dir="rtl"] .back-btn svg {
    transform: rotate(180deg);
}
