/* 기본 설정 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
    color: #3498db;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* 메인 콘텐츠 */
.main {
    min-height: calc(100vh - 180px);
    padding: 2rem 0;
}

/* 히어로 섹션 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.hero-content h1 i {
    font-size: 2.8rem;
    color: #f1c40f;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.survey-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.info-item i {
    color: #f1c40f;
}

/* 설문 폼 */
.survey-form-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.form-section {
    margin-bottom: 3rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-header {
    border-bottom: 3px solid #3498db;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.section-header h2 i {
    color: #3498db;
    font-size: 1.8rem;
}

.subsection {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

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

.note {
    background: #e8f4fd;
    color: #2980b9;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #bde0ff;
    font-size: 0.95rem;
}

/* 폼 그리드 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 라디오 버튼 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.radio-item:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-item input[type="radio"]:checked + .radio-custom {
    border-color: #3498db;
    background-color: #3498db;
}

.radio-item input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-item input[type="radio"]:checked ~ span:last-child {
    font-weight: 600;
    color: #3498db;
}

/* 준비현황 그리드 */
.preparation-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.prep-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.prep-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.prep-item .radio-group {
    flex-direction: row;
    gap: 1rem;
}

/* 버튼 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

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

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
}

/* 폼 액션 */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
}

/* 중요 안내사항 */
.important-notes {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.important-notes h3 {
    color: #856404;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.important-notes ul {
    list-style: none;
    padding-left: 0;
}

.important-notes li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.important-notes li::before {
    content: '•';
    color: #f39c12;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 관리자 페이지 스타일 */
.admin-main {
    background: #f8f9fa;
}

.admin-header {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.admin-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.admin-header p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.admin-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon { background: linear-gradient(135deg, #3498db, #2980b9); }
.stat-card:nth-child(2) .stat-icon { background: linear-gradient(135deg, #f39c12, #e67e22); }
.stat-card:nth-child(3) .stat-icon { background: linear-gradient(135deg, #27ae60, #229954); }
.stat-card:nth-child(4) .stat-icon { background: linear-gradient(135deg, #e74c3c, #c0392b); }

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.stat-content p {
    color: #7f8c8d;
    font-weight: 500;
}

/* 차트 섹션 */
.charts-section {
    margin-bottom: 3rem;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-header {
    background: #f8f9fa;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.chart-header h3 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.chart-content {
    padding: 1.5rem;
}

/* 응답 목록 섹션 */
.responses-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.section-header h2 {
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-controls select,
.filter-controls input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* 테이블 */
.table-container {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.responses-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.responses-table th,
.responses-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.responses-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.responses-table tbody tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.status-접수 { background: #e3f2fd; color: #1976d2; }
.status-검토중 { background: #fff3e0; color: #f57c00; }
.status-일정확정 { background: #f3e5f5; color: #7b1fa2; }
.status-적용완료 { background: #e8f5e8; color: #388e3c; }

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1rem 2rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

/* 상세 정보 그리드 */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.detail-item strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-item span {
    color: #7f8c8d;
}

/* 통계 상세 그리드 */
.stats-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stats-detail-item h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

/* 푸터 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.footer-info h4 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-info p {
    line-height: 1.8;
}

.footer-info i {
    color: #3498db;
    width: 15px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-logo i {
    font-size: 2rem;
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
        flex-direction: column;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .survey-info {
        flex-direction: column;
        align-items: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        justify-content: stretch;
    }
    
    .filter-controls select,
    .filter-controls input {
        flex: 1;
        min-width: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    
    .prep-item .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .survey-form-container {
        padding: 1rem;
    }
    
    .form-section {
        margin-bottom: 2rem;
    }
    
    .subsection {
        padding: 1rem;
    }
    
    .responses-table th,
    .responses-table td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-footer {
        padding: 1rem;
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 로딩 애니메이션 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 폼 유효성 검사 */
.form-group input:invalid:not(:focus),
.form-group textarea:invalid:not(:focus),
.form-group select:invalid:not(:focus) {
    border-color: #e74c3c;
}

.form-group input:valid:not(:focus),
.form-group textarea:valid:not(:focus),
.form-group select:valid:not(:focus) {
    border-color: #27ae60;
}