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

body {
    font-family: 'Noto Sans KR', '맑은 고딕', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f3ef;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 네비게이션 스타일 */
.test-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 5px;
    border: 2px solid #e9ecef;
}

.nav-item {
    padding: 12px 24px;
    text-decoration: none;
    color: #364259;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.nav-item:hover {
    background: #e9ecef;
    color: #7f122b;
}

.nav-item.active {
    background: #7f122b;
    color: white;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #7f122b;
}

h1 {
    font-size: 2.5rem;
    color: #7f122b;
    margin-bottom: 10px;
    font-weight: bold;
}

.subtitle {
    font-size: 1.2rem;
    color: #364259;
    font-weight: 300;
}

.score-guide {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.score-guide h3 {
    color: #7f122b;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.score-description {
    color: #364259;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    margin: 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #7f122b;
}

@media (max-width: 768px) {
    .score-description {
        font-size: 1rem;
        padding: 12px;
    }
}

.name-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.name-section label {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #364259;
}

.name-section input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.name-section input:focus {
    outline: none;
    border-color: #7f122b;
    box-shadow: 0 0 0 3px rgba(127, 18, 43, 0.1);
}

.phone-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.phone-section label {
    display: block;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #364259;
}

.phone-section input {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.phone-section input:focus {
    outline: none;
    border-color: #7f122b;
    box-shadow: 0 0 0 3px rgba(127, 18, 43, 0.1);
}

.optional {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 400;
}

.progress-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.progress-text {
    text-align: center;
    font-size: 1.2rem;
    color: #364259;
    margin-bottom: 15px;
    font-weight: bold;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #7f122b 0%, #a02d4a 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.questions-container {
    margin-bottom: 30px;
}

.question {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.question:hover {
    border-color: #7f122b;
    box-shadow: 0 5px 15px rgba(127, 18, 43, 0.1);
}

.question-number {
    font-weight: bold;
    color: #7f122b;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.1rem;
    color: #364259;
    margin-bottom: 15px;
    line-height: 1.5;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.option:hover {
    border-color: #7f122b;
    background: #f8f9fa;
}

.option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.option label {
    cursor: pointer;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #364259;
    transition: all 0.3s ease;
}

.option input[type="radio"]:checked + label {
    color: #7f122b;
    font-weight: bold;
}

.option.selected {
    border-color: #7f122b;
    background: #f8f9fa;
}

/* 선택된 옵션 스타일 */
.option.selected {
    border-color: #7f122b;
    background: linear-gradient(135deg, #7f122b 0%, #a02d4a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(127, 18, 43, 0.3);
    transform: translateY(-1px);
}

.option.selected label {
    color: white !important;
    font-weight: bold;
}

/* 선택된 옵션에 체크 표시 추가 */
.option.selected::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 12px;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.submit-section {
    text-align: center;
    margin-bottom: 30px;
}

#submitBtn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #7f122b 0%, #a02d4a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(127, 18, 43, 0.3);
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 18, 43, 0.4);
}

#submitBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.results {
    background: white;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #7f122b;
    margin-top: 30px;
}

.results h2 {
    color: #7f122b;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2rem;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #7f122b;
}

.result-rank {
    font-weight: bold;
    color: #7f122b;
    margin-right: 15px;
    font-size: 1.2rem;
}

.result-gift {
    flex: 1;
    font-weight: bold;
    color: #364259;
}

.result-score {
    color: #666;
    font-weight: bold;
}

.restart-btn {
    display: block;
    margin: 20px auto 0;
    padding: 12px 25px;
    background: #364259;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: #4a5a6b;
    transform: translateY(-1px);
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .question-text {
        font-size: 1rem;
    }
    
    .options {
        gap: 8px;
    }
    
    .option {
        padding: 10px 12px;
    }
    
    .test-nav {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav-item {
        margin: 0;
        text-align: center;
    }
}

/* 관찰 진단서 전용 스타일 */
.intro-section {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.intro-text {
    color: #364259;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    margin: 0;
}

.target-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.info-group {
    margin-bottom: 20px;
}

.info-group:last-child {
    margin-bottom: 0;
}

.info-group label {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #364259;
}

.info-group input {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.info-group input:focus {
    outline: none;
    border-color: #7f122b;
    box-shadow: 0 0 0 3px rgba(127, 18, 43, 0.1);
}

.question-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.question-item:hover {
    border-color: #7f122b;
    box-shadow: 0 4px 15px rgba(127, 18, 43, 0.1);
}

.question-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.question-number {
    background: #7f122b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1rem;
}

.question-category {
    font-size: 1.2rem;
    font-weight: bold;
    color: #364259;
}

.question-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option:hover {
    border-color: #7f122b;
    background: #fff5f5;
}

.answer-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.option-text {
    font-size: 1rem;
    font-weight: 500;
    color: #364259;
}

.answer-option input[type="radio"]:checked + .option-text {
    color: #7f122b;
    font-weight: bold;
}

.additional-questions {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.additional-questions h3 {
    color: #7f122b;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
}

.question-group {
    margin-bottom: 25px;
}

.question-group:last-child {
    margin-bottom: 0;
}

.question-group label {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #364259;
    line-height: 1.5;
}

.question-group textarea {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.question-group textarea:focus {
    outline: none;
    border-color: #7f122b;
    box-shadow: 0 0 0 3px rgba(127, 18, 43, 0.1);
}

/* 결과 표시 스타일 */
.result-summary {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.result-summary h3 {
    color: #7f122b;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.result-description {
    color: #364259;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.top-gifts {
    margin-bottom: 30px;
}

.top-gifts h4 {
    color: #7f122b;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.gift-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gift-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #7f122b;
}

.gift-rank {
    background: #7f122b;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 15px;
}

.gift-info {
    flex: 1;
}

.gift-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #364259;
    margin-bottom: 5px;
}

.gift-score {
    color: #666;
    font-weight: 500;
}

.all-gifts {
    margin-top: 30px;
}

.all-gifts h4 {
    color: #7f122b;
    font-size: 1.4rem;
    margin-bottom: 20px;
    text-align: center;
}

.gift-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gift-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gift-label {
    min-width: 120px;
    font-size: 1rem;
    font-weight: 500;
    color: #364259;
}

.gift-bar-container {
    flex: 1;
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
}

.gift-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #7f122b, #5d0d1f);
    border-radius: 15px;
    transition: width 0.8s ease;
}

.gift-bar-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .answer-options {
        grid-template-columns: 1fr;
    }
    
    .gift-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .gift-label {
        min-width: auto;
    }
    
    .gift-bar-container {
        width: 100%;
    }
} 