* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 네비게이션 바 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #34495e;
}

.nav-link.active {
    background-color: #3498db;
}

/* 메인 컨텐츠 */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: calc(100vh - 200px);
}

.page-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-container h1 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.page-container p {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 1.1rem;
}

/* 기능 박스 */
.feature-box {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 2rem;
}

.feature-box h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feature-box ul {
    list-style-position: inside;
    line-height: 2;
}

.feature-box li {
    margin-bottom: 0.5rem;
}

/* 데모 섹션 */
.demo-section {
    margin-top: 2rem;
}

.demo-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.demo-card {
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border-left: 4px solid #3498db;
}

.demo-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.demo-card p {
    color: #666;
    margin-bottom: 0;
}

/* 업로드 섹션 */
.upload-section {
    margin-top: 2rem;
}

.upload-form {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.file-input {
    padding: 0.5rem;
}

textarea.form-input {
    resize: vertical;
}

.btn-primary, .btn-secondary {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-right: 1rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.upload-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
}

.upload-status .success {
    color: #27ae60;
    background-color: #d5f4e6;
    padding: 0.75rem;
    border-radius: 4px;
}

.upload-status .error {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 0.75rem;
    border-radius: 4px;
}

.upload-status .info {
    color: #3498db;
    background-color: #ebf5fb;
    padding: 0.75rem;
    border-radius: 4px;
}

.file-list {
    margin-top: 1.5rem;
    background-color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 6px;
}

.file-list h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.file-list ul {
    list-style-position: inside;
}

.file-list li {
    padding: 0.5rem 0;
    color: #666;
}

.file-list .uploaded-files {
    list-style: none;
    padding: 0;
}

.file-list .uploaded-files li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.file-list .uploaded-files li .file-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.file-list .uploaded-files li .file-size {
    margin: 0 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.file-list .uploaded-files li .file-date {
    color: #95a5a6;
    font-size: 0.85rem;
}

.file-list .no-files {
    color: #7f8c8d;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

/* 선택된 파일 미리보기 */
.selected-files-preview {
    margin: 1.5rem 0;
}

.selected-files-box {
    background-color: #fff3cd;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.selected-files-box h3 {
    color: #856404;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.selected-files-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.selected-files-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background-color: white;
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}

.selected-files-list li:last-child {
    margin-bottom: 0;
}

.selected-files-list li .file-name {
    flex: 1;
    font-weight: 500;
    color: #2c3e50;
}

.selected-files-list li .file-size {
    margin-left: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 자료/설문 섹션 */
.materials-section,
.survey-section {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    font-size: 1.5rem;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin: 0;
}

.link-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s, transform 0.2s;
    gap: 1.5rem;
}

.link-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.link-item-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.link-item-content {
    flex: 1;
    min-width: 0;
}

.link-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.link-item-description {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.link-open-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
    white-space: nowrap;
}

.link-open-btn:hover {
    background-color: #2980b9;
}

.link-open-btn:active {
    transform: scale(0.98);
}

/* 기존 설문 폼 스타일 (필요시 사용) */
.survey-form {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.survey-result {
    margin-top: 2rem;
    background-color: #d5f4e6;
    padding: 2rem;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.survey-result h3 {
    color: #27ae60;
    margin-bottom: 1rem;
}

.result-box {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.result-box p {
    margin-bottom: 0.75rem;
    color: #333;
}

.result-box strong {
    color: #2c3e50;
}

/* 데이터분석 섹션 */
.analysis-section {
    margin-top: 2rem;
}

.analysis-form {
    background-color: #ecf0f1;
    padding: 2rem;
    border-radius: 6px;
    margin-bottom: 2rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.analysis-result {
    margin-top: 2rem;
}

.result-loading {
    background-color: #ebf5fb;
    color: #3498db;
    padding: 1.5rem;
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
}

.result-success {
    background-color: #d5f4e6;
    padding: 2rem;
    border-radius: 6px;
    border-left: 4px solid #27ae60;
}

.result-success h3 {
    color: #27ae60;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.result-success .result-box {
    background-color: white;
    padding: 1.5rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.result-item {
    margin-bottom: 1.5rem;
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.result-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    color: #333;
}

.result-values div {
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.result-prediction {
    display: inline-block;
    font-size: 2rem;
    font-weight: bold;
    color: #27ae60;
    margin-top: 0.5rem;
}

.result-error {
    background-color: #fadbd8;
    color: #e74c3c;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    text-align: center;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .nav-link {
        display: block;
        text-align: center;
    }

    .main-content {
        padding: 0 1rem;
    }

    .page-container {
        padding: 1.5rem;
    }

    .page-container h1 {
        font-size: 2rem;
    }

    .link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .link-item-icon {
        font-size: 1.5rem;
    }

    .link-open-btn {
        width: 100%;
        text-align: center;
    }
}
