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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FAF6F5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #333;
}

.survey-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 700px;
    min-height: 600px;
    position: relative;
    overflow: hidden;
}

/* Progress Bar */
.progress-bar-container {
    height: 6px;
    background: #e0e0e0;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #F5655A;
    width: 0%;
    transition: width 0.4s ease;
}

/* Survey Pages */
.survey-page {
    display: none;
    padding: 50px 40px;
    min-height: 550px;
    animation: fadeIn 0.5s ease;
}

.survey-page.active {
    display: block;
}

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

/* Welcome Page */
.welcome-content {
    text-align: center;
}

.welcome-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #F5655A;
    margin-bottom: 40px;
}

.welcome-text {
    text-align: left;
    line-height: 1.8;
    color: #555;
    margin-bottom: 40px;
}

.welcome-text p {
    margin-bottom: 24px;
}

/* Question Content */
.question-content {
    max-width: 600px;
}

.question-number {
    display: inline-block;
    background: #F5655A;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.question-title {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.5;
}

.question-subtitle {
    font-size: 15px;
    color: #777;
    margin-bottom: 30px;
    line-height: 1.6;
}

.question-subtitle.optional-label {
    color: #F5655A;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Input Fields */
.text-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.text-input:focus {
    outline: none;
    border-color: #F5655A;
    box-shadow: 0 0 0 3px rgba(245, 101, 90, 0.1);
}

.textarea-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Noto Sans KR', sans-serif;
    transition: all 0.3s ease;
    resize: vertical;
    margin-bottom: 8px;
    line-height: 1.6;
}

.textarea-input:focus {
    outline: none;
    border-color: #F5655A;
    box-shadow: 0 0 0 3px rgba(245, 101, 90, 0.1);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-item:hover {
    border-color: #F5655A;
    background: #FFF5F4;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    margin-right: 14px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom {
    background: #F5655A;
    border-color: #F5655A;
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-custom::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-item input[type="checkbox"]:checked ~ .checkbox-label {
    color: #F5655A;
    font-weight: 500;
}

.checkbox-label {
    font-size: 15px;
    color: #555;
}

/* Score Selection */
.score-container {
    margin-bottom: 8px;
}

.score-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.score-button {
    flex: 1;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.score-button:hover {
    border-color: #F5655A;
    color: #F5655A;
    transform: translateY(-2px);
}

.score-button.selected {
    background: #F5655A;
    border-color: #F5655A;
    color: white;
    transform: translateY(-2px);
}

.score-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #999;
}

/* Error Message */
.error-message {
    display: none;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.error-message.show {
    display: block;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 40px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Noto Sans KR', sans-serif;
}

.btn-primary {
    background: #F5655A;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(245, 101, 90, 0.3);
}

.btn-secondary {
    background: white;
    color: #F5655A;
    border: 2px solid #F5655A;
}

.btn-secondary:hover {
    background: #FFF5F4;
    transform: translateY(-2px);
}

/* Thank You Page */
.thankyou-content {
    text-align: center;
}

.thankyou-icon {
    width: 80px;
    height: 80px;
    background: #F5655A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 40px;
    color: white;
}

.thankyou-content h1 {
    font-size: 32px;
    font-weight: 700;
    color: #F5655A;
    margin-bottom: 30px;
}

.thankyou-text {
    text-align: left;
    line-height: 1.8;
    color: #555;
}

.thankyou-text p {
    margin-bottom: 24px;
}

.thankyou-text .signature {
    margin-top: 40px;
    text-align: center;
    color: #F5655A;
}

/* Page Counter */
.page-counter {
    position: absolute;
    bottom: 20px;
    right: 40px;
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-overlay p {
    color: white;
    font-size: 16px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .survey-container {
        border-radius: 0;
        max-width: 100%;
        min-height: 100vh;
    }

    .survey-page {
        padding: 40px 24px;
        min-height: calc(100vh - 6px);
    }

    .welcome-content h1,
    .thankyou-content h1 {
        font-size: 26px;
    }

    .question-title {
        font-size: 20px;
    }

    .score-buttons {
        flex-wrap: wrap;
    }

    .score-button {
        flex: 1 1 calc(20% - 8px);
        min-width: 50px;
        padding: 12px 0;
        font-size: 16px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    .page-counter {
        right: 24px;
        bottom: 16px;
    }
}

@media (max-width: 480px) {
    .welcome-content h1,
    .thankyou-content h1 {
        font-size: 22px;
    }

    .question-title {
        font-size: 18px;
    }

    .welcome-text,
    .thankyou-text {
        font-size: 14px;
    }

    .score-button {
        flex: 1 1 calc(20% - 6px);
        min-width: 45px;
        padding: 10px 0;
        font-size: 14px;
    }
}
