* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    min-height: 100vh;
    padding: 2rem;
    color: #2c3e50;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 2rem;
}

/* 画面切り替えロジック */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
}

/* 言語選択 */
.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector .globe-icon {
    font-size: 1.5rem;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.language-selector select {
    padding: 0.6rem 1rem;
    border: 2px solid #FF8C42;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.language-selector select:hover {
    background-color: #fff5f0;
    border-color: #FF8C42;
    box-shadow: 0 6px 16px rgba(255, 140, 66, 0.3);
}

/* プログレスバー */
.progress-container {
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    background: white;
    padding: 1rem 0;
    z-index: 10;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* カテゴリーヘッダー */
.category-header {
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1.5rem 0;
}

/* 質問 */
.question {
    background: #f8f9fa;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    border-left: 4px solid #FF8C42;
    transition: all 0.3s;
}

.question:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 横並び選択肢 - 大きめの丸ボタン（修正） */
.choices-horizontal {
    display: flex;
    justify-content: space-between;  /* 両端揃えで均等配置 */
    flex-wrap: nowrap;  /* 折り返し禁止（1列に固定） */
    gap: 0.5rem;  /* PC版: 適度な間隔 */
    margin-top: 1.5rem;
    padding: 0 0.5rem;  /* 左右の余白 */
}

.choice-item {
    flex: 0 0 auto;  /* 修正: flex: 1 → flex: 0 0 auto（固定幅） */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.choice-item input[type="radio"] {
    display: none;
}

.choice-item label {
    width: 70px;  /* PC版: 80px → 70px（6つ表示対応）*/
    height: 70px;  /* PC版: 80px → 70px（6つ表示対応）*/
    border-radius: 50%;
    border: 3px solid #e0e0e0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 2rem;  /* PC版: 2.5rem → 2rem（6つ表示対応）*/
}

.choice-item label:hover {
    border-color: #FF8C42;
    background: #fff5f0;
    transform: scale(1.1);
}

.choice-item input[type="radio"]:checked + label {
    border-color: #FF8C42;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dd 100%);
    box-shadow: 0 4px 16px rgba(255, 140, 66, 0.4);
    transform: scale(1.15);
}

/* Q2の絵文字特別スタイル（⭕◯×❌） */
.choice-item label.emoji-circle-special,
.choice-item label.emoji-cross-special {
    font-size: 2rem;  /* PC版: 2.2rem → 2rem（6つ表示対応） */
    color: #e74c3c;  /* 赤色統一 */
}

.choice-label-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;  /* 強制的に1行表示 */
}

/* 自由記述 */
.free-text {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
    margin-top: 1rem;
}

.free-text:focus {
    outline: none;
    border-color: #FF8C42;
}

/* ボタン */
.btn {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B35 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 140, 66, 0.4);
}

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

#submitButton {
    margin-top: 2rem;
}

/* フォーム */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group select:focus {
    outline: none;
    border-color: #FF8C42;
}

/* プライバシー通知 */
.privacy-notice {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    white-space: pre-line;  /* \nを改行として認識 */
    line-height: 1.6;  /* 行間を広げて読みやすく */
}

/* 完了画面 */
.completion-message {
    text-align: center;
    padding: 2rem;
}

.completion-message h2 {
    color: #4caf50;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.completion-time {
    text-align: center;
    color: #7f8c8d;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        border-radius: 12px;
        padding: 1rem;
    }

    .question {
        padding: 1.5rem;
    }

    .choices-horizontal {
        gap: 0.25rem;  /* スマホ: 最小限の間隔 */
        padding: 0;  /* 余白なし */
        justify-content: space-between;  /* 両端揃え */
        margin-bottom: 1rem;  /* 下の余白 */
        flex-wrap: nowrap;  /* 1列表示に戻す */
    }

    .choice-item {
        flex: 0 1 auto;  /* 自動縮小 */
        min-width: 0;  /* 縮小許可 */
    }

    .choice-item label {
        width: 44px;  /* スマホ: 小さく（6個1列対応） */
        height: 44px;
        font-size: 1.2rem;  /* スマホ: 小さく */
        border-width: 2px;  /* ボーダーを細く */
    }

    /* スマホでもQ2の絵文字は統一サイズ */
    .choice-item label.emoji-circle-special,
    .choice-item label.emoji-cross-special {
        font-size: 1.4rem;  /* スマホ: 1列表示対応 */
    }

    .choice-label-text {
        font-size: 0.52rem;  /* スマホ: ミャンマー語可読性確保 */
        max-width: 58px;  /* スマホ: ミャンマー語の幅を確保 */
        line-height: 1.15;  /* 行間を少し広げる */
        margin-top: 0.35rem;  /* 上の余白 */
        word-break: keep-all;  /* 自然な折り返し */
        overflow-wrap: break-word;  /* 単語途中でも折り返す */
        white-space: normal;  /* 折り返し許可 */
    }

    /* ミャンマー語のみ2列表示 + バランス調整 */
    body[data-lang="my"] .choices-horizontal {
        flex-wrap: wrap;  /* 2列表示許可 */
        justify-content: center;  /* 中央揃え */
        gap: 0.8rem 0.6rem;  /* 縦横のギャップ */
        padding: 0.5rem;  /* 余白 */
    }

    body[data-lang="my"] .choice-item {
        flex: 0 0 calc(33.333% - 0.4rem);  /* 3列配置（バランス重視） */
        max-width: 90px;  /* 最大幅 */
    }

    body[data-lang="my"] .choice-item label {
        width: 55px;  /* ボタンサイズ拡大 */
        height: 55px;
        font-size: 1.5rem;  /* 絵文字サイズ */
    }

    body[data-lang="my"] .choice-label-text {
        font-size: 0.55rem;  /* 読みやすいサイズ */
        max-width: 85px;  /* 幅を広げる */
        line-height: 1.2;  /* 行間 */
        margin-top: 0.4rem;  /* 上余白 */
    }
}
