/* ========================================
   Variables & Reset
   ======================================== */
:root {
    --primary: #3B82F6;
    --accent: #0EA5E9;
    --secondary: #60A5FA;
    --bg: #F8FAFC;
    --text: #0F172A;
    --text-light: #64748B;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-light);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-description {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 32px;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
    min-height: 56px;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

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

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

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

/* ========================================
   Progress Bar
   ======================================== */
.progress-bar-container {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 16px 0;
    box-shadow: 0 2px 8px var(--shadow);
    z-index: 100;
    animation: slideDown 0.3s ease;
}

.progress-bar-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   Quiz Section
   ======================================== */
.quiz {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 100px 0 100px;
    animation: fadeIn 0.5s ease;
}

.quiz-content {
    width: 100%;
    padding-bottom: 20px;
}

.question-category {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    color: var(--white);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.question-text {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.4;
}

.question-instruction {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 24px;
    padding: 8px 16px;
    background: rgba(14, 165, 233, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.option {
    background: var(--white);
    border: 3px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    min-height: 72px;
    display: flex;
    align-items: center;
}

.option:hover {
    border-color: var(--secondary);
    background: rgba(96, 165, 250, 0.05);
    transform: translateX(4px);
}

.option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    font-weight: 700;
    position: relative;
}

/* 複数選択の場合のチェックマーク */
.options[data-multiple-select="true"] .option.selected::before {
    content: "✓";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.options[data-multiple-select="true"] .option {
    padding-left: 56px;
}

/* 単一選択の場合のラジオボタン風 */
.options[data-multiple-select="false"] .option::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--white);
}

.options[data-multiple-select="false"] .option.selected::before {
    border-color: var(--primary);
    background: var(--primary);
    box-shadow: inset 0 0 0 4px var(--white);
}

.options[data-multiple-select="false"] .option {
    padding-left: 56px;
    position: relative;
}

.quiz-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 20px;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    z-index: 1000;
    max-width: 100%;
}

.quiz-navigation .btn-secondary {
    flex: 1;
    max-width: 200px;
}

/* ========================================
   Result Section
   ======================================== */
.result {
    padding: 40px 0 60px;
    animation: fadeIn 0.5s ease;
}

.result-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: 0 4px 24px var(--shadow);
}

.screenshot-notice {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse 2s ease-in-out infinite;
}

.screenshot-icon {
    font-size: 1.3rem;
}

.screenshot-notice p {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
}

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

.result-summary {
    text-align: center;
}

.result-completion {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 12px;
}

.result-title {
    font-size: clamp(1.6rem, 4vw, 2rem);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.result-catch {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 20px;
}

/* 概要エリア（強み・留意点） */
.result-overview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
    margin-top: 24px;
}

.overview-item {
    background: var(--bg);
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.overview-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.overview-content {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* 詳細エリア */
.result-details {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

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

.result-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.section-content {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.result-plan {
    background: var(--bg);
    border-radius: 12px;
    padding: 24px;
}

.plan-day {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 1rem;
}

.plan-day:last-child {
    margin-bottom: 0;
}

.plan-day-label {
    font-weight: 700;
    color: var(--primary);
    min-width: 60px;
}

.plan-day-content {
    color: var(--text);
    line-height: 1.6;
}



/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-section p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.footer-copyright p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .quiz-navigation {
        justify-content: space-between;
    }
    
    .quiz-navigation .btn-secondary {
        min-width: 150px;
    }
}

@media (min-width: 768px) {
    .result-overview {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .result-content {
        padding: 24px 16px;
    }
    
    .result-icon {
        font-size: 3.5rem;
    }
    
    .screenshot-notice {
        padding: 8px 16px;
        gap: 8px;
    }
    
    .screenshot-notice p {
        font-size: 0.85rem;
    }
    
    .option {
        padding: 16px 20px;
        font-size: 1rem;
        min-height: 64px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 14px 24px;
        font-size: 1rem;
        min-height: 52px;
        min-width: 160px;
    }
}

/* ========================================
   Print Styles (for Screenshot)
   ======================================== */
@media print {
    .progress-bar-container,
    .quiz-navigation,
    .footer {
        display: none !important;
    }
    
    .result {
        padding: 20px 0;
    }
    
    .result-content {
        box-shadow: none;
    }
}