* {
    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: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

nav {
    margin-top: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

.file-browser {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.file-browser h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.75rem;
    font-size: 1.8rem;
}

.file-item {
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.file-item:hover {
    background: rgba(236, 240, 241, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-item.active {
    background: rgba(209, 231, 255, 0.9);
    border-left: 4px solid #e74c3c;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.file-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.7rem;
    color: #2c3e50;
    word-break: break-all;
}

.file-item p {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
}

.file-item a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.file-item a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

.file-viewer {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-height: 500px;
}

.file-viewer h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.75rem;
    font-size: 1.8rem;
}

#file-content {
    padding: 1rem;
}

#file-content.loading {
    text-align: center;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#file-content.loading::after {
    content: "加载中...";
    font-size: 1.5rem;
    color: #3498db;
    font-weight: 500;
}

.document-content {
    padding: 1rem;
}

.document-content h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 1.5rem 0 1.5rem 0;
    text-align: center;
    font-weight: 600;
}

.document-content h2 {
    font-size: 1.5rem;
    color: #34495e;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.document-content h3 {
    font-size: 1.3rem;
    color: #555;
    margin: 1.2rem 0 0.8rem 0;
    font-weight: 500;
}

.document-content p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    color: #444;
}

.document-content ul, 
.document-content ol {
    margin: 0 0 1.5rem 2rem;
}

.document-content li {
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

.document-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #3498db;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 0 8px 8px 0;
}

.document-content blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: #555;
}

.content {
    white-space: pre-wrap;
    line-height: 1.8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    text-align: justify;
    color: #444;
}

.content-key-points {
    background: rgba(236, 240, 241, 0.7);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid #27ae60;
}

.content-key-points h3 {
    color: #27ae60;
    margin-top: 0;
}

.content-key-points ul {
    margin-left: 1.5rem;
}

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

.ask-ai-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.ask-ai-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.error-message {
    color: #e74c3c;
    background-color: rgba(236, 240, 241, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    max-width: 100%;
}