/* Vintage Quiz Styles */
#vintage-quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.quiz-start-screen {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #333;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.quiz-start-screen h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
    color: #2c3e50;
}

.quiz-start-screen p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #34495e;
}

/* 選択画面のスタイル */
.quiz-selection-screen {
    padding: 40px 30px;
    text-align: center;
}

.quiz-selection-screen h3 {
    font-size: 1.5em;
    color: #292929;
    margin-bottom: 30px;
    font-weight: 600;
}

/* ステップインジケーター */
.quiz-step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    gap: 15px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8eaed;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: #667eea;
    transform: scale(1.2);
}

.step-dot.completed {
    background: #34a853;
}

.step-line {
    width: 40px;
    height: 2px;
    background: #e8eaed;
    transition: all 0.3s ease;
}

.step-line.completed {
    background: #34a853;
}

/* 選択セクション - 優先度強化版 */
.quiz-selection-section {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.selection-group {
    text-align: center;
    opacity: 0 !important;
    transform: translateY(20px) !important;
    transition: all 0.4s ease;
    display: none !important;
}

.selection-group.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
    display: block !important;
}

.selection-group h4 {
    color: #292929;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 600;
}

.selection-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    margin: 0 auto;
}

.selection-option {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #292929;
    font-weight: 500;
}

.selection-option:hover {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.selection-option.selected {
    background: rgba(255, 255, 255, 0.6);
    border-color: #667eea;
    color: #667eea;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

/* ボタンスタイル */
.quiz-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-btn-primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 10px 20px rgba(238, 90, 36, 0.3);
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(238, 90, 36, 0.4);
}

.quiz-btn-secondary {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    color: white;
    box-shadow: 0 10px 20px rgba(116, 185, 255, 0.3);
}

.quiz-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(116, 185, 255, 0.4);
}

.quiz-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

/* ナビゲーションボタン */
.quiz-navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

/* 確認画面用スタイル */
.quiz-ready-summary {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quiz-ready-summary p {
    margin: 8px 0;
    color: #292929;
    font-size: 16px;
    font-weight: 500;
}

.quiz-ready-summary strong {
    color: #667eea;
}

.ready-item {
    margin: 8px 0;
    color: #292929;
    font-size: 16px;
    font-weight: 500;
}

/* 制限メッセージ画面 */
.quiz-limit-screen {
    padding: 40px 30px;
    text-align: center;
}

.limit-message-container {
    max-width: 400px;
    margin: 0 auto;
}

.limit-icon {
    margin-bottom: 20px;
}

.limit-icon .dashicons {
    font-size: 64px;
    color: #ff6b6b;
    width: 64px;
    height: 64px;
}

.quiz-limit-screen h3 {
    font-size: 1.8em;
    color: #292929;
    margin-bottom: 20px;
    font-weight: 600;
}

.limit-message {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #292929;
}

#close-limit-btn {
    margin-top: 20px;
}

/* モーダルスタイル */
.quiz-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.quiz-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    overflow-y: auto;
}

body.quiz-modal-open {
    overflow: hidden;
}

/* プログレスバー */
.quiz-progress {
    padding: 30px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-progress-bar {
    flex: 1;
    height: 8px;
    background: #f1f3f4;
    border-radius: 10px;
    margin-right: 20px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.quiz-question-counter {
    font-weight: 600;
    color: #5f6368;
    font-size: 14px;
}

/* 問題コンテンツ */
.quiz-question-container {
    padding: 30px;
}

.quiz-image-container {
    margin-bottom: 30px;
}

.quiz-image-container img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#quiz-question {
    font-size: 1.4em;
    font-weight: 600;
    color: #202124;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* 選択肢 */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 20px;
    border: 2px solid #e8eaed;
    border-radius: 15px;
    background: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-weight: 500;
    color: #292929;
    position: relative;
    padding-left: 60px;
}

.quiz-option::before {
    content: attr(data-label);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #f1f3f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #5f6368;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.quiz-option:hover::before {
    background: #667eea;
    color: white;
}

.quiz-option.selected {
    border-color: #667eea;
    background: #f8f9ff;
}

.quiz-option.selected::before {
    background: #667eea;
    color: white;
}

.quiz-option.correct {
    border-color: #34a853;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.quiz-option.correct::before {
    background: #34a853;
    color: white;
}

.quiz-option.incorrect {
    border-color: #ea4335;
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.quiz-option.incorrect::before {
    background: #ea4335;
    color: white;
}

.quiz-option:disabled {
    cursor: not-allowed;
}

/* 結果コンテナ */
.quiz-result-container {
    padding: 30px;
    text-align: center;
}

#quiz-answer-result h4 {
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.correct-text {
    color: #34a853;
}

.incorrect-text {
    color: #ea4335;
}

#result-explanation {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #5f6368;
}

#next-question-btn {
    margin-top: 20px;
}

/* 最終結果 */
.quiz-final-result {
    padding: 40px 30px;
    text-align: center;
}

.quiz-final-result h3 {
    font-size: 2em;
    color: #202124;
    margin-bottom: 30px;
    font-weight: 700;
}

.final-score {
    font-size: 2.5em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.score-message {
    background: linear-gradient(135deg, #f8f9ff, #e8eaff);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #667eea;
}

.score-message p {
    font-size: 1.1em;
    color: #5f6368;
    margin: 0;
    font-weight: 500;
}

.quiz-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .quiz-modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 95vw;
        max-height: 90vh;
        margin: 0;
    }
    
    .quiz-start-screen {
        padding: 40px 20px;
    }
    
    .quiz-start-screen h2 {
        font-size: 2em;
    }
    
    .quiz-selection-screen {
        padding: 30px 20px;
    }
    
    .quiz-limit-screen {
        padding: 30px 20px;
    }
    
    .limit-icon .dashicons {
        font-size: 48px;
        width: 48px;
        height: 48px;
    }
    
    .quiz-limit-screen h3 {
        font-size: 1.5em;
    }
    
    .quiz-step-indicator {
        gap: 10px;
    }
    
    .step-line {
        width: 25px;
    }
    
    .selection-options {
        gap: 10px;
    }
    
    .selection-option {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .quiz-ready-summary {
        padding: 15px;
        margin: 15px 0;
    }
    
    .quiz-ready-summary p {
        font-size: 14px;
    }
    
    #quiz-question {
        font-size: 1.2em;
    }
    
    .quiz-option {
        padding: 15px;
        padding-left: 50px;
        font-size: 14px;
    }
    
    .quiz-option::before {
        left: 15px;
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .quiz-progress {
        padding: 20px 20px 0;
    }
    
    .quiz-question-container,
    .quiz-result-container {
        padding: 20px;
    }
    
    .quiz-final-result {
        padding: 30px 20px;
    }
    
    .final-score {
        font-size: 2em;
    }
    
    .quiz-actions {
        flex-direction: column;
    }
    
    .quiz-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .quiz-modal-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 98vw;
        max-height: 95vh;
        margin: 0;
        border-radius: 15px;
    }
    
    .quiz-progress {
        flex-direction: column;
        gap: 10px;
        padding: 15px 15px 0;
    }
    
    .quiz-progress-bar {
        margin-right: 0;
    }
    
    .quiz-image-container img {
        max-height: 200px;
    }
    
    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .quiz-selection-screen {
        padding: 20px 15px;
    }
    
    .quiz-limit-screen {
        padding: 20px 15px;
    }
    
    .quiz-question-container,
    .quiz-result-container {
        padding: 15px;
    }
    
    .quiz-final-result {
        padding: 20px 15px;
    }
    
    .quiz-step-indicator {
        gap: 8px;
    }
    
    .step-line {
        width: 20px;
    }
    
    .step-dot {
        width: 10px;
        height: 10px;
    }
    
    .selection-option {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .quiz-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: 100%;
    }
    
    .quiz-navigation .quiz-btn {
        margin-bottom: 8px;
    }
}

/* アニメーション */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-option {
    animation: slideInUp 0.3s ease forwards;
}

.quiz-option:nth-child(1) { animation-delay: 0.1s; }
.quiz-option:nth-child(2) { animation-delay: 0.2s; }
.quiz-option:nth-child(3) { animation-delay: 0.3s; }

/* ローディング効果 */
.quiz-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* 1. パルス用 keyframes 定義 */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 2. pulse クラスをつけるだけで無限ループ */
.pulse {
  animation: pulse 2s infinite ease-in-out;
}