** {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1035 50%, #0a0e27 100%);
    color: #e8e8e8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}



.container {
    max-width: 800px;
    width: 100%;
    position: relative;
}



.progress-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 100;
}



.progress-label {
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(74, 158, 255, 0.3);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}



.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a9eff, #b24aff);
    width: 0%;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.6);
    border-radius: 20px;
    position: relative;
}



.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 20px 20px 0 0;
}



.card {
    background: rgba(22, 27, 51, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}



.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}



@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}



.screen.active {
    display: block;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #4a9eff, #b24aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(74, 158, 255, 0.3);
}


/* Убираем градиент с эмодзи */
h1 .emoji {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: #e8e8e8; /* Обычный белый цвет */
    background-clip: initial;
}


/* Убираем эффекты с эмодзи в заголовке */
h1::first-line {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    background-clip: initial;
}


.subtitle {
    text-align: center;
    color: #a0a0a0;
    margin-bottom: 40px;
    font-size: 1.1rem;
}



.question-text {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #fff;
    font-weight: 600;
}



.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}



.option-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(74, 158, 255, 0.3);
    padding: 20px 30px;
    border-radius: 15px;
    color: #e8e8e8;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    z-index: 2;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.3);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}



.option-btn:active {
    background: rgba(74, 158, 255, 0.25);
    border-color: #4a9eff;
    transform: scale(0.98);
}



.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: -1;
}



.option-btn:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: #4a9eff;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.3);
}



.option-btn:hover::before {
    left: 100%;
}



.start-btn {
    background: linear-gradient(135deg, #4a9eff, #b24aff);
    border: none;
    padding: 20px 60px;
    border-radius: 15px;
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: block;
    margin: 40px auto 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.4);
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.5);
    touch-action: manipulation;
    z-index: 2;
    -webkit-user-select: none;
    user-select: none;
}



.start-btn:active {
    transform: scale(0.97);
    box-shadow: 0 5px 20px rgba(74, 158, 255, 0.6);
}



.start-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: -1;
}



.start-btn:hover::after {
    width: 300px;
    height: 300px;
}



.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(74, 158, 255, 0.6);
}



.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 30px;
}



/* ========== АНИМАЦИЯ ПОЯВЛЕНИЯ КАРТОЧЕК ========== */
.hero-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    /* ✅ АНИМАЦИЯ */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

/* Задержка для каждой карточки (эффект "волны") */
.hero-card:nth-child(1) { animation-delay: 0.1s; }
.hero-card:nth-child(2) { animation-delay: 0.15s; }
.hero-card:nth-child(3) { animation-delay: 0.2s; }
.hero-card:nth-child(4) { animation-delay: 0.25s; }
.hero-card:nth-child(5) { animation-delay: 0.3s; }
.hero-card:nth-child(6) { animation-delay: 0.35s; }
.hero-card:nth-child(7) { animation-delay: 0.4s; }
.hero-card:nth-child(8) { animation-delay: 0.45s; }
.hero-card:nth-child(9) { animation-delay: 0.5s; }
.hero-card:nth-child(10) { animation-delay: 0.55s; }
.hero-card:nth-child(11) { animation-delay: 0.6s; }
.hero-card:nth-child(12) { animation-delay: 0.65s; }
.hero-card:nth-child(13) { animation-delay: 0.7s; }
.hero-card:nth-child(14) { animation-delay: 0.75s; }
.hero-card:nth-child(15) { animation-delay: 0.8s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.hero-card.gold {
    border: 2px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.1);
    animation: goldGlow 2s ease-in-out infinite, fadeInUp 0.5s ease forwards;
    animation-delay: 0s, 0.05s; /* ✅ Золотые появляются первыми */
}



.hero-card.silver {
    border: 2px solid #c0c0c0;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.4), inset 0 0 15px rgba(192, 192, 192, 0.1);
}



.hero-card.bronze {
    border: 2px solid #cd7f32;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}



@keyframes goldGlow {
    0%, 100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), inset 0 0 30px rgba(255, 215, 0, 0.2);
    }
}



.hero-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}



.hero-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}



.hero-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}



.match-percentage {
    font-size: 0.9rem;
    color: #4a9eff;
    font-weight: 600;
    margin-bottom: 8px;
}



.hero-card.gold .match-percentage {
    color: #ffd700;
}



.hero-card.silver .match-percentage {
    color: #c0c0c0;
}



.match-details {
    font-size: 0.75rem;
    color: #a0a0a0;
    text-align: left;
    margin-top: 10px;
    line-height: 1.4;
}



.match-details-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}



.match-details-item::before {
    content: '✓';
    color: #4eff4a;
    margin-right: 5px;
    font-weight: bold;
}



.match-details-item.partial::before {
    content: '~';
    color: #ffaa4a;
}



.results-header {
    text-align: center;
    margin-bottom: 30px;
}



.results-title {
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4a9eff, #b24aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



/* Бейдж с подходящей позицией (4 или 5) */
.position-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(74, 158, 255, 0.2);
    border: 2px solid #4a9eff;
    padding: 10px 20px;
    border-radius: 20px;
    color: #4a9eff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}



/* Картинка роли (4/5), уменьшаем и не даём раздуваться */
.position-icon-img {
    width: 32px;       
    height: 32px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 6px rgba(74, 158, 255, 0.7));
}



.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}



.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #a0a0a0;
}



.legend-box {
    width: 30px;
    height: 20px;
    border-radius: 5px;
    border: 2px solid;
}



.legend-box.gold {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}



.legend-box.silver {
    border-color: #c0c0c0;
    box-shadow: 0 0 10px rgba(192, 192, 192, 0.4);
}



.legend-box.bronze {
    border-color: #cd7f32;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}



.restart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #4a9eff;
    padding: 15px 40px;
    border-radius: 12px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.3);
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    z-index: 2;
}



.restart-btn:hover {
    background: rgba(74, 158, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 158, 255, 0.3);
}



.restart-btn:active {
    background: rgba(74, 158, 255, 0.3);
    transform: scale(0.98);
}



.back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(74, 158, 255, 0.4);
    color: #e8e8e8;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(74, 158, 255, 0.3);
    touch-action: manipulation;
    display: inline-block;
}



.back-btn:hover {
    background: rgba(74, 158, 255, 0.15);
    border-color: #4a9eff;
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.25);
}



.back-btn:active {
    transform: scale(0.97);
    background: rgba(74, 158, 255, 0.25);
}



/* ========== СНОСКА ДЛЯ ПОЗИЦИИ 4 - ИСПРАВЛЕНО ========== */
.position-note {
    padding: 20px;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.3);
    margin-top: 32px;
    position: relative;
}



.position-note h3 {
    color: #4a9eff;
    font-size: 1.15rem;
    margin-bottom: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}



.position-note p {
    margin-bottom: 12px;
    color: #a0a0a0;
    line-height: 1.6;
}



.position-note strong {
    color: #fff;
    font-weight: 600;
}



.hero-list {
    color: #b0b0b0;
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.5;
}



/* Крестик закрытия - СКРЫТ на мобильных */
.position-note-close {
    display: none;
}



/* ДЕСКТОП (≥1200px) - fixed справа от экрана */
@media (min-width: 1200px) {
    .position-note {
        position: fixed;
        right: 20px;
        top: 50%;
        transform: translateY(-50%) translateX(400px); /* ← Стартовая позиция (за экраном) */
        width: 320px;
        max-height: 80vh;
        overflow-y: auto;
        margin-top: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        z-index: 1000;
        animation: slideInFromRight 0.8s ease-out 0.5s forwards; /* ← Анимация выезда */
    }
    
    /* Анимация выезда справа */
    @keyframes slideInFromRight {
        to {
            transform: translateY(-50%) translateX(0); /* ← Конечная позиция */
        }
    }


    
    /* На десктопе показываем крестик */
    .position-note-close {
        display: flex;
        position: absolute;
        top: 15px;
        right: 15px;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #fff;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        line-height: 1;
        transition: all 0.3s ease;
        align-items: center;
        justify-content: center;
    }
    
    .position-note-close:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: rotate(90deg);
    }
}



/* ========== СТИЛИ ДЛЯ OPENDOTA СТАТИСТИКИ ========== */
.hero-api-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(74, 158, 255, 0.2);
    font-size: 0.85rem;
}



.api-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}



.api-label {
    color: #a0a0a0;
    font-weight: 500;
}



.api-value {
    font-weight: 600;
    font-size: 0.9rem;
}



/* ========== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ========== */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }
    .question-text {
        font-size: 1.2rem;
    }
    .option-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    .card {
        padding: 25px;
    }
}


/* Подсказка в кнопке позиции - отступ от эмодзи */
.option-btn span {
    display: inline-block;
    margin-left: 28px;
    font-size: 0.85rem; /* ← Размер как был раньше */
    color: #888; /* ← Серый цвет */
}



/* Блок с Telegram-каналом (отдельная карточка) */
.telegram-block {
    text-align: center;
    margin-top: 25px; /* Отступ от основной карточки */
    padding: 20px 25px;
    background: rgba(22, 27, 51, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}


.telegram-block p {
    color: #a0a0a0;
    font-size: 0.95rem;
    margin-bottom: 15px;
}



.telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 12px; /* Отступ между аватаркой и текстом */
    color: #4a9eff;
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    background: rgba(74, 158, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s ease;
}


.telegram-link:hover {
    background: rgba(74, 158, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}


.telegram-link:active {
    transform: scale(0.98);
}


/* Аватарка канала */
.telegram-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Круглая аватарка */
    object-fit: cover;
    border: 2px solid #4a9eff;
    box-shadow: 0 2px 8px rgba(74, 158, 255, 0.3);
}
/* Блок с Telegram (только на стартовом экране) */
.telegram-block-compact {
    max-width: 450px;
    margin: 0 auto 25px auto; /* ← Обычный отступ */
    padding: 15px 20px;
    background: rgba(22, 27, 51, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(74, 158, 255, 0.25);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}


.telegram-block-compact p {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin: 0 0 12px 0;
}


.telegram-link-compact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #4a9eff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(74, 158, 255, 0.1);
    border: 2px solid rgba(74, 158, 255, 0.3);
}


.telegram-link-compact:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: #4a9eff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
}


.telegram-link-compact:active {
    transform: scale(0.98);
}


.telegram-avatar-compact {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4a9eff;
    box-shadow: 0 2px 4px rgba(74, 158, 255, 0.3);
}
