/**
 * Poker Quiz Plugin Styles
 * Стили для теста "Школа покера"
 * Version: 1.2.0
 */

/* Основной контейнер теста */
.poker-quiz-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #1a4d3a 50%, #2d6e3e 100%);
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    color: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Декоративные элементы */
.poker-quiz-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Заголовок теста */
.quiz-header {
    text-align: center;
    padding: 40px 30px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-header h2 {
    margin: 0 0 25px 0;
    font-size: 2.5em;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(0, 255, 136, 0.3);
    letter-spacing: -0.5px;
}

/* Прогресс бар */
.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #4ade80);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 255, 136, 0.4);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.question-counter {
    font-size: 1.2em;
    font-weight: 600;
    opacity: 0.9;
    color: #00ff88;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Слайды с вопросами */
.question-slide {
    background: rgba(255, 255, 255, 0.97);
    color: #1a1a1a;
    margin: 30px;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.question-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.question-content h3 {
    font-size: 1.5em;
    margin-bottom: 30px;
    color: #1a4d3a;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Сетка ответов */
.answers-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 40px;
}

/* Варианты ответов */
.answer-option {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-weight: 500;
    min-height: 60px;
}

.answer-option:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196F3;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.25);
}

.answer-option.selected {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-color: #00ff88;
    color: #1a4d3a;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

/* Скрытие стандартных radio buttons */
.answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный чекбокс */
.answer-option .checkmark {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f3f4 100%);
    border: 3px solid #dee2e6;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.answer-option:hover .checkmark {
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.answer-option.selected .checkmark {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border-color: #00ff88;
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.answer-option .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.answer-option.selected .checkmark:after {
    display: block;
}

/* Текст ответа */
.option-text {
    flex: 1;
    font-size: 1.1em;
    margin-left: 50px;
    line-height: 1.4;
    color: #2c3e50;
}

.answer-option.selected .option-text {
    color: #1a4d3a;
    font-weight: 600;
}

/* Кнопки навигации */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.btn-prev,
.btn-next,
.btn-finish,
.btn-restart,
.btn-share {
    padding: 16px 32px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.btn-prev {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-next,
.btn-finish {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #1a4d3a;
    font-weight: 700;
    margin-left: auto;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.btn-prev:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-next:hover,
.btn-finish:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.5);
    background: linear-gradient(135deg, #00ff88 0%, #4ade80 100%);
}

/* Контейнер результатов */
#quiz-results {
    padding: 40px 30px;
    text-align: center;
}

.results-container {
    background: rgba(255, 255, 255, 0.97);
    color: #1a1a1a;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.results-header h2 {
    color: #1a4d3a;
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Отображение счета */
.score-display {
    margin: 40px 0;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    border: 6px solid #e9ecef;
    border-radius: 50%;
    background: linear-gradient(135deg, #000000 0%, #1a4d3a 50%, #00ff88 100%);
    color: white;
    font-weight: bold;
    box-shadow: 0 15px 35px rgba(0, 255, 136, 0.3);
    position: relative;
    overflow: hidden;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.score-number {
    font-size: 3.5em;
    line-height: 1;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.score-total {
    font-size: 1.3em;
    opacity: 0.9;
    z-index: 1;
}

/* Рейтинг */
.rating-section {
    margin: 40px 0;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rating-badge.excellent {
    background: linear-gradient(135deg, #00ff88 0%, #4ade80 100%);
    color: #1a4d3a;
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.4);
}

.rating-badge.good {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.rating-badge.poor {
    background: linear-gradient(135deg, #F44336 0%, #D32F2F 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4);
}

.rating-icon {
    font-size: 1.5em;
    margin-right: 15px;
}

.rating-description {
    font-size: 1.2em;
    color: #495057;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Кнопки действий */
.action-buttons {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-restart {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-share {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #1a4d3a;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
}

.btn-restart:hover,
.btn-share:hover {
    transform: translateY(-3px);
}

.btn-restart:hover {
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

.btn-share:hover {
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.5);
}

/* Анимации загрузки */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00ff88;
    animation: spin 1s ease-in-out infinite;
}

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

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .poker-quiz-wrapper {
        margin: 20px;
        max-width: none;
    }
    
    .quiz-header h2 {
        font-size: 2.2em;
    }
    
    .question-slide {
        margin: 20px;
        padding: 30px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .poker-quiz-wrapper {
        margin: 10px;
        border-radius: 16px;
    }
    
    .quiz-header {
        padding: 30px 20px 20px;
    }
    
    .quiz-header h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .question-slide {
        margin: 15px;
        padding: 25px 20px;
    }
    
    .question-content h3 {
        font-size: 1.3em;
        margin-bottom: 25px;
    }
    
    .answer-option {
        padding: 15px 20px;
        min-height: 50px;
    }
    
    .option-text {
        margin-left: 45px;
        font-size: 1em;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-prev,
    .btn-next,
    .btn-finish {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-number {
        font-size: 2.8em;
    }
    
    .results-container {
        padding: 30px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-restart,
    .btn-share {
        width: 100%;
        max-width: 300px;
    }
    
    .rating-badge {
        padding: 15px 30px;
        font-size: 1.2em;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .quiz-header h2 {
        font-size: 1.6em;
    }
    
    .question-content h3 {
        font-size: 1.2em;
    }
    
    .option-text {
        font-size: 0.95em;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
    }
    
    .score-number {
        font-size: 2.4em;
    }
    
    .rating-description {
        font-size: 1.1em;
    }
}

/* Анимации появления */
.question-slide {
    animation: slideInUp 0.6s ease-out;
}

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

#quiz-results {
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Улучшенная типографика */
.poker-quiz-wrapper * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Фокус для доступности */
.answer-option:focus,
.btn-prev:focus,
.btn-next:focus,
.btn-finish:focus,
.btn-restart:focus,
.btn-share:focus {
    outline: 3px solid rgba(0, 255, 136, 0.5);
    outline-offset: 2px;
}

/* Состояние disabled для кнопок */
.btn-prev:disabled,
.btn-next:disabled,
.btn-finish:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Дополнительные эффекты */
.poker-quiz-wrapper:hover::before {
    animation-duration: 2s;
}

/* Особые эффекты для результатов */
.rating-badge {
    position: relative;
    overflow: hidden;
}

.rating-badge::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;
}

.rating-badge:hover::before {
    left: 100%;
}