/* ==================== 
   基本設定（モバイルファースト）
   ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b9d;
    --secondary-color: #c44569;
    --bg-color: #fff5f8;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --text-white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'M PLUS Rounded 1c', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

.container {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

/* 画面表示制御 */
.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* ==================== 
   背景エフェクト 
   ==================== */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

@keyframes float-hearts {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ==================== 
   ボタン 
   ==================== */
.btn {
    display: block;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'M PLUS Rounded 1c', sans-serif;
    text-align: center;
    margin: 10px 0;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: var(--text-white);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

.btn-secondary:active {
    background: #f8f9fa;
}

.btn-large {
    padding: 18px;
    font-size: 18px;
}

.btn-icon {
    margin-right: 8px;
    font-size: 20px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ==================== 
   タイトル画面 
   ==================== */
#titleScreen {
    padding: 20px 0;
}

.title-content {
    text-align: center;
    background: var(--text-white);
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.game-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
}

.title-main {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    display: block;
}

.title-sub {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    display: block;
    text-align: center;
}

.title-description {
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.section-title-inline {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
    color: var(--text-dark);
}

.character-grid-compact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.character-card-compact {
    background: var(--text-white);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: var(--shadow);
}

.character-image-compact {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
}

.character-image-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-name-compact {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.character-role-compact {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
}

/* ==================== 
   質問画面 
   ==================== */
#questionScreen {
    padding: 20px 0;
}

.progress-info {
    margin-bottom: 20px;
}

.progress-bar {
    background: var(--text-white);
    border-radius: 20px;
    height: 8px;
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.progress-text {
    text-align: center;
    font-weight: 700;
    color: var(--text-dark);
    font-size: 14px;
}

.question-box {
    background: var(--text-white);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.question-number {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.4;
    color: var(--text-dark);
}

.question-form {
    margin-bottom: 10px;
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    margin: 0;
}

.radio-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    pointer-events: none;
}

.radio-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    border-color: var(--secondary-color);
}

.option-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.navigation-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.navigation-buttons .btn {
    margin: 0;
}
}

#prevBtn {
    flex: 0.8;
}

#nextBtn {
    flex: 1.2;
}

/* ==================== 
   結果画面 
   ==================== */
#resultScreen {
    padding: 20px 0;
}

.screen-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.result-main {
    background: var(--text-white);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    text-align: center;
}

.result-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.result-character-card {
    text-align: center;
}

.result-character-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 4px solid;
}

.result-character-image.chatgpt {
    border-color: #74b9ff;
}

.result-character-image.gemini {
    border-color: #a29bfe;
}

.result-character-image.claude {
    border-color: #fd79a8;
}

.result-character-image.grok {
    border-color: #6c5ce7;
}

.result-character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-character-name {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.result-character-role {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.result-message-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.result-message {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 500;
}

.result-strength {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-light);
    font-weight: 500;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.result-match-score {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 800;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

/* 各AIとの相性詳細 */
.compatibility-details-section {
    margin-bottom: 20px;
}

.ai-detail-card {
    background: var(--text-white);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

.ai-detail-card.best-match {
    border: 3px solid var(--primary-color);
}

.ai-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ai-detail-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--primary-color);
}

.ai-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ai-detail-title {
    flex: 1;
}

.ai-rank {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.ai-detail-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.ai-detail-role {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.ai-detail-percentage {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.ai-best-for {
    background: #fff5f8;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.6;
}

.ai-best-for strong {
    color: var(--primary-color);
}

.section-subtitle {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.ai-strengths-section,
.ai-weaknesses-section {
    margin-bottom: 15px;
}

.strength-item,
.weakness-item {
    display: grid;
    grid-template-columns: 80px 1fr 40px;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.strength-label,
.weakness-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dark);
}

.strength-bar-container,
.weakness-bar-container {
    background: #f0f0f0;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.strength-bar,
.weakness-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.strength-score,
.weakness-score {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    color: var(--text-dark);
}

/* 会話のヒント（常に表示） */
.prompt-tips-visible {
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff5f8, #ffffff);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.prompt-tips-visible .section-subtitle {
    margin-bottom: 10px;
}

.prompt-tips-visible .prompt-tip-box {
    margin-top: 0;
}

.prompt-tips-visible .prompt-technique {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.prompt-tips-visible .prompt-example {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.prompt-tips-visible .prompt-template {
    background: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-dark);
    border-left: 3px solid var(--primary-color);
    font-family: monospace;
}

/* より深く知るセクション */
.btn-detail-toggle {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    margin-top: 5px;
    transition: all 0.2s ease;
}

.btn-detail-toggle:active {
    background: var(--primary-color);
    color: white;
}

.deep-dive-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.deep-dive-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.deep-dive-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 6px;
    font-size: 13px;
}

.deep-dive-item p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

/* レーダーチャート（削除） */

/* おすすめ */
.recommendation-section {
    background: var(--text-white);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.recommendation-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    background: #fff5f8;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.recommendation-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.recommendation-text h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.recommendation-text p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-dark);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==================== 
   タブレット以上 
   ==================== */
@media (min-width: 768px) {
    .container {
        padding: 40px 20px;
    }
    
    .title-main {
        font-size: 32px;
    }
    
    .character-grid-compact {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }
    
    .question-box {
        padding: 40px 30px;
    }
    
    .question-text {
        font-size: 22px;
    }
    
    .result-character-image {
        width: 200px;
        height: 200px;
    }
    
    .chart-container {
        height: 400px;
    }
    
    .chart-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .result-actions {
        flex-direction: row;
    }
}
