/**
 * 自転車診断・レコメンド アプリ専用スタイル
 */

.diagnose-container {
    padding: 1.5rem 1rem 3rem;
    max-width: 600px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 診断カード基本スタイル */
.diagnose-card {
    background: var(--surface-color);
    border: 1px solid var(--divider);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* アニメーション用クラス */
.fade-out-left {
    opacity: 0;
    transform: translateX(-30px);
}
.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}
.fade-in-active {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* イントロ画面 */
.intro-badge {
    display: inline-block;
    background: linear-gradient(90deg, #ff4081, #ff9100);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.intro-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.intro-features {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.8rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1;
}

.feature-item h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 共通ボタン */
.btn-primary {
    width: 100%;
    height: 54px;
    background: linear-gradient(90deg, var(--primary-color), #b2ff59);
    border: none;
    border-radius: 14px;
    color: #121212;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
    background: var(--btn-bg);
    border: 1px solid var(--divider);
    border-radius: 14px;
    color: var(--text-primary);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:active {
    background: var(--btn-active);
}

/* プログレスバー */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.progress-bar-wrapper {
    background: var(--divider);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #b2ff59);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
    font-weight: 600;
}

/* 質問エリア */
.question-badge {
    display: inline-block;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.question-title {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.question-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* 選択肢リスト */
.choices-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.choice-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--divider);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    text-align: left;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.choice-btn::after {
    content: "➔";
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

.choice-btn:hover, .choice-btn:focus {
    background: rgba(0, 229, 255, 0.05);
    border-color: var(--primary-color);
    outline: none;
}

.choice-btn:hover::after, .choice-btn:focus::after {
    opacity: 1;
    transform: translateX(0);
    color: var(--primary-color);
}

.choice-btn:active {
    transform: scale(0.99);
}

.question-footer {
    border-top: 1px solid var(--divider);
    padding-top: 1rem;
    display: flex;
    justify-content: flex-start;
}

/* 結果表示画面 */
.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-badge {
    display: inline-block;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.result-title {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-main-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.category-name {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary-color), #b2ff59);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.subcategory-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* 次点（第二候補）表示スタイル */
.result-secondary-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--divider);
    border-radius: 12px;
    padding: 0.5rem 1rem;
}

.secondary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.secondary-category-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* リスク警告カード */
.danger-card {
    background: rgba(255, 64, 129, 0.08);
    border: 1px solid #ff4081;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 2rem;
}

.danger-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.danger-card-header h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ff4081;
}

.danger-icon {
    font-size: 1.2rem;
}

#res-warning-text {
    font-size: 0.85rem;
    color: #ff80ab;
    line-height: 1.5;
}

/* 詳細セクション */
.result-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.detail-section h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    font-weight: 800;
    border-left: 3px solid var(--primary-color);
    padding-left: 0.5rem;
}

.detail-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-box {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--divider);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.4;
}

/* アフィリエイトセクション */
.affiliate-section {
    border-top: 1px solid var(--divider);
    padding-top: 2rem;
    margin-bottom: 2.5rem;
}

.affiliate-section h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.affiliate-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.affiliate-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* アフィリエイトアイテム */
.affiliate-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 1px solid var(--divider);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    transition: all 0.2s ease;
    text-decoration: none;
    gap: 1rem;
}

.affiliate-item:hover {
    border-color: #ff9900;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15);
    transform: translateY(-1px);
}

.affiliate-item-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.affiliate-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: uppercase;
}

/* バッジのカラー分け */
.affiliate-badge.badge-おすすめ {
    background: rgba(0, 229, 255, 0.15);
    color: var(--primary-color);
}
.affiliate-badge.badge-イチオシ {
    background: rgba(178, 255, 89, 0.15);
    color: #b2ff59;
}
.affiliate-badge.badge-第二候補 {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}
.affiliate-badge.badge-次点のおすすめ {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
}
.affiliate-badge.badge-必須防犯アイテム {
    background: rgba(255, 64, 129, 0.15);
    color: #ff4081;
}
.affiliate-badge.badge-おすすめ周辺機器 {
    background: rgba(255, 145, 0, 0.15);
    color: #ff9100;
}
.affiliate-badge.badge-着用努力義務化, .affiliate-badge.badge-安全装備 {
    background: rgba(0, 229, 255, 0.1);
    color: #00e5ff;
}

.affiliate-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
}

.affiliate-action {
    background: #ff9900;
    color: #121212;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    transition: background 0.2s;
}

.affiliate-item:hover .affiliate-action {
    background: #ffb84d;
}

/* アクションエリア */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

header a.header-logo-link {
    text-decoration: none;
    display: inline-block;
}

/* レスポンシブ調整 */
@media (max-width: 480px) {
    .diagnose-card {
        padding: 1.5rem 1.2rem;
    }
    .question-title {
        font-size: 1.2rem;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .affiliate-item {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .affiliate-action {
        text-align: center;
    }
}

/* 選択肢テキストラッパー（フレックス対応） */
.choice-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
    padding-right: 0.8rem;
}

/* 選択肢内の主要キーワード強調表示 */
.choice-keyword {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: 0.5px;
}

/* キーワードごとのカラー定義（ダークテーマに調和する鮮やかで読みやすいネオンカラー） */
.keyword-cyan { color: #00e5ff; }    /* サイクリング */
.keyword-green { color: #00ff88; }   /* 普段使い */
.keyword-orange { color: #ff9100; }  /* 通勤通学・輪行 */
.keyword-pink { color: #ff4081; }    /* レース・自走 */
.keyword-lime { color: #a6ff00; }    /* フィットネス・ダイエット */
.keyword-yellow { color: #ffd32a; }  /* キャンプ */

