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

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

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

/* Disclaimer Banner */
.disclaimer-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #ffc107;
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px 0;
}

header h1 {
    font-size: 32px;
    color: #2c3e50;
}

header .tagline {
    color: #666;
    margin-top: 5px;
}

/* Main Content */
main {
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.hero h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 15px;
}

.hero-desc {
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #ddd;
    border-radius: 8px;
    padding: 60px 40px;
    margin: 30px auto;
    max-width: 500px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: #27ae60;
    background: #f0fff4;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.upload-hint {
    color: #999;
    font-size: 14px;
    margin-top: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* Features Section */
.features {
    margin-bottom: 40px;
}

.features h3 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #2c3e50;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-icon {
    font-size: 36px;
    margin-bottom: 15px;
}

.feature-card h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.feature-card p {
    color: #666;
    font-size: 14px;
}

/* Disclaimer Section */
.disclaimer-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.disclaimer-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.disclaimer-content {
    font-size: 14px;
    color: #555;
}

.disclaimer-content p {
    margin-bottom: 15px;
}

.disclaimer-content ul {
    margin: 10px 0 15px 20px;
}

.disclaimer-content li {
    margin-bottom: 8px;
}

.disclaimer-content strong {
    color: #333;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer p {
    margin-bottom: 10px;
}

.footer-disclaimer {
    font-size: 12px;
    color: #95a5a6;
}

/* Loading State */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Analysis Page Styles */
.analysis-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.analysis-header h2 {
    color: #2c3e50;
}

.analysis-tools {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.page-selector {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.page-selector h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.page-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.page-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.page-item:hover {
    background: #f5f5f5;
}

.page-item input[type="checkbox"] {
    margin-right: 10px;
}

.page-item label {
    cursor: pointer;
    flex: 1;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.chart-disclaimer {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    font-style: italic;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.data-table tr:hover {
    background: #f9f9f9;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 22px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .file-meta {
        flex-direction: column;
    }
    
    .meta-input, .meta-select {
        width: 100%;
    }
}

/* File List Styles */
.file-list {
    margin-top: 30px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.file-list h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.file-list ul {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

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

.file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.file-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.meta-input {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.meta-select {
    width: 100px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.btn-remove:hover {
    background: #c0392b;
}

.btn-success {
    background-color: #27ae60;
    color: white;
    margin-top: 15px;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    margin-top: 15px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* PDF Section Styles */
.pdf-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.pdf-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.page-preview {
    font-size: 12px;
    color: #555;
    max-height: 200px;
    overflow-y: auto;
    background: #f5f5f5;
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
}

/* Chart Card */
.chart-card {
    background: #fafafa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.chart-card h5 {
    color: #34495e;
    margin-bottom: 10px;
}