/* ========================================
   就労移行・適性診断 スタイル
   ======================================== */

/* リセット・基本設定 */
.esq-quiz-container {
    --esq-primary: #06C755;
    --esq-primary-dark: #05a648;
    --esq-secondary: #4A90A4;
    --esq-accent: #FF6B6B;
    --esq-text: #333333;
    --esq-text-light: #666666;
    --esq-bg: #F8FAFB;
    --esq-white: #FFFFFF;
    --esq-border: #E0E6ED;
    --esq-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --esq-radius: 16px;
    --esq-radius-sm: 12px;
    
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    max-width: 600px;
    margin: 30px auto;
    background: var(--esq-white);
    border-radius: var(--esq-radius);
    box-shadow: var(--esq-shadow);
    overflow: hidden;
}

.esq-quiz-container * {
    box-sizing: border-box;
}

/* 画面切り替え */
.esq-screen {
    display: none;
    padding: 40px 30px;
}

.esq-screen.active {
    display: block;
    animation: esqFadeIn 0.4s ease;
}

/* ローディング画面は flex で中央寄せするため別指定 */
.esq-loading-screen {
    display: none;
    min-height: 400px;
    align-items: center;
    justify-content: center;
}

.esq-loading-screen.active {
    display: flex;
}

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

/* ========================================
   スタート画面
   ======================================== */
.esq-start-content {
    text-align: center;
}

.esq-start-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: esqBounce 2s infinite;
}

@keyframes esqBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.esq-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--esq-text);
    margin: 0 0 15px;
    line-height: 1.4;
}

.esq-subtitle {
    font-size: 15px;
    color: var(--esq-text-light);
    margin: 0 0 30px;
    line-height: 1.6;
}

.esq-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.esq-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--esq-text-light);
    background: var(--esq-bg);
    padding: 8px 14px;
    border-radius: 20px;
}

.esq-feature-icon {
    font-size: 16px;
}

/* ========================================
   ボタン共通
   ======================================== */
.esq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--esq-radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.esq-btn-start {
    background: linear-gradient(135deg, var(--esq-secondary), #3d7a8c);
    color: var(--esq-white);
    width: 100%;
    max-width: 300px;
}

.esq-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 164, 0.4);
}

.esq-btn-arrow {
    transition: transform 0.3s ease;
}

.esq-btn-start:hover .esq-btn-arrow {
    transform: translateX(4px);
}

/* ========================================
   質問画面
   ======================================== */
.esq-question-screen {
    padding: 30px;
}

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

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

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

.esq-progress-text {
    text-align: right;
    font-size: 14px;
    color: var(--esq-text-light);
    font-weight: 500;
}

/* 質問 */
.esq-question-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--esq-text);
    margin: 0 0 25px;
    line-height: 1.5;
}

.esq-q-number {
    color: var(--esq-secondary);
    margin-right: 8px;
}

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

.esq-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: var(--esq-bg);
    border: 2px solid var(--esq-border);
    border-radius: var(--esq-radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    font-size: 15px;
    color: var(--esq-text);
}

.esq-option:hover {
    border-color: var(--esq-secondary);
    background: #f0f7f9;
}

.esq-option.selected {
    border-color: var(--esq-secondary);
    background: linear-gradient(135deg, #e8f4f7, #f0f9fb);
}

.esq-option-marker {
    width: 22px;
    height: 22px;
    border: 2px solid var(--esq-border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.25s ease;
}

.esq-option:hover .esq-option-marker {
    border-color: var(--esq-secondary);
}

.esq-option.selected .esq-option-marker {
    border-color: var(--esq-secondary);
    background: var(--esq-secondary);
}

.esq-option.selected .esq-option-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--esq-white);
    border-radius: 50%;
}

.esq-option-text {
    flex: 1;
    line-height: 1.4;
}

/* ナビゲーションボタン */
.esq-nav-buttons {
    margin-top: 25px;
    display: flex;
    justify-content: flex-start;
}

.esq-btn-back {
    background: transparent;
    color: var(--esq-text-light);
    padding: 12px 20px;
    font-size: 14px;
}

.esq-btn-back:hover {
    color: var(--esq-text);
    background: var(--esq-bg);
}

/* ========================================
   ローディング画面
   ======================================== */
.esq-loading-content {
    text-align: center;
}

.esq-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--esq-border);
    border-top-color: var(--esq-secondary);
    border-radius: 50%;
    animation: esqSpin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes esqSpin {
    to { transform: rotate(360deg); }
}

.esq-loading-text {
    font-size: 16px;
    color: var(--esq-text-light);
    animation: esqPulse 1.5s ease infinite;
}

.esq-loading-subtext {
    font-size: 13px;
    color: #999;
    margin-top: 10px;
}

@keyframes esqPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   結果画面
   ======================================== */
.esq-result-screen {
    padding: 40px 30px;
}

.esq-result-content {
    text-align: center;
}

.esq-result-header {
    margin-bottom: 30px;
}

.esq-result-label {
    font-size: 14px;
    color: var(--esq-text-light);
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.esq-result-icon {
    font-size: 72px;
    margin-bottom: 15px;
    animation: esqPopIn 0.5s ease;
}

@keyframes esqPopIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.esq-result-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--esq-text);
    margin: 0;
    line-height: 1.4;
}

.esq-result-body {
    margin-bottom: 30px;
}

.esq-result-description {
    font-size: 15px;
    color: var(--esq-text-light);
    line-height: 1.8;
    margin: 0 0 30px;
    padding: 0 10px;
}

/* CTA ボックス */
.esq-result-cta {
    margin: 30px 0;
}

.esq-cta-box {
    background: linear-gradient(135deg, #f0fff4, #e8f5e9);
    border: 2px solid #c8e6c9;
    border-radius: var(--esq-radius);
    padding: 30px 25px;
}

.esq-cta-text {
    font-size: 15px;
    color: var(--esq-text);
    line-height: 1.8;
    margin: 0 0 20px;
}

.esq-cta-text strong {
    color: var(--esq-primary-dark);
}

/* LINEボタン */
.esq-btn-line {
    background: var(--esq-primary);
    color: var(--esq-white);
    width: 100%;
    padding: 18px 24px;
    font-size: 17px;
    margin-bottom: 12px;
}

.esq-btn-line:hover {
    background: var(--esq-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 199, 85, 0.4);
    color: var(--esq-white);
}

.esq-line-icon {
    width: 24px;
    height: 24px;
}

.esq-cta-note {
    font-size: 13px;
    color: var(--esq-text-light);
    margin: 0;
}

/* リトライボタン */
.esq-btn-retry {
    background: transparent;
    color: var(--esq-text-light);
    border: 1px solid var(--esq-border);
    padding: 12px 24px;
    font-size: 14px;
}

.esq-btn-retry:hover {
    background: var(--esq-bg);
    color: var(--esq-text);
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 640px) {
    .esq-quiz-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .esq-screen {
        padding: 30px 20px;
    }
    
    .esq-title {
        font-size: 20px;
    }
    
    .esq-start-icon {
        font-size: 52px;
    }
    
    .esq-features {
        gap: 10px;
    }
    
    .esq-feature {
        font-size: 13px;
        padding: 6px 12px;
    }
    
    .esq-question-screen {
        padding: 25px 20px;
    }
    
    .esq-question-text {
        font-size: 16px;
    }
    
    .esq-option {
        padding: 15px 16px;
        font-size: 14px;
    }
    
    .esq-result-screen {
        padding: 30px 20px;
    }
    
    .esq-result-icon {
        font-size: 56px;
    }
    
    .esq-result-title {
        font-size: 19px;
    }
    
    .esq-cta-box {
        padding: 25px 20px;
    }
    
    .esq-btn-line {
        font-size: 15px;
        padding: 16px 20px;
    }
}