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

body {
    font-family: 'Hiragino Kaku Gothic ProN', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

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

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

.header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.time-info {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.time-badge, .questions-badge {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* 画面切り替え */
.screen {
    display: none;
    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); }
}

/* 進捗バー */
.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.95);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 10%;
}

.progress-text {
    font-weight: 600;
    color: #666;
    min-width: 50px;
    text-align: right;
}

/* 質問エリア */
.question-container {
    background: rgba(255,255,255,0.95);
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    margin-bottom: 25px;
}

.question-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 15px;
}

.question-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* 選択肢 */
.answer-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-option {
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.answer-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #f0f0f0;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option.selected {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    border-color: #388E3C;
    transform: scale(1.02);
}

.answer-option.selected:hover {
    transform: scale(1.02);
}

/* スライダーは削除（3択のみ使用） */

/* ナビゲーション */
.navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.nav-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.nav-btn.primary {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
}

.nav-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.nav-btn.secondary {
    background: rgba(255,255,255,0.9);
    color: #2E7D32;
    border: 2px solid rgba(46, 125, 50, 0.3);
}

.nav-btn.secondary:hover:not(:disabled) {
    background: rgba(46, 125, 50, 0.1);
    border-color: #2E7D32;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 結果画面 */
.result-container {
    background: rgba(255,255,255,0.95);
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-align: center;
}

.result-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.result-pattern {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.pattern-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.pattern-level {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.pattern-description {
    font-size: 1rem;
    line-height: 1.5;
}

.result-content {
    text-align: left;
    margin-bottom: 30px;
}

.result-section {
    margin-bottom: 20px;
}

.result-section h4 {
    color: #2E7D32;
    margin-bottom: 10px;
    font-size: 1rem;
}

.result-section p, .result-section ul {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

.result-section ul {
    padding-left: 20px;
}

.result-section li {
    margin-bottom: 5px;
}

/* 次のステップ */
.next-steps {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.next-steps h3 {
    color: #2E7D32;
    margin-bottom: 15px;
}

.next-steps p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.cta-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cta-btn.primary {
    background: #06c755;
    color: white;
}

.cta-btn.primary:hover {
    background: #05b350;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.3);
}

.cta-btn.secondary {
    background: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    border: 2px solid rgba(46, 125, 50, 0.3);
}

.cta-btn.secondary:hover {
    background: rgba(46, 125, 50, 0.2);
    border-color: #2E7D32;
}

/* シェア機能 */
.share-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.share-section h4 {
    color: #2E7D32;
    margin-bottom: 15px;
    font-size: 1rem;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    font-weight: 600;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}



/* リトライボタン */
.retry-btn {
    padding: 10px 25px;
    background: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    border: 2px solid rgba(46, 125, 50, 0.3);
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(46, 125, 50, 0.2);
    border-color: #2E7D32;
}

/* スタート画面 */
.start-content {
    background: rgba(255,255,255,0.95);
    padding: 30px 25px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-align: center;
    margin-bottom: 25px;
}

.start-description h2 {
    color: #2E7D32;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.start-description p {
    color: #666;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    color: #333;
    font-size: 0.95rem;
}

.feature-icon {
    font-size: 1.2rem;
}

.start-btn {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

/* レスポンシブ */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .start-description h2 {
        font-size: 1.2rem;
    }
    
    .start-content {
        padding: 25px 20px;
    }
    
    .question-container {
        padding: 25px 20px;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .answer-option {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .start-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* 共有された結果用のスタイル */
.shared-notice {
    background: #e8f5e8;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
}

.shared-notice p {
    color: #2E7D32;
    margin-bottom: 15px;
    font-weight: 500;
}

.start-diagnosis-btn {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-diagnosis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}