* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 100, 200, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(100, 200, 255, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(200, 100, 255, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0d0d0d 0%, #1a0d1a 50%, #2d1b2d 100%);
    background-attachment: fixed;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    color: #e0e0e0;
    width: 100vw;
    max-width: 100vw;
    position: relative;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Мозговые элементы */
.brain-waves {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.brain-wave {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 100, 200, 0.6), transparent);
    animation: brainWave 4s infinite ease-in-out;
}

@keyframes brainWave {
    0%, 100% {
        transform: translateX(-100%) scaleX(0);
        opacity: 0;
    }
    50% {
        transform: translateX(0) scaleX(1);
        opacity: 1;
    }
}

.brain-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.brain-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(200, 100, 255, 0.8);
    border-radius: 50%;
    animation: brainFloat 10s infinite linear;
}

@keyframes brainFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(200px) rotate(720deg);
        opacity: 0;
    }
}

/* Мозговые эффекты */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 25%, rgba(255, 152, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 87, 34, 0.12) 0%, transparent 50%),
        linear-gradient(45deg, transparent 30%, rgba(255, 152, 0, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

/* Нейронная сеть */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 152, 0, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255, 87, 34, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 60%, rgba(255, 193, 7, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 60% 40%, rgba(255, 152, 0, 0.1) 2px, transparent 2px);
    background-size: 60px 60px, 80px 80px, 100px 100px, 70px 70px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    animation: neuralPulse 4s ease-in-out infinite;
}

@keyframes neuralPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

.container {
    max-width: 100vw;
    width: 100%;
    margin: 0 auto;
    padding: 5px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-x: hidden;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 15px;
    margin-top: 20px;
    color: white;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    header {
        margin-bottom: 5px;
    }
}

header h1 {
    font-size: 1.5rem;
    margin-bottom: 3px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    header h1 {
        margin-bottom: 2px;
    }
}

header p {
    font-size: 0.8rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    header p {
        margin-bottom: 0;
    }
}

.screen {
    display: none;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-card, .question-card, .result-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(255,248,225,0.95) 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 20px 40px rgba(255, 87, 34, 0.2),
        0 0 0 1px rgba(255, 152, 0, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.8);
    text-align: center;
    max-height: 75vh;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 152, 0, 0.4);
    position: relative;
    color: #0f172a;
}

/* Мозговые элементы */
.welcome-card::before, .question-card::before, .result-card::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    background: linear-gradient(45deg, #FF9800, #FFC107);
    border-radius: 50%;
    opacity: 0.3;
    animation: brainPulse 2s ease-in-out infinite;
}

.welcome-card::after, .question-card::after, .result-card::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #FF5722, #FF9800);
    border-radius: 50%;
    opacity: 0.2;
    animation: brainPulse 2s ease-in-out infinite reverse;
}

@keyframes brainPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

/* Анимация slideIn только для десктопа */
@media (min-width: 769px) {
    .welcome-card, .question-card, .result-card {
        animation: slideIn 0.5s ease-out;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brain-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: brainWave 2.5s ease-in-out infinite;
}

@keyframes brainWave {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(1deg); }
    75% { transform: scale(1.05) rotate(-1deg); }
}

.welcome-card h2 {
    background: linear-gradient(45deg, #FF5722, #FF9800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: bold;
}

.intro-text {
    font-size: 1.1rem;
    color: #2c2c2c;
    margin-bottom: 20px;
    line-height: 1.6;
    font-style: italic;
    font-weight: 500;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(145deg, rgba(255, 152, 0, 0.05) 0%, rgba(255, 87, 34, 0.05) 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 152, 0, 0.1);
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #1a1a1a;
    font-weight: 600;
}

.disclaimer {
    font-size: 0.85rem;
    color: #4a4a4a;
    margin: 15px 0;
    font-style: italic;
    font-weight: 500;
}

.welcome-card p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #666;
}

.progress-bar {
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    height: 8px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #FF5722, #FF9800, #FFC107);
    height: 100%;
    border-radius: 15px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: neuralFlow 2s infinite;
}

@keyframes neuralFlow {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Счетчик вопросов удален */

.question-card h2 {
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 700;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.options-container {
    margin-bottom: 15px;
}

.option {
    background: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(255,248,225,0.95) 100%);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 15px;
    padding: 12px 18px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    color: #0f172a;
    font-weight: 600;
    line-height: 1.4;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
    word-break: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.option:hover::before {
    left: 100%;
}

/* Анимации при наведении только для десктопа */
@media (min-width: 769px) {
    .option:hover {
        background: linear-gradient(145deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 87, 34, 0.1) 100%);
        border-color: #FF9800;
        transform: translateY(-3px) scale(1.02);
        box-shadow: 0 8px 25px rgba(255, 152, 0, 0.3);
    }
}

.option.selected {
    background: linear-gradient(145deg, #FF9800, #FF5722);
    color: white;
    border-color: #E65100;
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.option.correct {
    background: #4CAF50;
    color: white;
    border-color: #388E3C;
}

.option.incorrect {
    background: #f44336;
    color: white;
    border-color: #d32f2f;
}

.btn {
    background: linear-gradient(45deg, #FF5722, #FF9800, #E65100);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

.btn-sticker {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
    margin-bottom: 15px;
    width: 100%;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

/* Анимации кнопок при наведении только для десктопа */
@media (min-width: 769px) {
    .btn:hover {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 15px 35px rgba(255, 152, 0, 0.4);
    }
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(45deg, #D84315, #FF5722, #BF360C);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.3);
}

.result-card {
    position: relative;
}

#result-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

#result-title {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.description {
    font-size: 1rem;
    line-height: 1.5;
    color: #2c2c2c;
    margin-bottom: 15px;
    font-weight: 500;
}

.details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.details h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.details ul {
    list-style: none;
    padding: 0;
}

.details li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    color: #666;
    font-size: 0.9rem;
}

.details li:last-child {
    border-bottom: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 3px;
        justify-content: flex-start;
        padding-top: 10px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .welcome-card, .question-card, .result-card {
        padding: 15px;
        margin-top: 5px;
    }
    
    .option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Анимации для результатов - отключены на мобильных устройствах */
.result-card.analytical {
    border-left: 5px solid #FF5722;
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255, 87, 34, 0.05) 100%);
}

.result-card.creative {
    border-left: 5px solid #FF9800;
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255, 152, 0, 0.1) 100%);
}

.result-card.practical {
    border-left: 5px solid #FFC107;
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255, 193, 7, 0.1) 100%);
}

.result-card.intuitive {
    border-left: 5px solid #E65100;
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(230, 81, 0, 0.05) 100%);
}

/* Анимации только для десктопа */
@media (min-width: 769px) {
    .result-card.analytical {
        animation: analyticalGlow 2s ease-in-out infinite alternate;
    }

    .result-card.creative {
        animation: creativePulse 1.5s ease-in-out infinite;
    }

    .result-card.practical {
        animation: practicalBounce 1s ease-in-out;
    }

    .result-card.intuitive {
        animation: intuitiveFloat 2s ease-in-out infinite;
    }
}

@keyframes analyticalGlow {
    from { box-shadow: 0 20px 40px rgba(255, 87, 34, 0.3); }
    to { box-shadow: 0 20px 40px rgba(255, 87, 34, 0.6); }
}

@keyframes creativePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes practicalBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes intuitiveFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
