
/* 전체 폰트 및 기본 설정 */
* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

html, body {
   height: 100%;
   font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
   background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
   color: #2c3e50;
   line-height: 1.6;
   padding-top: 40px; /* 고정 배너를 위한 상단 패딩 추가 */
}

.fw-600 { font-weight: 600; }

/* 헤더 스타일 */
.banner {
   background: rgba(255, 255, 255, 0.95);
   backdrop-filter: blur(10px);
   border-bottom: 1px solid rgba(255, 255, 255, 0.2);
   padding: 0.5rem 0;
   position: fixed;
   top: 0;
   left: 0;  /* 추가 */
   right: 0; /* 추가 */
   width: 100%; /* 추가 */
   z-index: 1000;
   box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.banner-content {
   display: flex;
   /*justify-content: space-between;*/
   align-items: center;
   width: 100%;
   margin: 0 auto;
   padding: 0 2rem;
}

.banner-title {
   flex: 1; /* 왼쪽 제목이 남은 공간을 차지 */
   display: flex;
   align-items: center;
   font-size: 1.6rem;
   font-weight: 700;
   background: linear-gradient(135deg, #667eea, #764ba2);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}


/* 네비게이션 메뉴 스타일 */
.nav-menu {
    flex: 2;
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center; /* 이 줄 추가 */
    /*margin-left: -30rem;  값을 조정해서 원하는 위치로 */
    font-size: 1.2rem;
}

.nav-item {
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    cursor: pointer;
}

.nav-item.active {
    color: var(--primary-blue);
    font-weight: 600;
}

.banner-btn {
   background: rgba(102, 126, 234, 0.1);
   border: 2px solid #667eea;
   color: #667eea;
   padding: 0.6rem 1.2rem;
   border-radius: 10px;
   font-weight: 500;
   transition: all 0.3s ease;
   backdrop-filter: blur(10px);
   display: flex;
   align-items: center;
}

.banner-btn:hover {
   background: #667eea;
   color: white;
   transform: translateY(-2px);
   box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.banner-buttons {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}



/* 메인 컨테이너 */
.main-container {
   max-width: 1400px;
   margin: 0 auto;
   padding: 2rem;
   min-height: calc(100vh - 200px);
}


/* 히어로 섹션0_환경설정 들어가는곳 */
.hero-section0 {
   display: flex;
   gap: 1.5rem; /* <- 여기에 추가 */ 
   justify-content: flex-end;
   max-width: 1400px;  
   padding: 1rem 0;
   margin-top: -1rem;
}

.setting-buttons {
    display: flex;
    gap: 1.5rem; /* <- 여기에 추가 */
    align-items: center;
}


/* 옵션버튼 스타일 */
.opt-btn {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid white;
    color: white;
    padding: 0.6rem 1.1rem;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px); 
    cursor: pointer;
}


/* 히어로 섹션 */
.hero-section {
   text-align: center;
   max-width: 1400px;  
   padding: 1rem 0;
   margin-bottom: 2rem;
}

/*나의 미래를 설계하다*/
.hero-title { 
   font-size: 3rem;
   font-weight: 700;
   color: white;
   margin-bottom: 1rem;
   text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/*당신의 관심과 성향 및 장점 등을 바탕으로 맞춤형 진로를 추천해드립니다*/
.hero-subtitle { 
   font-size: 1.45rem;
   color: rgba(255, 255, 255, 0.9);
   max-width: 800px;
   margin: 0 auto;
   text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* 정보 섹션 */
.info-section {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
   margin-bottom: 3rem;
}

.info-card {
   background: rgba(255, 255, 255, 0.95);
   backdrop-filter: blur(10px);
   border-radius: 20px;
   padding: 2rem;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
   transition: all 0.3s ease;
   border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-card:hover {
   transform: translateY(-10px);
   box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.info-icon {
   width: 80px;
   height: 80px;
   margin: 0 auto 1.5rem;
   background: linear-gradient(135deg, #667eea, #764ba2);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 2rem;
   color: white;
}

.info-content p {
   color: #5a6c7d;
   line-height: 1.6;
}

/* 평가 컨테이너 */
.assessment-container {
   background: rgba(255, 255, 255, 0.95);
   backdrop-filter: blur(10px);
   border-radius: 20px;
   padding: 2rem;
   margin-bottom: 3rem;   
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
   border: 1px solid rgba(255, 255, 255, 0.2);
}

.assessment-header {
   /*text-align: center;*/
   margin-bottom: 3rem;
}


/* 질문 섹션 */
.question-section {
   margin-bottom: 2rem;
   padding-bottom: 0.5rem;
   border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.question-section:last-child {
   border-bottom: none;
   margin-bottom: 0;
}

.question-title {
   display: flex;
   align-items: center;
   font-size: 1.4rem;
   font-weight: 600;
   color: #2c3e50;
   margin-bottom: 1rem;
}

.question-number {
   background: linear-gradient(135deg, #667eea, #764ba2);
   color: white;
   width: 40px;
   height: 40px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-weight: 700;
   margin-right: 1rem;
   font-size: 1rem;
}

.sub-text {
   font-size: 1.1rem;
   color: #7f8c8d;
   font-weight: 400;
}

/* 버튼 스타일 */
.age-buttons,
.interest-buttons,
.personality-buttons, 
.strength-buttons,
.nature-buttons,
.judgement-buttons,
.stress-buttons,
.activity-buttons,
.energy-buttons {
   display: flex;
   flex-wrap: wrap;
   gap: 0.75rem;
   margin-bottom: 0.8rem;
}

.btn-check + label {
   background: rgba(255, 255, 255, 0.8);
   border: 2px solid #e9ecef;
   border-radius: 20px;
   padding: 0.8rem 1.5rem;
   transition: all 0.3s ease;
   cursor: pointer;
   backdrop-filter: blur(5px);
   font-size: 1.1rem !important; 
   font-weight: 500;
   text-align: left; /* ✅ 이 줄을 추가하여 텍스트를 왼쪽으로 정렬합니다. */
}

.btn-check:checked + label {
   background: linear-gradient(135deg, #667eea, #764ba2);
   color: white;
   border-color: transparent;
   transform: translateY(-2px);
   box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-check + label:hover {
   transform: translateY(-2px);
   box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 커스텀 입력 섹션 */
.custom-input-section {
   margin-top: 1rem;
}

.input-label {
   display: block;
   font-weight: 500;
   color: #2c3e50;
   margin-bottom: 0.5rem;
}

.custom-textarea {
   width: 100%;
   min-height: 100px;
   border: 2px solid #e9ecef;
   border-radius: 15px;
   padding: 1rem;
   font-size: 1.1rem;
   resize: vertical;
   transition: all 0.3s ease;
   background: rgba(255, 255, 255, 0.8);
   backdrop-filter: blur(5px);
}

.custom-textarea:focus {
   outline: none;
   border-color: #667eea;
   box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 선택값 리셋 섹션 */
.reset-button-container {
    text-align: right;
    margin: 1rem 0;
    
}

.reset-btn {
    background: white;
    border: 2px solid black;
    color: #6c757d;
    padding: 0.7rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: right;
    gap: 0.5rem;
}

.reset-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.3);
}

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


/* 결과 섹션 */
.result-section {
   background: rgba(255, 255, 255, 0.95);
   backdrop-filter: blur(10px);
   border-radius: 20px;
   margin-bottom: 7rem;
   padding: 3rem;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
   border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 480px) {
    .result-section {
        padding: 1rem; /* 더 작은 패딩으로 최대한 넓게 */
    }
}

.preview-container {
   display: none;
   margin-bottom: 2rem;
}

/* 로그인 시 표시 */
.preview-container.show {
    display: block;
}

.preview-container h3 {
   font-size: 1.4rem;
   font-weight: 600;
   color: #2c3e50;
   margin-bottom: 1rem;
}

.preview-textarea {
   background: rgba(248, 249, 250, 0.8);
   border: 2px solid #e9ecef;
   border-radius: 15px;
   padding: 1rem;
   font-size: 0.95rem;
   resize: none;
   backdrop-filter: blur(5px);
}

.preview-textarea:focus {
   outline: none;
   border-color: #667eea;
   box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 액션 버튼 */
.action-buttons {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
   gap: 1rem;
   margin-bottom: 2rem;
}

.action-btn {
   padding: 1.2rem 2rem;
   border-radius: 15px;
   font-weight: 600;
   font-size: 1.1rem;
   border: none;
   transition: all 0.3s ease;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
}

/* 새로운 버튼 색상들 */
.tradition-btn {
   background: linear-gradient(135deg, #28a745, #20c997);
   font-size: 1.3rem;
   color: white;
}

.tradition-btn:hover {
   transform: translateY(-3px);
   box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

.unusual-btn {
   background: linear-gradient(135deg, #ffc107, #fd7e14);
   font-size: 1.3rem;
   color: white;
}

.unusual-btn:hover {
   transform: translateY(-3px);
   box-shadow: 0 10px 25px rgba(255, 193, 7, 0.3);
}

.future-btn {
   background: linear-gradient(135deg, #6f42c1, #e83e8c);
   font-size: 1.3rem;
   color: white;
}

.future-btn:hover {
   transform: translateY(-3px);
   box-shadow: 0 10px 25px rgba(111, 66, 193, 0.3);
}

@media (max-width: 768px) {
    .tradition-btn {
        font-size: 1.2rem;
    }

    .unusual-btn {
        font-size: 1.2rem;
    }

    .future-btn {
        font-size: 1.2rem;
    }

}

@media (max-width: 480px) {
    .tradition-btn {
        font-size: 1.1rem;
    }

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

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

}


/* 채팅 기능 CSS */

.chat-section {
    scroll-margin-top: 80px; /* 원하는 만큼 여백 */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin-bottom: 7rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


.chat-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
}

.chat-toggle-btn,
.chat-clear-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.3rem;
}

.chat-toggle-btn:hover,
.chat-clear-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.chat-content {
    height: clamp(400px, 60vh, 800px); /* 최소 높이를 500px에서 400px로 변경 */
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.chat-message {
    display: flex;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* 인디케이터는 바로 보이도록 덮어쓰기 */
.chat-message.typing-indicator {
    opacity: 1 !important;
    transform: none !important;
}

.chat-message.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #8b5a3c;
}

.message-content {
    max-width: 70%;
    background: white;
    border-radius: 18px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    font-size: 1.3rem;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-content p {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
}

/* 마크다운 스타일링 */
.message-content h1, .message-content h2, .message-content h3 {
    margin: 0.5rem 0;
    color: inherit;
}

.message-content ul, .message-content ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content code {
    background: rgba(0,0,0,0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.message-content pre {
    background: rgba(0,0,0,0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.25rem;
    display: block;
}

.error-message .message-content {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.chat-input-container {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 1.3rem;
    line-height: 1.5;
    padding: 0.5rem 0.75rem;
    max-height: 120px;
    min-height: 38px;
    font-family: inherit;
}

.chat-input::placeholder {
    color: #999;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chat-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chat-input-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #666;
}

.char-count {
    font-weight: 500;
}

.chat-tip {
    opacity: 0.8;
}

/* 타이핑 인디케이터 */
.typing-indicator .message-content {
    padding: 1rem;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;  /* 기존 #667eea에서 더 진한 색으로 변경 */
    animation: typing 1.4s infinite ease-in-out;
}

/* 또는 더 뚜렷한 색상들 */
.typing-dots span:nth-child(1) { background: #ff6b6b; }
.typing-dots span:nth-child(2) { background: #4ecdc4; }
.typing-dots span:nth-child(3) { background: #45b7d1; }

@keyframes typing {
    0%, 65%, 100% {
        transform: translateY(0);
        opacity: 0.2;
    }
    32% {
        transform: translateY(-14px);
        opacity: 1;
    }
}

.typing-indicator-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-text {
    font-size: 1.2rem;
    color: #666;
    opacity: 0.8;
}

.bot-message .typing-text {
    color: #888;
}


/* 모바일 반응형 부분 수정 */
@media (max-width: 768px) {
    .chat-container {
        margin-top: 1.5rem;
        border-radius: 12px;
    }
    
    .chat-content {
        height: clamp(540px, 68vh, 720px); /* 모바일에서 더 큰 최소 높이 설정 */
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input-container {
        padding: 1rem;
    }
    
    .chat-header {
        padding: 1rem;
    }
    
    .chat-header h4 {
        font-size: 1rem;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .chat-input-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .chat-section {
        padding: 1rem; /* 더 작은 패딩으로 최대한 넓게 */
        margin-bottom: 3rem;
    }
    
    .chat-content {
        height: clamp(600px, 65vh, 700px); /* 작은 모바일에서도 충분한 높이 확보  최소높이/선호높이/ 최대높이*/
    }
    
    .message-content {
        max-width: 90%;
        padding: 0.6rem 0.8rem;
    }
    
    .chat-input-wrapper {
        padding: 0.4rem;
    }
    
    .chat-send-btn {
        width: 35px;
        height: 35px;
    }
}


/* 모달 스타일 */
.modern-modal {
   border-radius: 20px;
   border: none;
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
   backdrop-filter: blur(10px);
}

.modern-modal .modal-header {
   background: linear-gradient(135deg, #667eea, #764ba2);
   color: white;
   border-radius: 20px 20px 0 0;
   padding: 1.5rem 2rem;
}

.modern-modal .modal-body {
   background: rgba(255, 255, 255, 0.95);
}

.modern-modal .modal-footer {
   background: rgba(248, 249, 250, 0.8);
   border-radius: 0 0 20px 20px;
   padding: 1.5rem 2rem;
}

/* 설정 섹션 */
.setting-section {
   margin-bottom: 2rem;
   padding-bottom: 1.5rem;
   border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.setting-section:last-child {
   border-bottom: none;
   margin-bottom: 0;
}

.setting-title {
   font-size: 1.2rem;
   font-weight: 600;
   color: #2c3e50;
   margin-bottom: 1rem;
}

.language-options {
   display: flex;
   gap: 2rem;
}

.form-check-label {
   font-weight: 500;
   margin-left: 0.5rem;
}

/* 슬라이더 스타일 */
.modern-slider {
   background: linear-gradient(to right, #667eea, #764ba2);
   height: 8px;
   border-radius: 10px;
   outline: none;
}

.slider-labels {
   display: flex;
   justify-content: space-between;
   margin-top: 0.5rem;
   font-size: 0.9rem;
   color: #6c757d;
   font-weight: 500;
}


/* 결과 텍스트에리어 */

/* 결과 텍스트에리어 */
.result-textarea {
   background: linear-gradient(145deg, #ffffff, #fcfcfc);  /* 더 흰색에 가까운 배경 */
   border: 1px solid rgba(0, 0, 0, 0.1);
   border-radius: 12px;
   padding: 1.5rem;
   font-size: 1.2rem;
   line-height: 1.3;
   font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
   color: #1e3a8a;  /* 신뢰감 있는 진한 파랑 */
   resize: vertical;
   white-space: pre-wrap;
   word-wrap: break-word;
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
   transition: all 0.3s ease;
   min-height: 200px;
}

.result-textarea h1 { font-size: 1.9em; }  /* 제목들도 비례해서 키움 */
.result-textarea h2 { font-size: 1.6em; }
.result-textarea h3 { font-size: 1.4em; }

.result-textarea:focus {
   outline: none;
   border-color: #667eea;
   background: #ffffff;
   box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
   transform: translateY(-1px);
}

.result-textarea:hover {
   border-color: rgba(102, 126, 234, 0.3);
   box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* 숨겨진 텍스트 영역 */
.hidden-textarea {
    display: none;
    margin: 2rem auto;
    max-width: 800px;
    padding: 0 2rem;
}

.hidden-textarea.show {
    display: block;
}


/* 로딩 스피너 */
.loading-container {
   text-align: center;
   padding: 3rem;
}

.modern-spinner {
   display: flex;
   justify-content: center;
   gap: 0.5rem;
   margin-bottom: 1.5rem;
}

.spinner-circle {
   width: 12px;
   height: 12px;
   border-radius: 50%;
   background: linear-gradient(135deg, #667eea, #764ba2);
   animation: bounce 1.4s ease-in-out infinite both;
}

.spinner-circle:nth-child(1) { animation-delay: -0.32s; }
.spinner-circle:nth-child(2) { animation-delay: -0.16s; }
.spinner-circle:nth-child(3) { animation-delay: 0s; }


.text-content {
    min-height: 200px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    font-size: 20px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-y: auto;
}


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

.loading-text {
   font-size: 1.1rem;
   color: #5a6c7d;
   font-weight: 500;
}

/* 푸터 */
.modern-footer {
   background: rgba(44, 62, 80, 0.95);
   backdrop-filter: blur(10px);
   color: white;
   text-align: center;
   padding: 2rem 0;
   margin-top: 4rem;
}

.footer-content p {
   margin: 0;
   font-size: 1.4rem;
   opacity: 0.7;
}

/* 로그인 모달 스타일 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.login-modal {
    background: white;
    width: 420px;
    max-width: 90vw;
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 80px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.modal-close {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background: rgba(102, 126, 234, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.1);
}

.modal-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-logo h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-input {
    padding: 1.2rem 1rem;
    border: 2px solid #f0f2f5;
    border-radius: 16px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
    color: #8e9aaf;
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.forgot-password {
    text-align: center;
    margin: 1rem 0;
    font-size: 1.3rem;
}

.forgot-password a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.signup-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.signup-link:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: #999;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
    z-index: 1;
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.sns-login {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.sns-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    transition: transform 0.2s ease;
}

.sns-btn:hover {
    transform: scale(1.1);
}

.google-btn {
    background: #4285f4;
}

.kakao-btn {
    background: #fee500;
    color: #3c1e1e;
}

.naver-btn {
    background: #03c75a;
}



/* 전체 화면 반응형 디자인 */
@media (max-width: 768px) {

   html, body {
       padding-top: 70px; /* 모바일 헤더 높이를 고려하여 넉넉한 값으로 변경 */
   }
    
   .hero-section0 {
       justify-content: flex-end; /* 버튼들을 오른쪽 정렬에서 중앙 정렬로 변경 */
       margin-top: 0; /* 불필요한 음수 마진 제거 */
   }

   .hero-title {
       font-size: 2.2rem;
   }
   
   .hero-subtitle {
       font-size: 1rem;
   }
   
   .main-container {
       padding: 1rem;
   }
   
   .assessment-container {
       padding: 2rem 1.5rem;
   }
   
   .result-section {
       padding: 2rem 1.5rem;
   }
   
   .action-buttons {
       grid-template-columns: 1fr;
   }
   
   .language-options {
       flex-direction: column;
       gap: 1rem;
   }
   
   .banner-content {
      display: flex;
      flex-wrap: wrap;           /* flex-wrap 추가 */
      align-items: center;
      justify-content: space-between; /* 줄 너비 확보 */
      width: 100%;
      margin: 0 auto;
      padding: 0 1rem;           /* 여유 공간 축소 */
    }
   
   .banner-title {
       font-size: 1.4rem;
       flex: 1 0 auto; 
       margin-right: auto; /* 이 속성이 핵심입니다. 로그인 버튼을 오른쪽 끝으로 밀어냅니다. */
       flex-shrink: 0;     /* 로고가 좁아지지 않도록 방지 */
   }

   .banner-buttons {
      flex: 0 1 auto;             /* 축소 가능 설정 */
      display: flex;
      justify-content: flex-end;
      align-items: center;
      /*margin-top: 0.5rem;         /* 줄 바꿈 시 위 여백 확보 */
      margin-left: auto
    }

   .nav-menu {
       width: 100%; /* 주석 해제 - 다음 줄로 내리기 위해 필요 */
       order: 3; /* 주석 해제 - 시각적 순서 조정 */
       flex-direction: row;
       flex-wrap: nowrap;
       justify-content: center;
       gap: 1rem;
       margin-top: 1rem; /* 위 요소들과 간격 확보 */
   }

   .nav-item {
       white-space: nowrap;
       font-size: 0.9rem; /* 텍스트 크기 조정 */
   }

}

@media (max-width: 480px) {
   .hero-title {
       font-size: 1.8rem;
   }
   
   .question-title {
       font-size: 1.2rem;
       flex-direction: column;
       align-items: flex-start;
       gap: 0.5rem;
   }
   
   .question-number {
       width: 35px;
       height: 35px;
       font-size: 0.9rem;
   }

   /* 추가: 모바일 전용 스타일 */
   .banner-title {
       font-size: 1.2rem; /* 더 작은 화면에서 폰트 크기 축소 */
   }
   
   .banner-buttons {
       /*margin-top: 0.8rem; /* 더 큰 여백으로 구분 */
       margin-left: auto; /*(오른쪽 정렬 유지) */
       flex: 0 0 auto;
   }
   
   .nav-menu {
       /*gap: 0.5rem; /* 간격을 더 좁게 */
       margin-top: 1.2rem;
   }
   
   .nav-item {
       font-size: 0.8rem; /* 작은 화면에서 더 작은 폰트 */
       padding: 0.3rem 0.6rem; /* 터치 영역 확보하되 크기는 축소 */
   }
   
   .banner-content {
       padding: 0 0.5rem; /* 더 작은 패딩 */
   }
   
}

/* 다운로드 섹션 */
.download-btn {
   width: 100%;
   padding: 1.2rem 2rem;
   border-radius: 15px;
   font-weight: 600;
   font-size: 1.3rem;
   border: none;
   transition: all 0.3s ease;
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   background: linear-gradient(135deg, #4facfe, #00f2fe);
   color: white;
}
.download-btn:hover {
   transform: translateY(-3px);
   box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
   background: linear-gradient(135deg, #3b8bfe, #00d4fe);
}


/* 다운로드 및 이메일 섹션 */
.download-email-section {
    margin-bottom: 2rem;
}

.download-email-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}


/* 이메일 입력 필드 */
.email-input-group {
    margin-bottom: 1rem;
}

.email-btn {
    padding: 1.2rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.3rem;
    border: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}
.email-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

@media (max-width: 768px) {

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

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

}

@media (max-width: 480px) {
    
    .download-btn {
        font-size: 1rem;
    }

    .email-btn {
        font-size: 1rem;
    }
}


.admin-dashboard {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-dashboard.show {
    display: block;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.admin-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.refresh-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.feedback-list {
    max-height: 600px;
    overflow-y: auto;
}

.feedback-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feedback-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.feedback-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.feedback-email {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.feedback-timestamp {
    font-size: 0.9rem;
    color: #6c757d;
}

.feedback-id {
    font-size: 0.8rem;
    color: #adb5bd;
    font-family: monospace;
}

.feedback-content {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 1rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.delete-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.delete-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.empty-feedback {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.feedback-count {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 1rem;
}
