* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-secondary: #8e8e93;
    
    /* Темное стекло: сбалансировано для черных и белых фонов */
    --glass-bg: rgba(20, 20, 24, 0.78);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.4);
    
    /* Акцентный синий цвет */
    --accent-color: #00a8ff;
}

.light-theme {
    --bg-color: #f2f2f7;
    --text-color: #000000;
    --text-secondary: #6c6c70;
    
    --glass-bg: rgba(26, 26, 30, 0.85);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: rgba(0, 0, 0, 0.2);
}

body, html {
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", Roboto, sans-serif;
    color: var(--text-color);
    touch-action: manipulation;
    transition: background-color 0.3s, color 0.3s;
}

#viewport {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 390px;
    height: 844px;
    min-width: 390px;
    min-height: 844px;
    flex-shrink: 0;
    background-color: var(--bg-color);
    transform: scale(var(--scale, 1));
    transform-origin: center center;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    transition: background-color 0.3s;
}

/* Экранные секции */
.app-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px 20px 140px 20px; /* Увеличил отступ снизу из-за большой панели */
    overflow-y: auto;
    display: none;
}

.app-screen::-webkit-scrollbar { width: 0; }
.app-screen.active { display: block; }

.screen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* =======================================
   Стеклянная панель навигации (УВЕЛИЧЕНА)
======================================= */
.bottom-nav {
    position: absolute;
    bottom: 24px;
    
    /* 1. Делаем панель длиннее (шире), уменьшив отступы от краев экрана */
    left: 10px;  /* Было 20px */
    right: 10px; /* Было 20px */
    
    height: 100px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: 0 10px 30px var(--glass-shadow);
    
    display: flex;
    justify-content: space-around;
    align-items: center;
    
    /* 2. Задаем жесткий отступ между кнопками */
    gap: 12px; /* Можешь поиграть со значением (10px, 15px, 20px) */
    
    padding: 0 12px; /* Слегка увеличил внутренний padding, чтобы крайние кнопки не прилипали к скруглениям */
    z-index: 100;
}
/* Ползунок заднего фона (как на фото) */
.nav-indicator {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    background: rgba(255, 255, 255, 0.08); /* Полупрозрачный фон выделения */
    border-radius: 24px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    pointer-events: none;
}

.nav-btn {
    background: none;
    border: none;
    outline: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    height: 100%;
    cursor: pointer;
    color: #a0a0ab;
    z-index: 2; /* Над ползунком */
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Иконки увеличены почти в 2 раза */
.nav-icon {
    width: 48px; /* Увеличено с 28px */
    height: 48px;
    fill: currentColor; /* Заливка берется от цвета кнопки */
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), fill 0.25s ease;
}

.nav-label {
    font-size: 13px; /* Немного увеличил текст */
    font-weight: 500;
    letter-spacing: -0.2px;
    transition: color 0.25s ease;
}

/* Активное состояние кнопки (Без свечения) */
.nav-btn.active {
    color: var(--accent-color);
}

.nav-btn.active .nav-icon {
    transform: translateY(-2px); /* Легкий подъем, но без drop-shadow */
}

.nav-btn:active {
    transform: scale(0.92);
}

/* =======================================
   Остальные стили из твоего исходника
======================================= */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.avatar-placeholder {
    font-size: 48px;
    background: rgba(255, 255, 255, 0.1);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge {
    background: var(--accent-color);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.stats-grid {
    display: flex;
    gap: 12px;
    width: 100%;
}

.stat-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value { font-size: 22px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-secondary); }

.items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    width: 100%;
}

.item-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.item-card.active { border-color: var(--accent-color); }
.item-icon { font-size: 36px; }

.action-btn {
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.theme-btn {
    margin-top: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    font-size: 14px;
    cursor: pointer;
}

.empty-state {
    margin-top: 40px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 32px;
}
.empty-state p { font-size: 14px; }