* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #202124;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 30px;
}

.form-header h1 {
    font-size: 32px;
    font-weight: 400;
    color: #202124;
    margin-bottom: 10px;
}

.form-header p {
    color: #5f6368;
    font-size: 16px;
    margin-bottom: 20px;
}

.view-data-btn {
    background-color: #34a853;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.view-data-btn:hover {
    background-color: #2d8e47;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.survey-form {
    padding: 0 20px;
}

.question-container {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    background-color: #fff;
    transition: box-shadow 0.2s ease;
}

.question-container:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.question-number {
    background-color: #4285f4;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    margin-right: 12px;
}

.question-header h3 {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
    flex: 1;
}

.required {
    color: #d93025;
    font-size: 18px;
    margin-left: 5px;
}

.question-content {
    margin-left: 36px;
}

/* 새로운 폼 요소 스타일 */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #202124;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-group select {
    background-color: white;
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.large-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.instruction-text {
    margin-top: 10px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #4285f4;
}

.instruction-text p {
    margin: 0 0 8px 0;
    color: #5f6368;
    font-size: 14px;
}

.instruction-text ul {
    margin: 0;
    padding-left: 20px;
    color: #5f6368;
    font-size: 13px;
}

.instruction-text li {
    margin-bottom: 4px;
    line-height: 1.4;
}

/* 과목 입력 필드 스타일 */
.subject-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.subject-input {
    flex: 2;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.subject-input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.grade-select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.grade-select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.additional-subjects {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.additional-subjects .subject-row {
    margin-bottom: 8px;
}

/* 기존 입력 요소 스타일 */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

select {
    background-color: white;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
    font-size: 16px;
    color: #202124;
}

.radio-label input[type="radio"],
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.radio-custom,
.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #dadce0;
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-custom {
    border-radius: 4px;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #4285f4;
    background-color: #4285f4;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: #4285f4;
    background-color: #4285f4;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 포커스 스타일 추가 */
.radio-label input[type="radio"]:focus + .radio-custom,
.checkbox-label input[type="checkbox"]:focus + .checkbox-custom {
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
}

.submit-btn,
.clear-btn,
.reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.submit-btn {
    background-color: #4285f4;
    color: white;
}

.submit-btn:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clear-btn {
    background-color: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.clear-btn:hover {
    background-color: #f1f3f4;
}

.reset-btn {
    background-color: #34a853;
    color: white;
}

.reset-btn:hover {
    background-color: #2d8e47;
}

.success-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
}

.success-message h2 {
    color: #34a853;
    margin-bottom: 10px;
    font-size: 24px;
}

.success-message p {
    color: #5f6368;
    margin-bottom: 20px;
}

.submitted-data {
    background-color: white;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.submitted-data h3 {
    color: #202124;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #4285f4;
    padding-bottom: 8px;
}

.data-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f4;
}

.data-item:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 500;
    color: #5f6368;
    min-width: 120px;
    margin-right: 20px;
}

.data-value {
    color: #202124;
    flex: 1;
    text-align: right;
}

.data-value.array {
    text-align: left;
}

.data-value.array span {
    display: inline-block;
    background-color: #e8f0fe;
    color: #1a73e8;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
    font-size: 14px;
}

/* 모든 제출 데이터 표시 영역 */
.all-data-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.all-data-view.active {
    display: flex;
}

.all-data-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4285f4;
}

.all-data-header h2 {
    color: #202124;
    font-size: 24px;
    font-weight: 500;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.download-btn {
    background-color: #34a853;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.download-btn:hover {
    background-color: #2d8e47;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-btn {
    background-color: #f8f9fa;
    color: #5f6368;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background-color: #f1f3f4;
}

.all-data-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.submission-item {
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #fafbfc;
}

.submission-item:last-child {
    margin-bottom: 0;
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8eaed;
}

.submission-title {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.submission-date {
    font-size: 14px;
    color: #5f6368;
}

.submission-data {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 10px;
}

.submission-field {
    padding: 8px 0;
}

.submission-label {
    font-weight: 500;
    color: #5f6368;
    font-size: 14px;
}

.submission-value {
    color: #202124;
    font-size: 14px;
}

.submission-value.array {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.submission-value.array span {
    background-color: #e8f0fe;
    color: #1a73e8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.no-data-message {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
    font-size: 16px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
        margin: 0;
    }
    
    .survey-form {
        padding: 0 10px;
    }
    
    .question-container {
        padding: 15px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn,
    .clear-btn {
        width: 100%;
    }
    
    .submitted-data {
        margin: 20px 10px;
    }
    
    .data-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .data-label {
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    .data-value {
        text-align: left;
    }
    
    .all-data-content {
        padding: 20px;
        margin: 10px;
        max-width: 95vw;
    }
    
    .submission-data {
        grid-template-columns: 1fr;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-container {
    animation: fadeIn 0.3s ease-out;
}

/* 로딩 상태 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 에러 상태 */
.error {
    border-color: #d93025 !important;
}

.error-message {
    color: #d93025;
    font-size: 14px;
    margin-top: 5px;
} 

/* Master Plan 섹션 스타일 */
.master-plan-section {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.master-plan-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
}

.master-plan-content {
    background-color: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.master-plan-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    margin: 0;
}

.download-plan-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.download-plan-btn:hover {
    background-color: #218838;
} 