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

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

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    color: white;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-image {
    flex-shrink: 0;
    max-width: 200px;
}

.header-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.header-image a:hover img {
    transform: scale(1.05);
}

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

.section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    background: rgba(102, 126, 234, 0.05);
    border-color: #764ba2;
}

.upload-area.dragover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.collapsed .upload-area {
    padding: 20px;
    border-width: 2px;
}

.collapsed .upload-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.collapsed .upload-area h3 {
    font-size: 0.9em;
    margin: 0;
}

.collapsed .upload-area p {
    display: none;
}

.collapsed #uploadStatus {
    font-size: 0.85em;
    padding: 8px;
    margin-top: 10px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: #f0f0f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.tab:hover {
    background: #e0e0e0;
}

.tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.metric-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
}

.metric-card h3 {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.metric-card .value {
    font-size: 2em;
    font-weight: bold;
}

.metric-card .unit {
    font-size: 0.8em;
    opacity: 0.8;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-top: 20px;
}

.date-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.date-filter label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filter input,
.date-filter button,
.controls select,
.controls input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
}

.date-filter button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.date-filter button:hover {
    transform: scale(1.05);
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.solar-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.solar-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.solar-card h4 {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.solar-card .value {
    font-size: 1.8em;
    font-weight: bold;
}

#uploadStatus {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.status-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-processing {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.merge-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.merge-section.minimized {
    padding: 15px 0;
    margin-top: 15px;
}

.merge-section.minimized .merge-area,
.merge-section.minimized #selectedFiles,
.merge-section.minimized #mergeStatus {
    display: none;
}

.merge-section.minimized h3 {
    font-size: 0.9em;
    margin: 0;
    opacity: 0.7;
}

.merge-area {
    border: 3px dashed #28a745;
    border-radius: 15px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.merge-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease;
}

.merge-button:hover {
    transform: scale(1.05);
}

#selectedFiles {
    margin-top: 15px;
}

.file-item {
    background: #f8f9fa;
    padding: 10px;
    margin: 5px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.merge-actions {
    margin-top: 20px;
    text-align: center;
}

.process-merge {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    margin-right: 10px;
}

.download-link {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 10px;
    display: inline-block;
    margin-left: 10px;
}

#mergeStatus {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-image {
        max-width: 150px;
    }
    
    header h1 {
        font-size: 1.8em;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab {
        width: 100%;
    }
}

/* SEO Content Section Styles */
.seo-content {
    line-height: 1.6;
}

.seo-content h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.seo-content h3 {
    color: #764ba2;
    font-size: 1.3em;
    margin-top: 20px;
    margin-bottom: 10px;
}

.seo-content p {
    margin-bottom: 15px;
    color: #333;
}

.seo-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.seo-content li {
    margin-bottom: 8px;
    color: #555;
}

/* FAQ Section Styles */
.faq-section {
    margin-top: 30px;
}

.faq-section h2 {
    color: #667eea;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.faq-section h3 {
    color: #764ba2;
    font-size: 1.1em;
    margin-top: 20px;
    margin-bottom: 8px;
}

.faq-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    color: #666;
}

footer p {
    margin: 5px 0;
}
