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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px 20px 80px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Шапка */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details h2 {
    font-size: 16px;
    margin-bottom: 2px;
    color: #333;
}

.user-details p {
    font-size: 11px;
    color: #666;
}

.admin-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 12px;
    color: white;
    display: inline-block;
    margin-top: 3px;
}

.balance-card {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    padding: 8px 16px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.balance-value {
    font-size: 18px;
    font-weight: bold;
}

/* Статистика */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 12px;
    text-align: center;
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 10px;
    color: #666;
    margin-top: 4px;
}

/* Вкладки */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 40px;
}

.tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s;
    color: white;
    font-weight: 500;
    font-size: 13px;
    background: transparent;
    border: none;
}

.tab.active {
    background: white;
    color: #667eea;
}

/* Задания */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.task-title {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.task-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-approved { background: #d1fae5; color: #059669; }

.task-desc {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.task-reward {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fef3c7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #d97706;
}

/* Админ панель */
.admin-panel {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
}

.admin-section {
    margin-bottom: 20px;
}

.admin-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

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

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
    display: block;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 13px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
}

.btn-success { background: #10b981; color: white; }
.btn-danger { background: #ef4444; color: white; }

.pending-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}

.pending-user { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.pending-task { font-size: 11px; color: #667eea; margin-bottom: 6px; }
.pending-answer {
    background: white;
    padding: 8px;
    border-radius: 10px;
    margin: 8px 0;
    font-size: 12px;
    border-left: 3px solid #667eea;
}

.review-buttons {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.review-buttons button {
    padding: 6px 12px;
    font-size: 11px;
}

/* Нижнее меню */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s;
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.1);
}

.nav-icon {
    font-size: 22px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
    color: #666;
}

.nav-item.active .nav-label {
    color: #667eea;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 20px;
    max-width: 90%;
    width: 400px;
}

.modal-header {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.close-btn {
    float: right;
    cursor: pointer;
    font-size: 20px;
    color: #999;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 10px 0;
    font-size: 13px;
}

.loading, .empty-state {
    text-align: center;
    padding: 30px;
    color: white;
}

.error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 12px;
    text-align: center;
}

.admin-fab {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 99;
}
/* Прогресс уровня */
.level-progress {
    background: white;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 20px;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
}

.level-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.progress-bar-container {
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    height: 12px;
    margin: 8px 0;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 20px;
}

.level-exp {
    font-size: 11px;
    color: #999;
    text-align: right;
}

.level-reward {
    font-size: 11px;
    color: #f59e0b;
    margin-top: 8px;
}
/* Прогресс уровня */
.level-progress {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.level-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.progress-bar-container {
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    height: 10px;
    margin: 10px 0;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 20px;
}

.level-exp {
    font-size: 11px;
    color: #999;
    text-align: right;
    margin-top: 5px;
}
/* Категории */
.category-filter {
    margin-bottom: 20px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 5px 0;
}

.category-buttons {
    display: flex;
    gap: 8px;
}

.category-btn {
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 20px;
    color: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn.active {
    background: white;
    color: #667eea;
}

/* Магазин */
.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

/* Рейтинг */
.leaderboard-rank {
    font-weight: bold;
    color: #f59e0b;
}

/* Адаптация */
@media (max-width: 600px) {
    .category-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .bottom-nav {
        padding: 6px 12px 10px;
    }
    
    .nav-icon {
        font-size: 20px;
    }
    
    .nav-label {
        font-size: 9px;
    }
}
