/* リセットとベース設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* カラーテーマ */
    --color-nt: #10B981; /* 緑 - 脳・神経系 */
    --color-nf: #EF4444; /* 赤 - 心臓・血液系 */
    --color-sj: #3B82F6; /* 青 - 皮膚・免疫系 */
    --color-sp: #F59E0B; /* 黄 - 筋肉・感覚器 */
    
    /* 基本カラー */
    --color-primary: #6366F1;
    --color-secondary: #8B5CF6;
    --color-bg: #F9FAFB;
    --color-card: #FFFFFF;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-border: #E5E7EB;
    
    /* シャドウ */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* トランジション */
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #FEF3C7;
    min-height: 100vh;
    color: var(--color-text);
    line-height: 1.6;
}

/* コンテナ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* 画面切り替え */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* ========== 開始画面 ========== */
.header-section {
    text-align: center;
    margin-bottom: 3rem;
    background: #FFFFFF;
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 2px solid #FDE68A;
}

.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #F59E0B;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.sub-title {
    font-size: 1.8rem;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.description {
    font-size: 1.1rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* タイプカードグリッド */
.type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.type-card {
    background: #FFFFFF;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 2px solid;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 0;
}

.type-card:hover {
    transform: translateY(-4px);
    border-width: 3px;
}

.type-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.type-card:hover .type-icon {
    transform: scale(1.1);
}

.type-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.type-subtitle {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

.type-example {
    font-size: 0.75rem;
    color: var(--color-text-light);
    font-style: italic;
    line-height: 1.4;
}

/* 情報ボックス */
.info-box {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid #FDE68A;
}

.info-box h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.info-box ul {
    list-style: none;
    padding: 0;
}

.info-box li {
    padding: 0.5rem 0;
    font-size: 1.05rem;
    color: var(--color-text-light);
}

.info-box li strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* ========== ボタン ========== */
.primary-btn {
    background: #F59E0B;
    color: white;
    border: none;
    padding: 1.2rem 3.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
    width: fit-content;
    letter-spacing: 0.02em;
}

.primary-btn:hover {
    background: #D97706;
    transform: translateY(-2px);
}

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

.secondary-btn {
    background: white;
    color: var(--color-text);
    border: 2px solid #FDE68A;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 1rem auto;
}

.secondary-btn:hover {
    background: #FEF3C7;
    border-color: #F59E0B;
    border-width: 3px;
}

/* ========== 質問画面 ========== */
.progress-section {
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 3px solid #F59E0B;
}

.progress-info {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #F59E0B;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 16px;
    background: #FEF3C7;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #FDE68A;
}

.progress-fill {
    height: 100%;
    background: #F59E0B;
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

/* 質問カード */
.question-card {
    background: #FFFFFF;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    animation: slideIn 0.4s ease;
    border: 3px solid #F59E0B;
}

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

.question-text {
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #1F2937;
    line-height: 1.7;
    padding-bottom: 2rem;
    border-bottom: 2px solid #FDE68A;
}

/* 回答オプション */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.answer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.3rem 2rem;
    background: #FFFFFF;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
}

.answer-btn:hover {
    background: #FFFBEB;
    border-color: #F59E0B;
    border-width: 2px;
    transform: translateY(-2px);
}

.answer-btn:active {
    background: #FEF3C7;
    transform: scale(0.98);
}

.answer-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.answer-text {
    color: #1F2937;
    font-weight: 600;
}

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

.result-header h1 {
    font-size: 2.5rem;
    color: #F59E0B;
    font-weight: 800;
}

.result-content {
    background: #FFFFFF;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    animation: fadeIn 0.6s ease;
    border: 2px solid #FDE68A;
}

.result-type-header {
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-type {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.result-organ {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.result-tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    font-style: italic;
}

.result-category {
    text-align: center;
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

.result-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: 10px;
}

.result-section {
    margin-bottom: 2rem;
}

.result-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.6;
}

.result-list li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.result-list.traits li::before {
    color: var(--color-primary);
}

.result-list.strengths li::before {
    color: #10B981;
}

.result-list.weaknesses li::before {
    color: #EF4444;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* ========== レスポンシブデザイン ========== */
/* タブレット（768px〜1024px） */
@media (max-width: 1024px) and (min-width: 769px) {
    .type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* スマホ・小型タブレット（768px以下） */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .sub-title {
        font-size: 1.5rem;
    }
    
    .header-section {
        padding: 2rem 1rem;
    }
    
    .type-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .type-card {
        padding: 1.5rem;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
    
    .answer-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .answer-emoji {
        font-size: 1.2rem;
    }
    
    .result-content {
        padding: 2rem 1.5rem;
    }
    
    .result-type {
        font-size: 2rem;
    }
    
    .result-organ {
        font-size: 1.5rem;
    }
    
    .result-tagline {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
    }
    
    .sub-title {
        font-size: 1.3rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .primary-btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .question-card {
        padding: 2rem 1rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .answer-btn {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }
}

/* ========== ユーティリティ ========== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
