@import url('../css/parts/1-base.css');
@import url('../css/parts/2-effects.css');

:root {
    --q-easy: #22c55e;
    --q-med: #f59e0b;
    --q-hard: #ef4444;
    --q-insane: #a855f7;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.quiz-wrapper {
    width: 100%;
    max-width: 600px;
    height: 100vh;
    max-height: 900px;
    background: #0f0f11;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    z-index: 20;
}

/* HEADER */
.quiz-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
}

.back-btn {
    color: #a1a1aa;
    text-decoration: none;
    font-size: 0.7rem;
    font-family: var(--font-pixel);
}

.quiz-title {
    color: var(--neon-purple);
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    letter-spacing: 2px;
}

.progress-text {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: #fff;
}

/* SCREENS */
.screen {
    flex-grow: 1;
    display: none;
    flex-direction: column;
    padding: 20px;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* START SCREEN */
.logo-area {
    font-size: 4rem;
    color: var(--neon-purple);
    margin-bottom: 20px;
    animation: float 3s infinite ease-in-out;
}

h1 {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: #fff;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 var(--neon-blue);
}

.desc {
    color: #a1a1aa;
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.difficulty-info {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    margin-bottom: 40px;
}

/* GAME SCREEN */
.question-card {
    width: 100%;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    text-align: center;
}

.difficulty-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    padding: 4px 12px;
    border-radius: 50px;
    font-family: var(--font-pixel);
    font-size: 0.5rem;
    text-transform: uppercase;
    border: 1px solid #555;
}

.question-card h2 {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #fff;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

.option-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.1);
    color: #ccc;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: bold;
    font-size: 0.9rem;
    transition: 0.2s;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    border-color: var(--neon-purple);
    background: rgba(217, 70, 239, 0.1);
    color: #fff;
}

/* НОВЫЙ СТИЛЬ: Просто выделение, без цвета правильности */
.option-btn.selected {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    transform: scale(0.98);
}

/* RESULT SCREEN */
.score-circle-container {
    margin: 30px 0;
    position: relative;
    width: 160px;
    height: 160px;
}

.score-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(#333 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: background 1s ease-out, box-shadow 1s ease-out;
    position: relative;
}

/* Анимация вращения для активного круга */
.score-circle.animating::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.2);
    animation: spin-circle 10s linear infinite;
    pointer-events: none;
}

@keyframes spin-circle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.inner-circle {
    width: 85%;
    height: 85%;
    background: #0f0f11;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

#score-percent {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: #fff;
}

.rank-container {
    text-align: center;
    margin-bottom: 30px;
}

.rank-label {
    font-size: 0.7rem;
    color: #777;
    margin-bottom: 5px;
}

.rank-title {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: var(--neon-purple);
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}

.stats-row {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    font-family: var(--font-pixel);
    font-size: 0.7rem;
}

.neon-btn {
    background: var(--neon-purple);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-family: var(--font-pixel);
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: 0 5px 0 #86198f;
    transition: 0.1s;
    text-transform: uppercase;
}

.neon-btn:active {
    transform: translateY(5px);
    box-shadow: none;
}

.text-link {
    margin-top: 20px;
    color: #777;
    text-decoration: none;
    font-size: 0.8rem;
    border-bottom: 1px dashed #555;
}

.text-link:hover { color: #fff; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (min-width: 768px) {
    .options-grid { grid-template-columns: 1fr 1fr; }
}