* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    text-align: center;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px;
}

.sidebar h2 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.document-list {
    list-style: none;
}

.document-list li {
    margin-bottom: 10px;
}

.document-list li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.document-list li a:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.document-list li a.active {
    background: #667eea;
    color: white;
}

.document-icon {
    font-size: 20px;
    margin-right: 10px;
}

.document-name {
    flex: 1;
    font-size: 14px;
}

.viewer {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
}

.welcome-message h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.welcome-message p {
    font-size: 16px;
}

.pdf-viewer {
    height: 100%;
    width: 100%;
}

.pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.markdown-viewer {
    height: 100%;
    overflow-y: auto;
    padding: 30px;
}

#markdown-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

#markdown-content h1,
#markdown-content h2,
#markdown-content h3,
#markdown-content h4,
#markdown-content h5,
#markdown-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

#markdown-content h1 {
    font-size: 2em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3em;
}

#markdown-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.3em;
}

#markdown-content p {
    margin-bottom: 16px;
}

#markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

#markdown-content pre {
    background: #f4f4f4;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 16px;
}

#markdown-content pre code {
    background: none;
    padding: 0;
}

#markdown-content ul,
#markdown-content ol {
    margin-bottom: 16px;
    padding-left: 2em;
}

#markdown-content li {
    margin-bottom: 8px;
}

#markdown-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 16px;
    margin: 16px 0;
    color: #666;
}

#markdown-content a {
    color: #667eea;
    text-decoration: none;
}

#markdown-content a:hover {
    text-decoration: underline;
}

#markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 16px;
}

#markdown-content th,
#markdown-content td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
}

#markdown-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 200px;
    }
}