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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4A90E2 0%, #7ED321 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ヘッダー */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* メインコンテンツ */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    display: none;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* イントロ画面 */
.intro-content {
    text-align: center;
}

.intro-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #4a5568;
}

.intro-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
    line-height: 1.8;
}

/* プログレスバー */
.progress-container {
    margin-bottom: 30px;
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4A90E2, #7ED321);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    text-align: center;
    font-weight: bold;
    color: #4a5568;
    display: block;
}

/* 質問画面 */
.question-container {
    text-align: center;
}

#question-text {
    font-size: 1.4rem;
    margin-bottom: 30px;
    color: #2d3748;
    line-height: 1.6;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #4A90E2, #7ED321);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn-answer {
    background: linear-gradient(135deg, #4A90E2, #5BA0F2);
    color: white;
    font-size: 1.2rem;
    padding: 20px 40px;
}

.btn-answer:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(74, 144, 226, 0.3);
}

.btn-answer[data-answer="no"] {
    background: linear-gradient(135deg, #7ED321, #8EE32A);
}

.btn-answer[data-answer="no"]:hover {
    box-shadow: 0 15px 30px rgba(126, 211, 33, 0.3);
}

.btn-neutral {
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    font-size: 1.2rem;
    padding: 20px 40px;
}

.btn-neutral:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(108, 117, 125, 0.3);
    background: linear-gradient(135deg, #5a6268, #6c757d);
}

/* 結果画面 */
.result-content {
    text-align: center;
}

.result-content h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #4a5568;
}

.result-card {
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9ff 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid #E3F2FD;
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.1);
}

.character-image {
    margin-bottom: 20px;
}

.character-image img {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    object-fit: contain;
    border: 4px solid #E3F2FD;
    box-shadow: 0 12px 24px rgba(74, 144, 226, 0.15);
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9ff 100%);
}

.result-info h3 {
    font-size: 2rem;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: bold;
}

.result-info p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.6;
}

.ai-tips {
    background: linear-gradient(135deg, #E3F2FD 0%, #F3E5F5 100%);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #4A90E2;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.1);
}

.ai-tips h4 {
    color: #1565C0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ai-tips p {
    color: #424242;
    font-size: 1rem;
    line-height: 1.6;
}

.learning-tips {
    background: linear-gradient(135deg, #E8F5E8 0%, #F1F8E9 100%);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #7ED321;
    box-shadow: 0 4px 16px rgba(126, 211, 33, 0.1);
}

.learning-tips h4 {
    color: #2E7D32;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.learning-tips p {
    color: #424242;
    font-size: 1rem;
    line-height: 1.6;
}

.domain-info {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-radius: 15px;
    padding: 20px;
    border-left: 4px solid #FF9800;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.1);
}

.domain-info h4 {
    color: #E65100;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.domain-info h5 {
    color: #BF360C;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.domain-info p {
    color: #424242;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.role-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.role-link {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.role-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    background: linear-gradient(135deg, #F57C00, #FF9800);
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}


/* フッター */
.footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .screen {
        padding: 30px 20px;
    }
    
    .answer-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .btn-answer {
        width: 100%;
        max-width: 250px;
    }
    
    .result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    #question-text {
        font-size: 1.2rem;
    }
    
    .character-image img {
        width: 250px;
        height: 250px;
    }
    
    .result-info h3 {
        font-size: 1.6rem;
    }
    
    .role-links {
        gap: 8px;
    }
    
    .role-link {
        font-size: 0.8rem;
        padding: 10px 16px;
    }
}
