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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    flex: 1;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffd700;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: white;
    transform: translateX(-3px);
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.logo-highlight {
    color: #ffd700;
    position: relative;
}

.logo-highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ffd700;
    border-radius: 2px;
}

.tagline {
    font-size: 0.95rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Weather Info Styles */
.weather-info {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    min-width: 300px;
}

.weather-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.temperature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.weather-condition {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.weather-extra {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.weather-extra span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-refresh button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.weather-refresh button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Weather Controls */
.weather-controls {
    padding: 20px 40px;
    background: #f8fafc;
    border-bottom: 1px solid #eaeaea;
}

.search-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

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

.location-filter i {
    color: #3498db;
}

.date-range-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-input {
    padding: 10px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.date-separator {
    color: #666;
    font-size: 0.9rem;
}

.view-controls {
    display: flex;
    gap: 10px;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #e0e6ed;
    padding: 5px;
    border-radius: 10px;
}

.btn-toggle {
    background: transparent;
    color: #666;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-toggle.active {
    background: white;
    color: #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-toggle:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.stats-info {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
}

.stat-item i {
    color: #3498db;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Charts Section */
.charts-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.chart-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    height: 300px;
    display: flex;
    flex-direction: column;
}

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

.chart-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.chart-stats span {
    color: #666;
}

.chart-stats strong {
    color: #2c3e50;
}

.chart-container canvas {
    flex: 1;
    width: 100% !important;
    height: calc(100% - 60px) !important;
}

/* Change indicators */
.change-positive {
    color: #27ae60 !important;
}

.change-negative {
    color: #e74c3c !important;
}

.change-neutral {
    color: #f39c12 !important;
}

/* Table Section */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.table-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #e0e6ed;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d1d9e6;
    transform: translateY(-2px);
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    overflow: auto;
    max-height: 500px;
}

#fuelTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

#fuelTable thead {
    background: #f8fafc;
}

#fuelTable th {
    padding: 15px;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #eaeaea;
    white-space: nowrap;
}

#fuelTable td {
    padding: 12px 15px;
    border-bottom: 1px solid #eaeaea;
    color: #555;
    white-space: nowrap;
}

#fuelTable tbody tr:hover {
    background: #f8fafc;
}

#fuelTable tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-pagination {
    padding: 8px 16px;
    border: 2px solid #e0e6ed;
    background: white;
    color: #2c3e50;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-pagination:hover:not(:disabled) {
    border-color: #3498db;
    background: #f8fafc;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 0.9rem;
    color: #666;
}

.rows-info {
    font-size: 0.9rem;
    color: #666;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 20px 40px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.separator {
    opacity: 0.5;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    max-width: 300px;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .weather-info {
        width: 100%;
        justify-content: center;
    }

    .search-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .chart-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        border-radius: 10px;
    }

    .weather-controls,
    .main-content {
        padding: 20px;
    }

    .table-header {
        flex-direction: column;
        align-items: stretch;
    }

    .table-controls {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-status {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2rem;
    }

    .weather-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .table-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}