/* ==========================================
   집중력 지수 테스트 페이지 스타일
   ========================================== */

/* 색상 테마 - index.html과 동일한 보라색 테마 적용 */
:root {
    --primary: #6B5EFF;
    --primary-dark: #5648CC;
    --primary-light: #8B7EFF;
    --primary-lighter: #A99EFF;
    --primary-pale: #E5E0FF;
}

/* 히어로 섹션 */
.concentration-hero {
    background: linear-gradient(135deg, #F8F9FA 0%, #E5F5FF 100%);
    padding: 140px 0 60px;
    text-align: center;
}

.concentration-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.concentration-badge {
    display: inline-block;
    background: linear-gradient(135deg, #A99EFF 0%, #8B7EFF 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

.concentration-hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, #A99EFF 0%, #8B7EFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.concentration-hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* 시작 화면 */
.concentration-start {
    padding: 60px 0;
    background: var(--bg-light);
}

.start-card {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.start-icon {
    margin-bottom: 32px;
}

.start-card h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.start-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.start-features {
    list-style: none;
    text-align: left;
    max-width: 450px;
    margin: 0 auto 40px;
    padding: 0;
}

.start-features li {
    font-size: 16px;
    color: var(--text-primary);
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.start-features li:last-child {
    border-bottom: none;
}

.start-features li strong {
    color: #8B7EFF;
}

.btn-start {
    background: linear-gradient(135deg, #A99EFF 0%, #8B7EFF 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(122, 184, 255, 0.3);
}

.btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(122, 184, 255, 0.4);
}

.start-note {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-tertiary);
}

/* 테스트 진행 섹션 */
.concentration-test {
    padding: 60px 0 80px;
    background: var(--bg-light);
    min-height: 600px;
}

.test-container {
    max-width: 800px;
    margin: 0 auto;
}

/* 진행률 */
.progress-wrapper {
    margin-bottom: 40px;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 12px;
    background: linear-gradient(90deg, #F3F4F6 0%, #E5E7EB 100%);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, #6B5EFF 0%, #8B7EFF 50%, #FF85D4 100%);
    border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    box-shadow: 0 2px 8px rgba(107, 94, 255, 0.3);
    overflow: hidden;
}

.progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* 카테고리 배지 */
.question-category {
    display: inline-block;
    background: linear-gradient(135deg, #E5F5FF 0%, #D0E8FF 100%);
    color: #8B7EFF;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
}

/* 질문 카드 */
.question-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease;
    text-align: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 40px 0;
    text-align: center;
    line-height: 1.4;
}

.question-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.option-btn {
    background: var(--bg-light);
    border: 3px solid transparent;
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    font-size: 16px;
}

.option-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 700;
    color: #8B7EFF;
    flex-shrink: 0;
}

.option-text {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.option-btn:hover {
    border-color: #A99EFF;
    background: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.option-btn.selected {
    border-color: #8B7EFF;
    background: linear-gradient(135deg, #F8F9FA 0%, #E5F5FF 100%);
}

.option-btn.selected .option-number {
    background: #8B7EFF;
    color: white;
}

/* 네비게이션 */
.test-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.btn-nav {
    flex: 1;
    padding: 16px 32px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-nav:hover:not(:disabled) {
    border-color: #8B7EFF;
    color: #8B7EFF;
    background: #E5F5FF;
}

.btn-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-next {
    border-color: #8B7EFF;
    background: #8B7EFF;
    color: white;
}

.btn-next:hover:not(:disabled) {
    background: #6B5EFF;
    border-color: #6B5EFF;
    color: white;
}

/* 로딩 화면 */
.concentration-loading {
    padding: 100px 0;
    background: var(--bg-light);
    min-height: 500px;
}

.loading-card {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.loading-spinner {
    margin-bottom: 32px;
}

.loading-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.loading-subtext {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.loading-progress {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #A99EFF 0%, #8B7EFF 100%);
    border-radius: 4px;
    width: 0%;
    animation: loadingAnimation 2s ease-in-out infinite;
}

@keyframes loadingAnimation {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* 결과 섹션 */
.concentration-result {
    padding: 60px 0 80px;
    background: var(--bg-light);
}

.result-header {
    text-align: center;
    margin-bottom: 40px;
}

.result-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-card {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-xl);
    padding: 60px 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease;
}

.result-score-section {
    text-align: center;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 40px;
}

.score-display {
    margin-bottom: 32px;
}

.score-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.score-circle svg {
    transform: rotate(-90deg);
}

.score-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    display: block;
    font-size: 48px;
    font-weight: 900;
    color: #8B7EFF;
    line-height: 1;
    margin-bottom: 4px;
}

.score-label {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 600;
}

.grade-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #E5F5FF 0%, #D0E8FF 100%);
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.grade-icon {
    font-size: 32px;
}

.grade-text {
    font-size: 24px;
    font-weight: 800;
    color: #8B7EFF;
}

.result-rank {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-summary {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

/* 영역별 점수 */
.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.score-item {
    width: 100%;
}

.score-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.score-item-icon {
    font-size: 24px;
}

.score-item-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.score-item-value {
    font-size: 24px;
    font-weight: 800;
    color: #8B7EFF;
}

.score-bar {
    width: 100%;
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #A99EFF 0%, #8B7EFF 100%);
    border-radius: 6px;
    transition: width 1s ease;
    width: 0%;
}

.score-item-comment {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.result-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .emoji {
    font-size: 28px;
}

.result-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    font-size: 16px;
    color: var(--text-primary);
    padding: 12px 0 12px 32px;
    position: relative;
    line-height: 1.6;
}

.result-list li::before {
    content: "•";
    position: absolute;
    left: 12px;
    color: #8B7EFF;
    font-size: 20px;
    font-weight: bold;
}

.highlight-section {
    background: linear-gradient(135deg, #F8F9FA 0%, #E5F5FF 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 2px solid #A99EFF;
}

/* 결과 액션 버튼 */
.result-actions {
    max-width: 800px;
    margin: 40px auto 0;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 프리미엄 CTA 섹션 */
.premium-cta-section {
    max-width: 800px;
    margin: 60px auto 0;
    padding: 0;
}

.premium-cta-card {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4D6 100%);
    border: 3px solid #FFD700;
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 8px 48px rgba(255, 215, 0, 0.5);
    }
}

.premium-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.4);
    position: relative;
    z-index: 1;
}

.premium-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.premium-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.premium-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.premium-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
}

.premium-features li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.premium-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.price-original {
    font-size: 20px;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.price-discount {
    font-size: 36px;
    font-weight: 900;
    color: #FF6B00;
}

.price-badge {
    background: #FF6B00;
    color: white;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
}

.btn-premium {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 6px 24px rgba(255, 165, 0, 0.4);
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}

.btn-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 32px rgba(255, 165, 0, 0.6);
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
}

.premium-note {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 1;
}

/* 관련 테스트 */
.related-tests {
    padding: 80px 0;
    background: white;
}

.section-header {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 48px;
}

.tests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.test-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.test-card:hover {
    border-color: #8B7EFF;
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.test-icon {
    margin-bottom: 20px;
}

.test-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.test-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .concentration-hero-title {
        font-size: 36px;
    }

    .concentration-hero-description {
        font-size: 16px;
    }

    .start-card {
        padding: 40px 24px;
    }

    .start-card h2 {
        font-size: 24px;
    }

    .question-card {
        padding: 40px 24px;
    }

    .question-title {
        font-size: 22px;
    }

    .option-btn {
        padding: 16px 20px;
        gap: 12px;
    }

    .option-number {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .option-text {
        font-size: 14px;
    }

    .result-card {
        padding: 40px 24px;
    }

    .score-circle {
        width: 160px;
        height: 160px;
    }

    .score-number {
        font-size: 36px;
    }

    .score-label {
        font-size: 16px;
    }

    .grade-text {
        font-size: 20px;
    }

    .result-summary {
        font-size: 18px;
    }

    .section-title {
        font-size: 20px;
    }

    .test-navigation {
        flex-direction: column;
    }

    .btn-nav {
        width: 100%;
    }

    .result-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .premium-cta-card {
        padding: 32px 24px;
    }

    .premium-title {
        font-size: 24px;
    }

    .premium-description {
        font-size: 16px;
    }

    .premium-features li {
        font-size: 14px;
    }

    .price-discount {
        font-size: 28px;
    }

    .btn-premium {
        width: 100%;
        justify-content: center;
        font-size: 16px;
        padding: 16px 32px;
    }
}

/* 추가 모바일 최적화 */
@media (max-width: 768px) {
    /* 터치 영역 최적화 */
    .option-btn {
        min-height: 56px;
        padding: 16px 20px;
        font-size: 15px;
    }

    /* 버튼 간격 */
    #prevBtn,
    #nextBtn {
        min-height: 48px;
        padding: 14px 24px;
        font-size: 15px;
    }

    /* 질문 카드 간격 */
    .question-card {
        padding: 24px 20px;
    }

    /* 프로그레스 바 터치 친화적 */
    .progress-container {
        padding: 8px 0;
    }

    /* 결과 카드 */
    .result-card {
        padding: 24px 20px;
    }

    /* 공유 버튼 */
    .share-buttons button {
        min-height: 48px;
        padding: 14px;
    }

    /* iOS zoom 방지 */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* 작은 모바일 */
@media (max-width: 375px) {
    .option-btn {
        font-size: 14px;
        padding: 14px 16px;
    }

    .question-title {
        font-size: 16px;
    }
}
