/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 确保select元素正常定位 */
select {
    position: static !important;
    transform: none !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

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

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
}











/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Projects Section */
.projects {
    padding: 80px 0;
    background: #f8fafc;
}

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

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

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

.project-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.project-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 1rem;
    align-items: center;
}

.project-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-year {
    background: #fef3c7;
    color: #d97706;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.project-tag {
    background: #e5e7eb;
    color: #374151;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Project Actions */
.project-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 1rem;
    flex-wrap: wrap;
}

.project-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.project-actions .btn-primary {
    background: #2563eb;
    color: white;
}

.project-actions .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.project-actions .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.project-actions .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.btn-icon {
    font-size: 1rem;
}

/* Project Actions Modal */
.project-actions-modal {
    display: flex;
    gap: 15px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.project-actions-modal .btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.project-actions-modal .btn-primary {
    background: #2563eb;
    color: white;
}

.project-actions-modal .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.project-actions-modal .btn-secondary {
    background: #6b7280;
    color: white;
}

.project-actions-modal .btn-secondary:hover {
    background: #4b5563;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

/* About Section */
.about {
    padding: 80px 0;
    background: #f9fafb;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #374151;
}

.research-areas {
    list-style: none;
    margin-top: 1rem;
}

.research-areas li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.research-areas i {
    color: #2563eb;
    font-size: 1.2rem;
}




/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-content p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Modal */
.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-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #000;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0 1rem;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .project-actions .btn {
        min-width: auto;
        width: 100%;
    }
    
    .project-actions-modal {
        flex-direction: column;
        gap: 10px;
    }
    
    .project-actions-modal .btn {
        min-width: auto;
        width: 100%;
    }
    
    .project-meta {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-actions .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .project-actions-modal .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Custom Modal Styles */
.custom-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);
}

.custom-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.custom-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.custom-modal-close:hover {
    color: #000;
}

.folder-navigation {
    text-align: center;
}

.folder-navigation h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.folder-navigation p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.navigation-options .btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.navigation-options .btn-primary {
    background: #2563eb;
    color: white;
}

.navigation-options .btn-primary:hover {
    background: #1d4ed8;
}

.navigation-options .btn-secondary {
    background: #6b7280;
    color: white;
}

.navigation-options .btn-secondary:hover {
    background: #4b5563;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #10b981;
}

.toast.info {
    background: #3b82f6;
}

.toast.error {
    background: #ef4444;
}

/* Project Content View Styles */
.project-content-loading {
    text-align: center;
    padding: 2rem;
}

.project-content-loading h3 {
    color: #1f2937;
    margin-bottom: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.project-content-view {
    max-height: 80vh;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.content-header h2 {
    color: #1f2937;
    margin: 0;
}

.content-body {
    margin-bottom: 1.5rem;
}

.readme-content {
    line-height: 1.7;
    color: #374151;
}

.readme-content h1,
.readme-content h2,
.readme-content h3 {
    color: #1f2937;
    margin: 1.5rem 0 1rem 0;
}

.readme-content h1 {
    font-size: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.readme-content h2 {
    font-size: 1.3rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.3rem;
}

.readme-content h3 {
    font-size: 1.1rem;
}

.readme-content p {
    margin-bottom: 1rem;
}

.readme-content ul,
.readme-content ol {
    margin: 1rem 0 1rem 2rem;
}

.readme-content li {
    margin-bottom: 0.5rem;
}

.readme-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.readme-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.readme-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.readme-content a {
    color: #2563eb;
    text-decoration: none;
}

.readme-content a:hover {
    text-decoration: underline;
}

.content-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.project-content-error {
    text-align: center;
    padding: 2rem;
}

.project-content-error h3 {
    color: #dc2626;
    margin-bottom: 1rem;
}

.project-content-error p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Folder Structure View Styles */
.folder-structure-view {
    max-height: 80vh;
    overflow-y: auto;
}

.folder-tree {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.folder-item,
.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.folder-item:last-child,
.file-item:last-child {
    border-bottom: none;
}

.folder-icon,
.file-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.folder-name,
.file-name {
    color: #374151;
    font-weight: 500;
}

.folder-name {
    color: #1f2937;
    font-weight: 600;
}