/* Основные стили для Vanilla JS приложения */

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: white;
    overflow-x: hidden;
    position: relative;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: pulse 15s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    padding: 40px 20px;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 20px rgba(255, 126, 95, 0.3);
}

.header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.3s ease;
}

.loading {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff7e5f;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для контейнера викторины */
.quiz-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.question-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.5s ease-out;
    transition: opacity 0.3s ease;
}

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

.question-text {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.question-hint {
    text-align: center;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    font-size: 0.95rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.option {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.option.selected::after {
    opacity: 1;
}

.option > * {
    position: relative;
    z-index: 1;
}

.option:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.option.selected {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.option-icon {
    margin-right: 15px;
    font-size: 1.5rem;
    color: white;
}

.option-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.4;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.btn {
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-back {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-next {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.question-counter {
    text-align: center;
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Стили для результатов */
.result-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

.result-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.result-card.error {
    border-color: rgba(255, 99, 99, 0.4);
    background: rgba(255, 99, 99, 0.1);
}

.result-card.contact {
    border-color: rgba(99, 195, 255, 0.4);
    background: rgba(99, 195, 255, 0.1);
}

.result-header {
    margin-bottom: 30px;
}

.result-image {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.result-details {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.detail-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ff7e5f;
}

.result-actions {
    margin-bottom: 30px;
}

.result-actions h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.btn-avito {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #FF6B35, #FFA62E);
    color: white;
    text-decoration: none;
    padding: 18px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-avito:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.4);
}

.btn-restart {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    margin-top: 20px;
}

.btn-restart:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .contacts {
    margin-top: 20px;
}

.footer .contacts p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer .contacts a {
    color: #ff7e5f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer .contacts a:hover {
    color: #feb47b;
    text-decoration: underline;
}

.contact-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white !important;
}

.contact-link.telegram {
    background: #0088cc;
}

.contact-link.whatsapp {
    background: #25D366;
}

.contact-link.account {
    background: #6a11cb;
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.footer .hint {
    margin-top: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Адаптивность */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .question-card {
        padding: 25px;
    }
    
    .question-text {
        font-size: 1.5rem;
    }
    
    .option {
        padding: 15px;
    }
    
    .option-text {
        font-size: 1rem;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .result-card {
        padding: 25px;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 10px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
}
