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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-radius: 16px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.header-top {
    position: absolute;
    top: 15px;
    right: 20px;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.lang-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

.lang-btn:active {
    transform: scale(0.95);
}

.lang-separator {
    color: white;
    opacity: 0.6;
    font-size: 1rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 20px;
}

nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-lang {
    background-color: #f8f9fa;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: auto;
}

.btn-lang:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.nav-link {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

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

.nav-link.active {
    background: white;
    color: var(--primary-color);
}

.card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.card h2 {
    font-size: 1.75rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.info-text {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.upload-section {
    margin: 20px 0;
}

.file-input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--background);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.file-icon {
    font-size: 1.5rem;
}

#fileName, #hourlyFileName {
    color: var(--text-secondary);
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin-bottom: 20px;
}

.drop-zone.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: scale(1.01);
}

.drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.drop-icon {
    font-size: 2.5rem;
    opacity: 0.6;
}

.drop-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.drop-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.drop-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

.file-list {
    margin-top: 20px;
    text-align: left;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.file-item-size {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.file-item-remove {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.file-item-remove:hover {
    background: #dc2626;
}

/* Progress Bar */
.upload-progress {
    margin: 20px 0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    transition: all 0.2s ease;
}

.tooltip-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--text-primary);
}

.tooltip-wrapper:hover .tooltip-content {
    opacity: 1;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

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

.status-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
}

.status-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.status-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.status-message.info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
    display: block;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-item {
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.summary-item h4 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-container {
    margin-top: 20px;
}

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

.model-result {
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.model-result.winner {
    border-color: var(--success-color);
    background: #d1fae5;
}

.model-result h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.model-result .cost {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0;
}

.model-result .badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 10px;
}

.recommendation-box {
    padding: 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 8px;
    margin-top: 20px;
}

.recommendation-box h3 {
    color: white;
    margin-bottom: 10px;
}

.recommendation-box .savings {
    font-size: 2rem;
    font-weight: 700;
    margin: 10px 0;
}

.models-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.model-box {
    padding: 20px;
    background: var(--background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.model-box h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.model-box .example {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    font-style: italic;
    color: var(--text-secondary);
}

.info-card {
    background: #f8fafc;
}

.csv-format pre {
    background: var(--card-background);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin: 10px 0;
    font-size: 0.9rem;
}

.note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
}

.monthly-prices-list {
    margin-top: 20px;
}

.monthly-price-item {
    padding: 15px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monthly-price-item .month {
    font-weight: 600;
    color: var(--text-primary);
}

.monthly-price-item .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.tips-list li:before {
    content: "💡 ";
    margin-right: 8px;
}

/* Monthly prices grid */
.monthly-prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.price-input-group {
    display: flex;
    flex-direction: column;
}

.price-input-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text-primary);
}

.price-input-group input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1em;
}

.price-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #5a6268;
}

/* Monthly breakdown */
.monthly-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.month-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

.month-item strong {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 5px;
}

.month-item span {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.month-item .record-count {
    font-size: 0.8em;
    color: #999;
    margin-top: 2px;
}

/* Monthly results */
.overall-summary {
    margin-bottom: 30px;
}

.monthly-results {
    margin-top: 30px;
}

.monthly-results h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.monthly-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.month-result-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.month-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

.consumption-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.month-comparison {
    margin: 15px 0;
}

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

.price-row.winner {
    background: #d4edda;
    border-left: 3px solid #28a745;
}

.price-row .label {
    font-weight: 500;
    color: var(--text-secondary);
}

.price-row .value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1em;
}

.price-row .winner-icon {
    color: #28a745;
    font-weight: bold;
    margin-left: 8px;
}

.month-savings {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.month-savings strong {
    color: var(--text-primary);
}

.best-model {
    margin-top: 8px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    display: inline-block;
}

.warnings-box {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
}

.warnings-box p {
    margin: 5px 0;
    color: #856404;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.9em;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .card {
        padding: 20px;
    }

    .comparison-grid,
    .models-explanation {
        grid-template-columns: 1fr;
    }

    nav {
        flex-direction: column;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: center;
    margin-top: 10px;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ==================== Tab Navigation ==================== */

.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: var(--card-background);
    padding: 10px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: var(--background);
    color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ==================== Energy Prices Chart ==================== */

.zone-selector-container {
    margin: 25px 0;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
}

.zone-selector-container h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.1rem;
}

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

.zone-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zone-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.zone-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.zone-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zone-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.zone-region {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.chart-container {
    position: relative;
    height: 500px;
    margin: 30px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.price-stats-container {
    margin-top: 30px;
    padding: 20px;
    background: var(--background);
    border-radius: 12px;
}

.price-stats-container h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.price-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.price-stat-card {
    padding: 20px;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.price-stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.price-stat-card h4 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.price-zones-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.zone-info-box {
    padding: 20px;
    background: var(--background);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.zone-info-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.zone-info-box p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.loading-message {
    padding: 20px;
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.info-message {
    padding: 20px;
    text-align: center;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 1rem;
}

/* ==================== Responsive Design for Tabs ==================== */

@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
    }
    
    .zone-checkboxes {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 400px;
        padding: 10px;
    }
    
    .price-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .price-zones-explanation {
        grid-template-columns: 1fr;
    }
}

/* ==================== Battery Calculator Styles ==================== */

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

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

.result-card {
    background: var(--background);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.result-card.highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: var(--primary-color);
}

.result-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-weight: 600;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.result-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.recommendation-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid var(--success-color);
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
}

.recommendation-box h3 {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.recommendation-box p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.solar-note {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    border-radius: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 30px 15px;
        margin-bottom: 20px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .header-top {
        position: static;
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .language-switcher {
        justify-content: center;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 8px;
    }
    
    .tab-btn {
        width: 100%;
        text-align: center;
    }
    
    .drop-zone {
        padding: 20px 15px;
    }
    
    .drop-icon {
        font-size: 2rem;
    }
    
    .drop-title {
        font-size: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-item-remove {
        width: 100%;
    }
    
    .btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .btn-sm {
        width: auto;
        padding: 8px 16px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
    
    .recommendation-box {
        padding: 20px;
    }
    
    .recommendation-box h3 {
        font-size: 1.25rem;
    }
    
    .recommendation-box p {
        font-size: 1rem;
    }
    
    /* Battery Calculator Mobile */
    #monthCheckboxList {
        grid-template-columns: 1fr !important;
    }
    
    .slider-container {
        padding: 15px;
    }
    
    .slider-value {
        font-size: 1.5rem;
    }
    
    /* Graph Mobile */
    canvas {
        max-height: 300px !important;
    }
    
    .tooltip-content {
        white-space: normal;
        max-width: 200px;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .tooltip-content::after {
        left: auto;
        right: 10px;
        transform: none;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .drop-zone {
        padding: 16px 12px;
    }
    
    .drop-icon {
        font-size: 1.8rem;
    }
    
    .drop-title {
        font-size: 0.95rem;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .btn {
        font-size: 0.95rem;
    }
}

/* Touch Target Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn, .tab-btn, .lang-btn, .file-item-remove {
        min-height: 44px;
        min-width: 44px;
    }
    
    .tooltip-icon {
        width: 28px;
        height: 28px;
    }
    
    input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}

/* Onboarding Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.onboarding-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.onboarding-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.onboarding-body {
    padding: 30px;
}

.onboarding-step {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.onboarding-step h3 {
    color: var(--text-primary);
    margin: 10px 0;
    font-size: 1.2rem;
}

.onboarding-step p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.onboarding-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.onboarding-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

.onboarding-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.btn-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-preset:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-preset:active {
    transform: translateY(0);
}

.preset-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.preset-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Date Range Buttons */
.graph-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.date-range-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-range {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.btn-range:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.btn-range.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Data Management */
.uploaded-data-list {
    margin: 20px 0;
}

.data-month-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
}

.data-month-info {
    flex: 1;
}

.data-month-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.data-month-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

.data-month-actions {
    display: flex;
    gap: 10px;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.data-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* FAQ Section */
.faq-container {
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f8fafc;
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 20px;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.battery-suggestions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.battery-suggestions h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.battery-suggestions ul {
    list-style: none;
    padding: 0;
}

.battery-suggestions li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    line-height: 1.6;
    color: var(--text-primary);
}

.battery-suggestions li:before {
    content: "🔋";
    position: absolute;
    left: 0;
    top: 12px;
}

/* Slider styles */
.slider-container {
    margin: 15px 0;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: var(--primary-hover);
    transform: scale(1.1);
}

.slider-value {
    text-align: center;
    margin-top: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Consumption info box */
.consumption-info-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.consumption-info-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Analysis summary */
.analysis-summary {
    background: var(--background);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.analysis-summary p {
    margin: 5px 0;
    color: var(--text-primary);
}

/* Info note */
.info-note {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 0.95rem;
}

/* Success and error messages */
.success-message {
    color: var(--success-color);
    font-weight: 600;
}

.error-message {
    color: var(--error-color);
    font-weight: 600;
}

/* Responsive adjustments for battery calculator */
@media (max-width: 768px) {
    .battery-results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-value {
        font-size: 1.75rem;
    }
    
    .recommendation-box {
        padding: 20px;
    }
    
    .recommendation-box h3 {
        font-size: 1.25rem;
    }
    
    .recommendation-box p {
        font-size: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-background);
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1), 0 -2px 4px -2px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(100%);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.cookie-consent-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.cookie-consent-links {
    font-size: 0.875rem !important;
}

.cookie-consent-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.cookie-consent-links a:hover {
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-consent-buttons .btn {
    white-space: nowrap;
    padding: 10px 24px;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .cookie-consent-buttons {
        width: 100%;
    }
    
    .cookie-consent-buttons .btn {
        flex: 1;
    }
}

/* Legal Pages Styling */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.legal-page h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.legal-page .last-updated {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 32px;
}

.legal-page h2 {
    font-size: 1.75rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.legal-page h3 {
    font-size: 1.25rem;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.legal-page p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.legal-page ul, .legal-page ol {
    margin-bottom: 16px;
    margin-left: 24px;
    color: var(--text-secondary);
}

.legal-page li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-page a {
    color: var(--primary-color);
    text-decoration: none;
}

.legal-page a:hover {
    text-decoration: underline;
}

.legal-page .highlight-box {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 16px 20px;
    margin: 24px 0;
    border-radius: 4px;
}

.legal-page .highlight-box p:last-child {
    margin-bottom: 0;
}

.legal-page .contact-info {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
}

.legal-page .contact-info strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
}
