* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a2e;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.screen {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
}

.screen.active {
    display: block;
}

/* Загрузка */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Контейнер */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Формы */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #aaa;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: #16213e;
    border: 1px solid #0f3460;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

/* Кнопки */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin: 5px;
}

.btn-primary {
    background: #6c63ff;
    color: #fff;
}

.btn-primary:hover {
    background: #5a52d5;
}

.btn-secondary {
    background: #0f3460;
    color: #fff;
}

.btn-success {
    background: #51cf66;
    color: #fff;
}

.btn-danger {
    background: #ff6b6b;
    color: #fff;
}

.btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Профиль */
.profile-card {
    background: #16213e;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: #6c63ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.profile-info h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.level-badge {
    background: #0f3460;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: #0f3460;
    border-radius: 12px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
}

.stat-value.coins {
    color: #ffd43b;
}

.stat-value.bonus {
    color: #51cf66;
}

/* Прогресс бар */
.progress-bar {
    height: 8px;
    background: #0f3460;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #51cf66);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #888;
}

/* Табы */
.tab-content {
    margin-top: 20px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f3460;
}

/* Списки */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    background: #16213e;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.list-item:hover {
    background: #0f3460;
}

/* Быстрые действия */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-btn {
    background: #16213e;
    border: none;
    padding: 20px;
    border-radius: 12px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #0f3460;
    transform: translateY(-2px);
}

.action-btn .icon {
    font-size: 32px;
}

/* Навигация */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #16213e;
    border-top: 1px solid #0f3460;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    color: #888;
    padding: 5px 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    transition: all 0.3s;
}

.nav-btn.active {
    color: #6c63ff;
}

.nav-icon {
    font-size: 20px;
}

.nav-text {
    font-size: 11px;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #16213e;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
}

.qr-container {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

/* Админ секции */
.admin-section {
    background: #16213e;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.admin-section h4 {
    margin-bottom: 15px;
    color: #6c63ff;
}

/* Адаптивность */
@media (max-width: 480px) {
    .stats-row {
        flex-direction: column;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .nav-text {
        font-size: 10px;
    }
}