/* ===================================================================
   HOME SCREEN STYLES - History Explorers WebApp
   ================================================================== */

/* === ДОПОЛНИТЕЛЬНЫЕ CSS ПЕРЕМЕННЫЕ === */
:root {
    --color-primary: #2481cc;
    --color-primary-hover: #1c5aa8;
    --color-primary-light: rgba(36, 129, 204, 0.1);
}

/* === ДУШЕВНЫЕ СТИЛИ ГЛАВНОГО ЭКРАНА - УДАЛЕНЫ (ДУБЛИКАТЫ) === */

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

/* === АВАТАР ПОЛЬЗОВАТЕЛЯ === */
.home-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 3px solid rgba(255,255,255,0.2);
}

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

.home-user-avatar .avatar-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

/* === АВАТАР КАК ССЫЛКА НА ПРОФИЛЬ === */
.avatar-container[onclick] {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar-container[onclick]:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.avatar-container[onclick]:active {
    transform: scale(0.98);
}

/* === TOP MINI MENU === */
.top-mini-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px; /* Уменьшено в 2 раза с 8px */
    padding: 3px 0; /* Уменьшено в 2 раза с 6px */
}

.menu-nav-buttons {
    display: flex;
    gap: 8px; /* Ближе друг к другу */
}

.menu-nav-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 17px; /* Уменьшено на 30% с 24px */
    padding: 4px 6px; /* Компактно как у level-badge */
    border-radius: 8px;
    transition: all 0.2s ease;
}

.menu-nav-btn:hover {
    background: var(--color-primary-light);
    transform: scale(1.1);
}

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

.user-level-badge {
    display: flex;
    align-items: center;
    gap: 6px; /* Уменьшено с 8px */
    background: var(--color-primary-light);
    padding: 4px 10px; /* Уменьшено с 6px 12px */
    border-radius: 16px; /* Уменьшено с 20px */
}

.user-level-badge .level-icon {
    font-size: 14px; /* Уменьшено с 16px */
}

.user-level-badge .level-text {
    font-size: 16px; /* Увеличено на 30% с 12px */
    font-weight: 600;
    color: var(--color-primary);
}

/* === HERO SECTION (ОСНОВНЫЕ СТИЛИ) === */
.hero-welcome {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
    border-radius: 24px;
    color: white;
    padding: 24px;
    margin-top: 6px; /* Уменьшено на 30% с 8px до блока профиля */
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* === ПРИВЕТСТВЕННОЕ СООБЩЕНИЕ === */
#welcome-message {
    font-size: clamp(16px, 5vw, 40px); /* Уменьшен размер для длинных имен */
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2; /* Компактная высота строки для переносов */
    word-wrap: break-word; /* Перенос длинных слов */
    width: 100%; /* Занимает всю ширину */
    display: block; /* Блочный элемент для полной ширины */
    text-align: center; /* Центрирование текста */
}

#welcome-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 80px;
    height: 80px;
}

.avatar-container:hover {
    transform: scale(1.05);
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: linear-gradient(135deg, #2481cc, #1c5aa8);
    box-shadow: 0 4px 12px rgba(36, 129, 204, 0.3);
}

.online-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: #22c55e;
    border-radius: 50%;
    border: 3px solid white;
}

.achievements-overview {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Три блока */
    gap: 8px; /* Уменьшен gap для лучшего размещения */
    margin-top: 16px;
}

.achievement-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 12px 6px; /* Уменьшен горизонтальный padding */
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 70px; /* Фиксированная высота для равномерности */
}

.achievement-value {
    display: block;
    font-size: 18px; /* Уменьшен для лучшего размещения */
    font-weight: 700;
    margin-bottom: auto; /* Размещение по центру */
    order: 1; /* Цифры по центру */
}

.achievement-label {
    font-size: 12px; /* Уменьшен для лучшего размещения */
    opacity: 0.9;
    margin-top: auto; /* Надписи по нижнему краю */
    order: 2; /* Надписи внизу */
    line-height: 1.2;
}

/* === QUICK ACTIONS === */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.action-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: var(--color-primary);
}

/* ========================================
   PvP ARENA BANNER - Premium Design
   ======================================== */

.pvp-arena-banner {
    position: relative;
    margin: 16px 0;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated gradient background - Сине-фиолетовый */
.pvp-banner-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4c1d95 70%, #1e1b4b 100%);
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

.pvp-banner-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.2) 0%, transparent 60%);
}

.pvp-banner-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 20px;
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes borderPulse {
    0%, 100% { border-color: rgba(139, 92, 246, 0.4); }
    50% { border-color: rgba(168, 85, 247, 0.8); }
}

/* Content */
.pvp-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 24px 20px;
    color: white;
}

/* Badge */
.pvp-banner-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    animation: badgeGlow 2s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(245, 158, 11, 0.8); }
}

/* Icon */
.pvp-banner-icon {
    font-size: 40px;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Title */
.pvp-banner-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.pvp-title-main {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #22c55e, #86efac);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 2px 4px rgba(34, 197, 94, 0.3));
}

.pvp-title-sub {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 6px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Description */
.pvp-banner-desc {
    font-size: 13px;
    color: #cbd5e1;
    margin-bottom: 16px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Button */
.pvp-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
}

.pvp-arena-banner:active .pvp-banner-cta {
    transform: scale(0.95);
}

.pvp-cta-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.pvp-arena-banner:hover .pvp-cta-arrow {
    transform: translateX(4px);
}

/* Floating particles */
.pvp-banner-particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.pvp-banner-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(139, 92, 246, 0.7);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

.pvp-banner-particles span:nth-child(1) {
    left: 10%; top: 20%;
    animation-delay: 0s;
    background: rgba(168, 85, 247, 0.7);
}

.pvp-banner-particles span:nth-child(2) {
    right: 15%; top: 30%;
    animation-delay: 1s;
    background: rgba(99, 102, 241, 0.7);
}

.pvp-banner-particles span:nth-child(3) {
    left: 20%; bottom: 25%;
    animation-delay: 2s;
    background: rgba(139, 92, 246, 0.7);
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

/* UFO Animation - Smooth random flight */
.pvp-ufo {
    position: absolute;
    font-size: 26px;
    z-index: 10;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
    pointer-events: none;
    opacity: 0;
    transition: none;
}

/* ======================================== */

.action-card.pvp {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-color: #16a34a;
}

.action-card.battlepass {
    background: linear-gradient(135deg, #ffd93d 0%, #ff6b6b 100%);
    color: white;
    border: 2px solid #ff6b6b;
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.action-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.2; /* Уменьшенный межстрочный отступ */
}

.action-subtitle {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.3; /* Уменьшенный межстрочный отступ */
}

/* === NEW QUIZZES SECTION === */
.new-quizzes-section {
    margin-top: 24px;
}

.new-quizzes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.home-quiz-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.home-quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border);
}

.home-quiz-image {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 11px 11px 0 0; /* Только верхние углы скруглены */
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
    line-height: 0; /* Убирает белую полосу под картинкой */
}

.home-quiz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block; /* Убирает inline-пробел */
    margin: 0;
    padding: 0;
}

/* Fallback градиенты для изображений */
.home-quiz-image.imperial {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.home-quiz-image.ancient {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.home-quiz-image.medieval {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

/* === UTILITY CLASSES === */
.app-hidden {
    display: none;
}

.loading-visible {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.logo-img {
    width: 80px;
    height: 80px;
}

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

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--color-primary); /* Синий цвет как в кнопке Уровень 1 */
}

.section-title .new-icon {
    color: var(--color-success); /* Зеленая иконка 🆕 */
}

.section-link-btn {
    background: var(--color-accent);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 20px; /* Скругленные углы */
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.section-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: color-mix(in srgb, var(--color-accent) 85%, black 15%);
}

/* === ADDITIONAL UTILITY STYLES === */
.loading-subtitle {
    color: #666;
    margin-top: 8px;
}

.challenge-title {
    margin-bottom: 8px;
}

.challenge-description {
    color: #64748b;
    margin-bottom: 16px;
}

.challenge-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}

.progress-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
}

.level-progress-section {
    margin-top: 20px;
}


.level-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 4px;
}

.bottom-spacer {
    height: 80px;
}

.progress-zero {
    width: 0%;
}

.activity-title-spacing {
    margin-bottom: 16px;
}

/* === HOME QUIZ CARDS === */
.home-quiz-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.home-quiz-info-top {
    flex-grow: 1;
}

.home-quiz-info-bottom {
    margin-top: auto;
}

.home-quiz-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    line-height: 1.3;
}

.home-quiz-description {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-quiz-stats-line {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #64748b;
}

.home-stars {
    color: #FFD700;
    letter-spacing: 1px;
}

.home-quiz-points-compact {
    font-weight: 600;
    color: #1e293b;
    margin-left: auto;
}

.home-earned-points {
    color: var(--color-success, #22c55e);
    font-weight: 600;
}

.home-quiz-publication-date {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

.home-quiz-status-badge {
    position: absolute;
    top: 16px;
    right: 16px; /* Перемещено вправо */
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Зеленый значок для новых викторин */
.home-quiz-status-badge.new {
    background: rgba(34, 197, 94, 0.9);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Синий значок для завершенных викторин */
.home-quiz-status-badge.completed {
    background: rgba(59, 130, 246, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Серый значок для доступных викторин */
.home-quiz-status-badge.available {
    background: rgba(107, 114, 128, 0.9);
    border-color: rgba(107, 114, 128, 0.3);
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.7; transform: scale(1.2) rotate(180deg); }
}

/* === DAILY CHALLENGE === */
.daily-challenge {
    background: linear-gradient(135deg, #fef3c7, rgba(34, 197, 94, 0.1));
    border: 2px solid var(--color-primary);
    border-radius: 16px;
    padding: 20px;
    margin: 16px 0;
    position: relative;
}

.challenge-timer {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--color-primary);
}

/* === RECENT ACTIVITY === */
.recent-activity {
    margin-top: 24px;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.activity-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    position: relative;
}

.activity-icon.quiz_completed {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.activity-icon.achievement {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.activity-icon.reward {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
}

/* === КАРТИНКИ ВИКТОРИН В АКТИВНОСТИ === */
.activity-quiz-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.activity-quiz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 4px;
}

/* === НОВЫЙ ФОРМАТ АКТИВНОСТИ === */
.activity-action {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary); /* В стиле заголовков блоков */
    margin-bottom: 4px;
}

.activity-quiz-name {
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 15px;
}

.activity-time {
    font-size: 14px;
    color: #64748b;
}

.activity-points {
    font-size: 14px;
    color: #22c55e;
    font-weight: 600;
}

/* === ЗАГЛУШКИ ДЛЯ АКТИВНОСТИ === */
.no-activity, .activity-error {
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
    font-size: 14px;
    font-style: italic;
}

.activity-error {
    color: #ef4444;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
}

/* === PROGRESS === */
.progress {
    background: #e2e8f0;
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    height: 100%;
    border-radius: 50px;
    transition: width 0.3s ease;
}

/* === LOADING === */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 100px;
}

/* === БЫСТРАЯ ССЫЛКА НА ПРОФИЛЬ === */
.profile-quick-link {
    display: none; /* Скрываем кнопку "Мой профиль" */
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    backdrop-filter: blur(10px);
}

.profile-quick-link:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.profile-quick-link:active {
    transform: translateY(0);
}

/* === ПРОГРЕСС ПОЛЬЗОВАТЕЛЯ === */
.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.home-stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.home-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.home-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.home-stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* === МИНИ МЕНЮ СВЕРХУ === */
.home-top-menu {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}

.home-menu-item {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 20px;
    padding: 12px 16px;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.home-menu-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* === НОВЫЕ ВИКТОРИНЫ === */
.home-new-quizzes {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.home-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === ДУБЛИРОВАННЫЕ СТИЛИ УДАЛЕНЫ - ИСПОЛЬЗУЕТСЯ ОСНОВНАЯ ВЕРСИЯ === */

/* === ПОСЛЕДНЯЯ АКТИВНОСТЬ === */
.home-recent-activity {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.home-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.home-activity-item:last-child {
    border-bottom: none;
}

.home-activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.home-activity-icon.success {
    background: #dcfce7;
    color: #16a34a;
}

.home-activity-icon.info {
    background: #dbeafe;
    color: #2563eb;
}

.home-activity-content {
    flex: 1;
}

.home-activity-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.home-activity-description {
    font-size: 12px;
    color: #64748b;
}

.home-activity-time {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .home-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .home-quiz-content {
        flex-direction: column;
        text-align: center;
    }
    
    .home-quiz-image {
        width: 100%;
        aspect-ratio: 2 / 1; /* Соотношение 2:1 и для мобильных */
    }
}

