/* ============================================
   64タイプ性格診断 - メインスタイル
   カラー: 黒系 & 黒紫グラデーション

   紫カラーパレット:
   - 濃い紫: #7b2cbf
   - 中間紫: #9d4edd
   - 薄い紫: #d8b4fe
   - 最薄紫: #f3e8ff

   背景カラーパレット:
   - 濃い紺: #0f0f1a
   - 中間紺: #1a1a2e
   - 紫がかった紺: #1e1b4b
   - 薄い紺紫: #2e1065
   ============================================ */

/* コンテナ */
.quiz64-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background:
        radial-gradient(ellipse at top left, rgba(126, 34, 206, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(88, 28, 135, 0.2) 0%, transparent 50%),
        linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 25%, #1e1b4b 50%, #1a1a2e 75%, #0f0f1a 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ヘッダー */
.quiz64-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(157, 78, 221, 0.3);
}

.quiz64-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #7b2cbf 0%, #a855f7 35%, #d8b4fe 70%, #f3e8ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz64-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* プログレスバー */
.quiz64-progress-wrapper {
    margin-bottom: 30px;
}

.quiz64-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.quiz64-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7b2cbf 0%, #a855f7 40%, #d8b4fe 80%, #f3e8ff 100%);
    border-radius: 10px;
    transition: width 0.4s ease;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.5);
}

.quiz64-progress-text {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.quiz64-progress-text .quiz64-current {
    background: linear-gradient(135deg, #a855f7, #d8b4fe, #f3e8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 18px;
}

.quiz64-progress-text .quiz64-total {
    color: rgba(255, 255, 255, 0.6);
}

/* 質問エリア */
.quiz64-questions {
    min-height: 250px;
}

.quiz64-question {
    animation: fadeIn 0.4s ease;
}

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

.quiz64-question-number {
    display: inline-block;
    background: linear-gradient(135deg, #7b2cbf 0%, #a855f7 50%, #d8b4fe 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.quiz64-question-text {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(157, 78, 221, 0.2);
}

/* 回答ボタン */
.quiz64-answers {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz64-answer-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 18px 25px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.quiz64-answer-btn:hover {
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.15), rgba(216, 180, 254, 0.15));
    border-color: #a855f7;
    transform: translateX(5px);
    box-shadow: 0 5px 25px rgba(168, 85, 247, 0.3);
}

.quiz64-answer-btn:active {
    transform: translateX(5px) scale(0.98);
}

.quiz64-answer-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #7b2cbf 0%, #a855f7 50%, #d8b4fe 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.quiz64-answer-text {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

/* 選択済み状態 */
.quiz64-answer-btn.selected {
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.3), rgba(216, 180, 254, 0.3));
    border-color: #d8b4fe;
}

/* 計算中表示 */
.quiz64-calculating {
    text-align: center;
    padding: 60px 20px;
}

.quiz64-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(157, 78, 221, 0.2);
    border-top: 4px solid transparent;
    border-image: linear-gradient(135deg, #7b2cbf, #c77dff) 1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    /* border-imageはborder-radiusと併用不可なのでfallback */
    border: 4px solid rgba(199, 125, 255, 0.3);
    border-top-color: #9d4edd;
    border-right-color: #c77dff;
}

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

.quiz64-calculating p {
    font-size: 16px;
    background: linear-gradient(135deg, #a855f7, #d8b4fe, #f3e8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .quiz64-container {
        padding: 20px 15px;
        border-radius: 15px;
        margin: 10px;
    }

    .quiz64-title {
        font-size: 22px;
    }

    .quiz64-question-text {
        font-size: 16px;
        padding: 15px;
    }

    .quiz64-answer-btn {
        padding: 15px 18px;
    }

    .quiz64-answer-label {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .quiz64-answer-text {
        font-size: 14px;
    }
}

/* ダークモード対応（既にダークなので最小限の調整） */
@media (prefers-color-scheme: dark) {
    .quiz64-container {
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    }
}

/* ============================================
   タブ切り替え版スタイル
   ============================================ */

.quiz64-tabs-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

/* タブボタン */
.quiz64-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.quiz64-tab {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #1e1b4b 100%);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-bottom: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.quiz64-tab:first-child {
    border-radius: 12px 0 0 0;
    border-right: 1px solid rgba(168, 85, 247, 0.3);
}

.quiz64-tab:last-child {
    border-radius: 0 12px 0 0;
    border-left: 1px solid rgba(168, 85, 247, 0.3);
}

.quiz64-tab:hover {
    background: linear-gradient(135deg, #1a1a2e 0%, #2e1065 100%);
    border-color: rgba(216, 180, 254, 0.5);
}

.quiz64-tab.active {
    background:
        radial-gradient(ellipse at center, rgba(126, 34, 206, 0.1) 0%, transparent 70%),
        linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 25%, #1e1b4b 50%, #1a1a2e 75%, #0f0f1a 100%);
    border-color: #a855f7;
    z-index: 2;
}

.quiz64-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(160deg, #0f0f1a 0%, #1a1a2e 50%, #1e1b4b 100%);
}

.quiz64-tab-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.quiz64-tab-text {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

.quiz64-tab.active .quiz64-tab-text {
    background: linear-gradient(135deg, #d8b4fe, #f3e8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz64-tab-count {
    font-size: 11px;
    color: #d8b4fe;
    background: linear-gradient(135deg, rgba(123, 44, 191, 0.2), rgba(216, 180, 254, 0.2));
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.quiz64-tab.active .quiz64-tab-count {
    background: linear-gradient(135deg, #7b2cbf 0%, #a855f7 50%, #d8b4fe 100%);
    color: #fff;
}

/* タブコンテンツ */
.quiz64-tab-content {
    display: none;
}

.quiz64-tab-content.active {
    display: block;
}

.quiz64-tab-content .quiz64-container {
    border-radius: 0 0 20px 20px;
    margin-top: 0;
}

/* タブ版のレスポンシブ */
@media (max-width: 600px) {
    .quiz64-tab {
        padding: 10px 8px;
        gap: 5px;
    }

    .quiz64-tab:first-child {
        border-radius: 10px 0 0 0;
    }

    .quiz64-tab:last-child {
        border-radius: 0 10px 0 0;
    }

    .quiz64-tab-icon {
        font-size: 14px;
    }

    .quiz64-tab-text {
        font-size: 11px;
    }

    .quiz64-tab-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    .quiz64-tabs-wrapper {
        margin: 10px;
    }
}
