/**
 * ============================================
 * 워크캠프 성향테스트 CSS
 * ============================================
 */

/* 테스트 페이지 공통 */
.test-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #FDFCF0 0%, #FFF8E1 100%);
    padding: 40px 20px 80px;
}

.test-container {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   인트로 페이지 스타일
   ============================================ */
.test-intro {
    text-align: center;
    padding: 60px 0;
}

.test-intro__icon {
    font-size: 72px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

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

.test-intro__title {
    font-size: 36px;
    font-weight: 800;
    color: #000080;
    margin-bottom: 16px;
    line-height: 1.3;
}

.test-intro__subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.test-intro__info {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
}

.test-intro__info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #666;
}

.test-intro__info-icon {
    width: 20px;
    height: 20px;
    color: #FF5722;
}

.test-intro__start-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 48px;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    background: #FF5722;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 87, 34, 0.3);
}

.test-intro__start-btn:hover {
    background: #E64A19;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 87, 34, 0.4);
}

.test-intro__start-btn svg {
    width: 20px;
    height: 20px;
}

.test-intro__participants {
    margin-top: 32px;
    font-size: 14px;
    color: #999;
}

.test-intro__participants strong {
    color: #FF5722;
    font-weight: 700;
}

/* ============================================
   질문 페이지 스타일
   ============================================ */
.test-question {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

/* 진행 표시 */
.test-progress {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.test-progress__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E0E0E0;
    transition: all 0.3s ease;
}

.test-progress__dot--active {
    background: #FF5722;
    transform: scale(1.2);
}

.test-progress__dot--done {
    background: #000080;
}

.test-progress__text {
    text-align: center;
    font-size: 14px;
    color: #999;
    margin-top: 8px;
}

/* 질문 텍스트 */
.test-question__text {
    font-size: 24px;
    font-weight: 700;
    color: #000080;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 40px;
}

/* 선택지 */
.test-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.test-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #FAFAFA;
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-option:hover {
    background: #FFF8E1;
    border-color: #FFE0B2;
}

.test-option--selected {
    background: #FFF3E0;
    border-color: #FF5722;
}

.test-option__icon {
    font-size: 28px;
    flex-shrink: 0;
}

.test-option__text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

.test-option--selected .test-option__text {
    color: #000080;
    font-weight: 600;
}

/* 네비게이션 */
.test-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #F0F0F0;
}

.test-nav__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-nav__btn--prev {
    background: transparent;
    color: #666;
}

.test-nav__btn--prev:hover {
    color: #333;
    background: #F5F5F5;
}

.test-nav__btn--prev:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.test-nav__btn--next {
    background: #FF5722;
    color: #FFFFFF;
    margin-left: auto;
}

.test-nav__btn--next:hover {
    background: #E64A19;
}

.test-nav__btn--next:disabled {
    background: #E0E0E0;
    cursor: not-allowed;
}

.test-nav__btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   결과 페이지 스타일
   ============================================ */
.test-result {
    text-align: center;
}

.test-result__header {
    margin-bottom: 32px;
}

.test-result__label {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

/* 아이콘 버전 (주석 처리됨 - JS에서 이미지 버전 사용) */
.test-result__icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

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

/* 이미지 버전 */
.test-result__image {
    width: 180px;
    height: 180px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    animation: bounceIn 0.8s ease-out;
}

.test-result__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.test-result__type {
    font-size: 36px;
    font-weight: 800;
    color: #000080;
    margin-bottom: 8px;
}

.test-result__type-en {
    font-size: 16px;
    color: #999;
    font-weight: 500;
}

.test-result__description {
    margin-top: 24px;
    padding: 24px;
    background: #F8F8F8;
    border-radius: 16px;
    font-size: 18px;
    color: #333;
    line-height: 1.8;
    font-style: italic;
}

/* 성향 분석 차트 */
.test-result__chart {
    margin: 40px 0;
    padding: 32px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.test-result__chart-title {
    font-size: 18px;
    font-weight: 700;
    color: #000080;
    margin-bottom: 24px;
    text-align: left;
}

.test-result__trait {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.test-result__trait:last-child {
    margin-bottom: 0;
}

.test-result__trait-name {
    width: 80px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.test-result__trait-bar {
    flex: 1;
    height: 12px;
    background: #F0F0F0;
    border-radius: 6px;
    overflow: hidden;
}

.test-result__trait-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5722, #FF9800);
    border-radius: 6px;
    transition: width 1s ease-out;
}

.test-result__trait-value {
    width: 50px;
    font-size: 14px;
    font-weight: 700;
    color: #FF5722;
    text-align: right;
}

/* 추천 프로그램 */
.test-result__programs {
    margin: 40px 0;
    text-align: left;
}

.test-result__programs-title {
    font-size: 20px;
    font-weight: 700;
    color: #000080;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-result__programs-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

.test-result__no-programs {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 14px;
}

.test-result__program-card {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
}

.test-result__program-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.test-result__program-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.test-result__program-country {
    font-size: 28px;
}

.test-result__program-match {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #E8F5E9;
    color: #2E7D32;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
}

.test-result__program-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.test-result__program-date {
    font-size: 14px;
    color: #666;
}

.test-result__program-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #FF5722;
    text-decoration: none;
}

.test-result__program-link:hover {
    text-decoration: underline;
}

/* 버튼 영역 */
.test-result__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
}

.test-result__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.test-result__btn--share {
    background: #000080;
    color: #FFFFFF;
}

.test-result__btn--share:hover {
    background: #000066;
}

.test-result__btn--retry {
    background: #F5F5F5;
    color: #666;
}

.test-result__btn--retry:hover {
    background: #E0E0E0;
    color: #333;
}

.test-result__btn svg {
    width: 20px;
    height: 20px;
}

/* 공유 토스트 */
.test-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #FFFFFF;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.test-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* ============================================
   공유 모달
   ============================================ */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.show {
    opacity: 1;
    visibility: visible;
}

.share-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.share-modal__content {
    position: relative;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 360px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.share-modal.show .share-modal__content {
    transform: translateY(0);
}

.share-modal__title {
    font-size: 20px;
    font-weight: 700;
    color: #000080;
    margin-bottom: 24px;
}

.share-modal__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-modal__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-modal__btn svg {
    width: 24px;
    height: 24px;
}

.share-modal__btn--kakao {
    background: #FEE500;
    color: #000000;
}

.share-modal__btn--kakao:hover {
    background: #E5CF00;
}

.share-modal__btn--insta {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: #FFFFFF;
}

.share-modal__btn--insta:hover {
    opacity: 0.9;
}

.share-modal__btn--copy {
    background: #F5F5F5;
    color: #333;
}

.share-modal__btn--copy:hover {
    background: #E0E0E0;
}

.share-modal__close {
    margin-top: 16px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
}

.share-modal__close:hover {
    color: #666;
}

/* ============================================
   로딩 스피너
   ============================================ */
.test-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.test-loading__spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #F0F0F0;
    border-top-color: #FF5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.test-loading__text {
    margin-top: 24px;
    font-size: 16px;
    color: #666;
}

/* ============================================
   반응형
   ============================================ */
@media (max-width: 768px) {
    .test-page {
        padding: 20px 16px 60px;
    }

    .test-intro__title {
        font-size: 28px;
    }

    .test-intro__subtitle {
        font-size: 16px;
    }

    .test-intro__info {
        flex-direction: column;
        gap: 12px;
    }

    .test-intro__start-btn {
        width: 100%;
        padding: 16px;
    }

    .test-question {
        padding: 24px;
        border-radius: 20px;
    }

    .test-question__text {
        font-size: 20px;
    }

    .test-option {
        padding: 16px;
    }

    .test-option__icon {
        font-size: 24px;
    }

    .test-option__text {
        font-size: 15px;
    }

    .test-result__type {
        font-size: 28px;
    }

    .test-result__description {
        font-size: 16px;
        padding: 20px;
    }

    .test-result__chart {
        padding: 24px;
    }

    .test-result__actions {
        flex-direction: column;
    }

    .test-result__btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .test-intro__icon {
        font-size: 56px;
    }

    .test-intro__title {
        font-size: 24px;
    }

    .test-progress__dot {
        width: 10px;
        height: 10px;
    }

    .test-question__text {
        font-size: 18px;
    }

    .test-result__icon {
        font-size: 64px;
    }

    .test-result__image {
        width: 140px;
        height: 140px;
        margin-bottom: 20px;
    }

    .test-result__trait-name {
        width: 60px;
        font-size: 12px;
    }
}

/* ============================================
   모달 모드 스타일
   ============================================ */
.personality-test-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.personality-test-modal.show {
    opacity: 1;
    visibility: visible;
}

.personality-test-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.personality-test-modal__container {
    position: relative;
    width: 95%;
    max-width: 560px;
    max-height: 90vh;
    background: linear-gradient(135deg, #FDFCF0 0%, #FFF8E1 100%);
    border-radius: 24px;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
}

.personality-test-modal.show .personality-test-modal__container {
    transform: translateY(0) scale(1);
}

.personality-test-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.personality-test-modal__close:hover {
    background: #FFFFFF;
    transform: rotate(90deg);
}

.personality-test-modal__close svg {
    width: 20px;
    height: 20px;
    color: #666;
}

.personality-test-modal__content {
    padding: 32px;
    max-height: 90vh;
    overflow-y: auto;
}

/* 모달 내부 스타일 조정 */
.personality-test-modal .test-question__text {
    font-size: 22px;
}

.personality-test-modal .test-result__icon {
    font-size: 64px;
}

.personality-test-modal .test-result__image {
    width: 140px;
    height: 140px;
    margin-bottom: 20px;
}

.personality-test-modal .test-result__type {
    font-size: 28px;
}

.personality-test-modal .test-result__description {
    font-size: 15px;
    padding: 16px;
}

.personality-test-modal .test-result__chart {
    margin: 24px 0;
    padding: 20px;
}

.personality-test-modal .test-result__programs {
    margin: 24px 0;
}

.personality-test-modal .test-result__program-card {
    padding: 16px;
}

.personality-test-modal .test-result__actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.personality-test-modal .test-result__btn {
    padding: 12px 20px;
    font-size: 14px;
}

.personality-test-modal .test-loading {
    min-height: 300px;
}

/* 캠프 찾기 버튼 */
.test-result__btn--camp {
    background: #FF5722;
    color: #FFFFFF;
}

.test-result__btn--camp:hover {
    background: #E64A19;
}

/* 모달 내 인트로 스타일 */
.personality-test-modal .test-intro--modal {
    padding: 40px 20px;
}

.personality-test-modal .test-intro__icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.personality-test-modal .test-intro__title {
    font-size: 28px;
    margin-bottom: 12px;
}

.personality-test-modal .test-intro__subtitle {
    font-size: 16px;
    margin-bottom: 32px;
}

.personality-test-modal .test-intro__info {
    margin-bottom: 32px;
}

.personality-test-modal .test-intro__start-btn {
    padding: 16px 40px;
    font-size: 16px;
}

/* 모달 반응형 */
@media (max-width: 768px) {
    .personality-test-modal__container {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }

    .personality-test-modal__content {
        padding: 24px;
        padding-top: 60px;
    }

    .personality-test-modal .test-result__actions {
        flex-direction: column;
    }

    .personality-test-modal .test-result__btn {
        width: 100%;
    }

    .personality-test-modal .test-intro--modal {
        padding: 20px 16px;
    }

    .personality-test-modal .test-intro__icon {
        font-size: 48px;
    }

    .personality-test-modal .test-intro__title {
        font-size: 24px;
    }

    .personality-test-modal .test-intro__info {
        flex-direction: column;
        gap: 12px;
    }

    .personality-test-modal .test-intro__start-btn {
        width: 100%;
    }
}
