/* ===========================
   リセット & ベーススタイル
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --text-dark: #1F2937;
    --text-gray: #6B7280;
    --text-light: #9CA3AF;
    --bg-light: #F9FAFB;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   スクリーン管理
   =========================== */
.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

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

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================
   スタート画面
   =========================== */
.hero-section {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.6s ease-out;
}

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

.icon-badge {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.icon-badge i {
    font-size: 2.5rem;
    color: var(--bg-white);
}

.icon-badge.success {
    background: linear-gradient(135deg, var(--secondary-color), #34D399);
}

.main-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.feature-box {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-item i {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.feature-item span {
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ===========================
   ボタン
   =========================== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--bg-white);
    font-size: 1.125rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    padding: 0.875rem 2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.privacy-note {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===========================
   進捗バー
   =========================== */
.progress-container {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-gray);
    font-weight: 500;
}

/* ===========================
   質問コンテンツ
   =========================== */
.question-content {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    animation: fadeInScale 0.4s ease-out;
}

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

.question-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-card {
    background: var(--bg-light);
    border: 3px solid transparent;
    border-radius: 16px;
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.option-card:hover {
    border-color: var(--primary-light);
    background: var(--bg-white);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.option-card.selected {
    border-color: var(--primary-color);
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.option-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-icon i {
    font-size: 1.5rem;
    color: var(--bg-white);
}

.option-text {
    flex: 1;
}

.option-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.option-description {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ===========================
   ナビゲーション
   =========================== */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

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

.result-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.result-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ===========================
   プランカード
   =========================== */
.plan-card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInScale 0.5s ease-out;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.plan-card.recommended::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #34D399);
    color: var(--bg-white);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.plan-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.plan-description {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 400;
}

.plan-features {
    list-style: none;
    margin-bottom: 2rem;
}

.plan-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-features i {
    color: var(--secondary-color);
    font-size: 1.125rem;
}

.plan-cta {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--bg-white);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plan-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* ===========================
   その他のプラン
   =========================== */
.other-plans-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bg-white);
    text-align: center;
    margin-bottom: 2rem;
}

.plans-grid {
    display: grid;
    gap: 1.5rem;
}

.plan-card.compact {
    padding: 1.75rem;
}

.plan-card.compact .plan-name {
    font-size: 1.5rem;
}

.plan-card.compact .plan-price {
    font-size: 2rem;
}

/* ===========================
   リトライセクション
   =========================== */
.retry-section {
    text-align: center;
}

/* ===========================
   レスポンシブデザイン
   =========================== */
@media (max-width: 768px) {
    .screen {
        padding: 1.5rem 1rem;
    }

    .hero-section {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .main-title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .feature-box {
        gap: 1.5rem;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 0.875rem 2rem;
    }

    .question-content {
        padding: 2rem 1.5rem;
    }

    .question-title {
        font-size: 1.5rem;
    }

    .option-card {
        padding: 1.25rem;
        flex-direction: row;
    }

    .option-icon {
        width: 45px;
        height: 45px;
    }

    .option-title {
        font-size: 1rem;
    }

    .option-description {
        font-size: 0.85rem;
    }

    .result-title {
        font-size: 1.75rem;
    }

    .result-subtitle {
        font-size: 1rem;
    }

    .plan-card {
        padding: 2rem 1.5rem;
    }

    .plan-name {
        font-size: 1.5rem;
    }

    .plan-description {
        font-size: 1rem;
    }

    .plan-price {
        font-size: 2rem;
    }

    .plan-features li {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.5rem;
    }

    .feature-box {
        flex-direction: column;
        gap: 1rem;
    }

    .icon-badge {
        width: 70px;
        height: 70px;
    }

    .icon-badge i {
        font-size: 2rem;
    }

    .option-card {
        flex-direction: column;
        text-align: center;
    }

    .option-text {
        width: 100%;
    }
}
