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

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

:root {
--bg-main: #050509;
--glass-bg: rgba(15, 15, 20, 0.82);
--glass-border: rgba(255, 255, 255, 0.06);
--accent: #3a7bd5;
--accent-soft: rgba(58, 123, 213, 0.18);
--text-main: #f5f5f7;
--text-muted: #9b9ba1;
--nav-height: 70px;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
background:
radial-gradient(circle at 0% 0%, rgba(255, 0, 92, 0.24), transparent 55%),
radial-gradient(circle at 100% 100%, rgba(255, 0, 0, 0.18), transparent 55%),
radial-gradient(circle at 0% 100%, rgba(120, 0, 40, 0.18), transparent 55%),
linear-gradient(145deg, #020107 0%, #050509 45%, #050307 100%);
min-height: 100vh;
color: var(--text-main);
padding-bottom: var(--nav-height);
}

.app-container {
max-width: 620px;
margin: 0 auto;
min-height: 100vh;
position: relative;
}

.page {
display: none;
padding: 20px;
animation: fadeIn 0.3s ease;
}

.page.active {
display: block;
}

@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}

.dashboard-header {
text-align: center;
margin-bottom: 24px;
}

.dashboard-header h1 {
font-size: 24px;
font-weight: 700;
margin-bottom: 6px;
}

.dashboard-header p {
font-size: 14px;
color: var(--text-muted);
}

.card {
background: var(--glass-bg);
border-radius: 20px;
padding: 20px;
margin-bottom: 16px;
border: 1px solid var(--glass-border);
backdrop-filter: blur(22px) saturate(140%);
-webkit-backdrop-filter: blur(22px) saturate(140%);
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.card-header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
}

.card-icon {
font-size: 24px;
}

.card-title {
font-size: 16px;
font-weight: 600;
}

.card-content {
font-size: 14px;
color: var(--text-muted);
line-height: 1.6;
}

.position-result {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
background: rgba(58, 123, 213, 0.12);
border-radius: 14px;
margin-top: 12px;
border: 1px solid rgba(58, 123, 213, 0.3);
}

.position-result-text {
font-size: 18px;
font-weight: 600;
}

.position-result-date {
font-size: 12px;
color: var(--text-muted);
margin-top: 4px;
}

.btn-small {
padding: 8px 16px;
background: var(--accent);
color: #fff;
border: none;
border-radius: 999px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: all 0.15s ease;
}

.btn-small:hover {
transform: translateY(-1px);
box-shadow: 0 8px 16px rgba(58, 123, 213, 0.4);
}

.hero-list {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 12px;
}

/* старые hero-item можно оставить, но они больше не используются для hero-quiz */
.hero-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 14px;
background: rgba(255, 255, 255, 0.04);
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.06);
gap: 12px;
}

.hero-rank {
font-size: 16px;
font-weight: 700;
color: #00d2ff;
min-width: 24px;
flex-shrink: 0;
}

.hero-icon {
width: 48px;
height: 27px;
object-fit: cover;
border-radius: 6px;
border: 1px solid rgba(255, 255, 255, 0.1);
flex-shrink: 0;
}

.hero-name {
font-size: 14px;
font-weight: 500;
flex: 1;
}

.hero-tags {
font-size: 11px;
color: var(--text-muted);
margin-top: 2px;
}

.hero-match {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 4px;
min-width: 60px;
flex-shrink: 0;
}

.hero-match-percent {
font-size: 14px;
font-weight: 600;
color: #00d2ff;
}

.hero-match-bar {
width: 60px;
height: 4px;
background: rgba(255, 255, 255, 0.1);
border-radius: 999px;
overflow: hidden;
}

.hero-match-fill {
height: 100%;
background: linear-gradient(90deg, #3a7bd5, #00d2ff);
border-radius: 999px;
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 0 8px rgba(0, 210, 255, 0.6);
}

.tip-card {
padding: 16px;
background: linear-gradient(135deg, rgba(58, 123, 213, 0.15), rgba(0, 210, 255, 0.1));
border-radius: 14px;
border: 1px solid rgba(58, 123, 213, 0.3);
}

.quick-actions {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
margin-top: 12px;
}

.action-btn {
padding: 14px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
color: var(--text-main);
font-size: 15px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s ease;
text-align: left;
display: flex;
align-items: center;
gap: 10px;
}

.action-btn:hover {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(58, 123, 213, 0.5);
transform: translateY(-1px);
}

.action-btn.disabled {
opacity: 0.5;
cursor: not-allowed;
}

.action-btn.disabled:hover {
transform: none;
}

.badge-soon {
margin-left: auto;
padding: 4px 10px;
background: rgba(255, 255, 255, 0.1);
border-radius: 999px;
font-size: 11px;
color: var(--text-muted);
}

.quiz-container {
background: var(--glass-bg);
border-radius: 26px;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
padding: 28px 20px 26px;
backdrop-filter: blur(22px) saturate(140%);
border: 1px solid var(--glass-border);
}

h1 {
font-size: 22px;
color: var(--text-main);
margin-bottom: 6px;
font-weight: 700;
letter-spacing: 0.02em;
text-align: center;
}

.subtitle {
font-size: 14px;
color: var(--text-muted);
margin-bottom: 22px;
text-align: center;
}

.progress-bar {
width: 100%;
height: 6px;
background: rgba(255, 255, 255, 0.06);
border-radius: 999px;
margin-bottom: 22px;
overflow: hidden;
}

.progress-fill {
height: 100%;
background: linear-gradient(90deg, #3a7bd5, #00d2ff);
width: 0%;
transition: width 0.3s ease;
box-shadow: 0 0 12px rgba(0, 210, 255, 0.6);
}

.question {
font-size: 17px;
color: var(--text-main);
margin-bottom: 18px;
font-weight: 600;
line-height: 1.5;
text-align: left;
}

.answers {
display: flex;
flex-direction: column;
gap: 12px;
margin-bottom: 12px;
}

.answer-btn {
background: radial-gradient(circle at 0 0, rgba(58, 123, 213, 0.12), rgba(10, 10, 16, 0.96));
border: 1px solid rgba(255, 255, 255, 0.06);
padding: 12px 13px;
border-radius: 18px;
font-size: 15px;
cursor: pointer;
transition: all 0.18s ease;
text-align: left;
color: var(--text-main);
font-weight: 500;
line-height: 1.4;
display: flex;
align-items: flex-start;
gap: 10px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6), 0 10px 24px rgba(0, 0, 0, 0.8);
}

@media (hover: hover) and (pointer: fine) {
.answer-btn:hover {
background: radial-gradient(circle at 0 0, rgba(58, 123, 213, 0.18), rgba(15, 15, 22, 0.98));
border-color: rgba(58, 123, 213, 0.45);
transform: translateY(-1px);
}
}

.answer-btn.selected {
background: radial-gradient(circle at 0 0, rgba(58, 123, 213, 0.28), rgba(8, 8, 14, 0.98));
border-color: #3a7bd5;
transform: scale(0.98);
}

.answer-btn span.emoji {
font-size: 18px;
flex-shrink: 0;
}

.answer-btn span.text {
flex: 1;
}

.result {
display: none;
text-align: center;
}

.result.active {
display: block;
animation: fadeIn 0.45s ease;
}

.result-header {
font-size: 32px;
margin-bottom: 6px;
}

.result-title {
font-size: 13px;
color: var(--text-muted);
margin-bottom: 16px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}

.position-primary {
font-size: 18px;
color: var(--text-main);
margin-bottom: 10px;
font-weight: 600;
line-height: 1.3;
}

.position-badge {
display: inline-block;
padding: 8px 18px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
border: 2px solid rgba(255, 255, 255, 0.25);
color: #fff;
font-size: 14px;
font-weight: 600;
margin-bottom: 20px;
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.position-secondary-label {
font-size: 13px;
color: var(--text-muted);
margin-bottom: 8px;
font-weight: 500;
}

.position-secondary-badge {
display: inline-block;
padding: 6px 16px;
border-radius: 999px;
background: linear-gradient(135deg, rgba(58, 123, 213, 0.2), rgba(0, 210, 255, 0.2));
border: 1.5px solid rgba(58, 123, 213, 0.5);
color: #a0c4ff;
font-size: 13px;
font-weight: 600;
margin-bottom: 24px;
box-shadow: 0 4px 12px rgba(58, 123, 213, 0.25);
}

.stats {
margin-bottom: 24px;
}

.stat-item {
margin-bottom: 14px;
text-align: left;
}

.stat-item:last-child {
margin-bottom: 0;
}

.stat-label {
font-size: 13px;
color: var(--text-main);
margin-bottom: 6px;
font-weight: 500;
display: flex;
justify-content: space-between;
}

.stat-value {
color: var(--text-muted);
font-size: 12px;
}

.stat-bar {
width: 100%;
height: 8px;
background: rgba(255, 255, 255, 0.06);
border-radius: 999px;
overflow: hidden;
}

.stat-bar-fill {
height: 100%;
background: linear-gradient(90deg, #3a7bd5, #00d2ff);
border-radius: 999px;
width: 0;
transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 0 10px rgba(0, 210, 255, 0.6);
}

.description {
font-size: 14px;
color: var(--text-muted);
line-height: 1.6;
margin-bottom: 20px;
white-space: pre-line;
text-align: left;
background: rgba(58, 123, 213, 0.08);
border: 1px solid rgba(58, 123, 213, 0.25);
border-radius: 16px;
padding: 16px;
}

.hidden {
display: none;
}

.btn-outline {
background: transparent;
color: var(--text-main);
border: 1px solid rgba(58, 123, 213, 0.5);
padding: 11px 26px;
border-radius: 999px;
font-size: 15px;
cursor: pointer;
font-weight: 600;
transition: all 0.15s ease;
display: block;
margin: 0 auto 12px auto;
width: fit-content;
}

.btn-outline:hover {
background: rgba(58, 123, 213, 0.1);
border-color: #3a7bd5;
}

.btn-secondary {
background: transparent;
color: var(--text-muted);
border: 1px solid rgba(255, 255, 255, 0.15);
padding: 11px 26px;
border-radius: 999px;
font-size: 15px;
cursor: pointer;
font-weight: 500;
transition: all 0.15s ease;
display: block;
margin: 0 auto;
width: fit-content;
}

.btn-secondary:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.25);
color: var(--text-main);
}

.position-select-grid {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
margin-top: 16px;
}

.position-option {
background: radial-gradient(circle at 0 0, rgba(58, 123, 213, 0.12), rgba(10, 10, 16, 0.96));
border: 1px solid rgba(255, 255, 255, 0.06);
padding: 14px 16px;
border-radius: 16px;
cursor: pointer;
transition: all 0.18s ease;
text-align: left;
color: var(--text-main);
font-weight: 500;
font-size: 15px;
}

.position-option:hover {
background: radial-gradient(circle at 0 0, rgba(58, 123, 213, 0.18), rgba(15, 15, 22, 0.98));
border-color: rgba(58, 123, 213, 0.45);
transform: translateY(-1px);
}

.bottom-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: var(--nav-height);
background: rgba(10, 10, 15, 0.95);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border-top: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 20px;
z-index: 1000;
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

.nav-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 8px 16px;
cursor: pointer;
transition: all 0.2s ease;
border-radius: 12px;
color: var(--text-muted);
}

.nav-item:hover {
background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
color: #00d2ff;
}

.nav-icon {
font-size: 24px;
transition: transform 0.2s ease;
}

.nav-item.active .nav-icon {
transform: scale(1.1);
}

.nav-label {
font-size: 11px;
font-weight: 500;
letter-spacing: 0.02em;
}

.placeholder {
text-align: center;
padding: 60px 20px;
}

.placeholder-icon {
font-size: 64px;
margin-bottom: 16px;
opacity: 0.5;
}

.placeholder-title {
font-size: 20px;
font-weight: 600;
margin-bottom: 8px;
}

.placeholder-text {
font-size: 14px;
color: var(--text-muted);
}

@media (max-width: 380px) {
h1 {
font-size: 20px;
}
.question {
font-size: 16px;
}
.answer-btn {
font-size: 14px;
padding: 10px 11px;
}
}

/* === НОВЫЙ БЛОК: сетка и карточки героев для hero-quiz === */

.hero-result-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
margin-top: 14px;
}

.hero-card {
background: rgba(15, 15, 20, 0.9);
border-radius: 16px;
padding: 10px 10px 12px;
border: 1px solid rgba(255, 255, 255, 0.06);
box-shadow: 0 10px 26px rgba(0, 0, 0, 0.85);
display: flex;
flex-direction: column;
gap: 6px;
}

.hero-card--gold {
border-color: #ffd75a;
box-shadow: 0 0 0 1px rgba(255, 215, 90, 0.25), 0 10px 26px rgba(0, 0, 0, 0.9);
}

.hero-card--silver {
border-color: #b0c4ff;
box-shadow: 0 0 0 1px rgba(176, 196, 255, 0.25), 0 10px 24px rgba(0, 0, 0, 0.85);
}

.hero-card--bronze {
border-color: #e0a96d;
box-shadow: 0 0 0 1px rgba(224, 169, 109, 0.18), 0 10px 22px rgba(0, 0, 0, 0.8);
}

.hero-card__top {
display: flex;
align-items: center;
gap: 8px;
}

.hero-card__icon {
width: 44px;
height: 25px;
border-radius: 6px;
object-fit: cover;
border: 1px solid rgba(255, 255, 255, 0.12);
flex-shrink: 0;
}

.hero-card__info {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1;
}

.hero-card__name {
font-size: 13px;
font-weight: 600;
color: #f7f7fb;
}

.hero-card__match {
font-size: 11px;
color: var(--text-muted);
}

.hero-card__match span {
color: #00d2ff;
font-weight: 600;
}

.hero-card__stats {
margin-top: 3px;
padding-top: 4px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
display: flex;
flex-direction: column;
gap: 2px;
}

.hero-card__stat-row {
display: flex;
justify-content: space-between;
font-size: 11px;
color: var(--text-muted);
}

.hero-card__stat-row span:last-child {
font-weight: 500;
color: #e0e0ff;
}

@media (max-width: 400px) {
.hero-result-grid {
gap: 8px;
}
.hero-card {
padding: 9px 8px 10px;
}
.hero-card__name {
font-size: 12px;
}
.hero-card__stat-row {
font-size: 10px;
}
}