/* 全体のスタイル */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #ff7043;
    --primary-light: #ffa270;
    --primary-dark: #c63f17;
    --secondary-color: #ffb74d;
    --text-color: #333;
    --background-color: #f9f9f9;
    --card-color: #fff;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --neutral-color: #78909c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - 80px);
}

header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeIn 0.8s ease;
}

header h1 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

header p {
    color: var(--neutral-color);
    font-size: 1.1rem;
}

/* カードスタイル */
.card {
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
    animation: slideUp 0.5s ease;
}

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

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* メニュー画面 */
.menu-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.menu-option {
    flex: 1;
    min-width: 280px;
    background: linear-gradient(to bottom right, #fff, #f5f5f5);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.menu-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-light);
}

.menu-option .icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.menu-option:hover .icon {
    transform: scale(1.2);
}

.menu-option h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
    font-size: 1.3rem;
}

.menu-option p {
    color: var(--neutral-color);
    font-size: 0.9rem;
}

/* 質問画面 */
.progress-container {
    margin-bottom: 2rem;
}

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

.progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.9rem;
    color: var(--neutral-color);
}

#answered-count {
    font-weight: bold;
    color: var(--primary-color);
}

.question-item {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.question-item.answered {
    background-color: #f0f7ff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.question-item h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.question-item h3 .question-number {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.9rem;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.option input[type="radio"] {
    display: none;
}

.option .radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.option input[type="radio"]:checked + .radio-custom {
    border-color: var(--primary-color);
}

.option input[type="radio"]:checked + .radio-custom:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 0.3s ease;
}

.option-text {
    user-select: none;
}

/* 確認画面 */
.answer-summary-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.answer-summary-item:last-child {
    border-bottom: none;
}

.answer-summary-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
}

.answer-summary-item .question-number {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 0.8rem;
}

.answer-summary-item p {
    padding-left: 34px;
    font-size: 0.95rem;
    color: var(--primary-dark);
}

/* 結果画面 */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: linear-gradient(to bottom right, #f5f5f5, #fff);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.score-display {
    text-align: center;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: rotateIn 1s ease, pulse 2s infinite;
}

.score-circle:before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    background-color: white;
    border-radius: 50%;
}

#final-score {
    position: relative;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-dark);
    z-index: 1;
}

.max-score {
    position: relative;
    font-size: 1.2rem;
    color: var(--neutral-color);
    z-index: 1;
}

.result-details {
    text-align: center;
    padding: 1rem;
    max-width: 600px;
}

.result-details h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-dark);
}

.result-details p {
    color: var(--text-color);
    line-height: 1.8;
}

/* 結果ランクの色分け */
.result-rank-high {
    background: linear-gradient(to bottom right, #c8e6c9, #dff0d8);
    border-left: 5px solid var(--success-color);
}

.result-rank-medium {
    background: linear-gradient(to bottom right, #ffecb3, #fff8e1);
    border-left: 5px solid var(--warning-color);
}

.result-rank-low {
    background: linear-gradient(to bottom right, #ffccbc, #ffebee);
    border-left: 5px solid var(--danger-color);
}

.result-rank-very-low {
    background: linear-gradient(to bottom right, #f5f5f5, #fafafa);
    border-left: 5px solid var(--neutral-color);
}

/* ボタン */
.buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn i {
    font-size: 1.1rem;
}

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

.btn.primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn.secondary {
    background-color: #f5f5f5;
    color: var(--text-color);
}

.btn.secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* フッター */
footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--neutral-color);
    font-size: 0.9rem;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-90deg) scale(0.3);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .menu-options {
        flex-direction: column;
    }
    
    .menu-option {
        margin-bottom: 1rem;
    }
    
    .buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-container {
        flex-direction: column;
    }
}

/* アニメーション遅延 */
.question-item:nth-child(1) { animation-delay: 0.1s; }
.question-item:nth-child(2) { animation-delay: 0.2s; }
.question-item:nth-child(3) { animation-delay: 0.3s; }
.question-item:nth-child(4) { animation-delay: 0.4s; }
.question-item:nth-child(5) { animation-delay: 0.5s; }
/* 残りも同様に設定 */
