:root {
    --primary-blue: #1a73e8;
    --secondary-blue: #4285f4;
    --light-blue: #e8f0fe;
    --dark-blue: #1557b0;
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray: #5f6368;
    --border-color: #dadce0;
    --header-height: 70px;
    --footer-height: 400px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--white);
    color: var(--gray);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100vh;
    background: none !important;
}

/* Header Styles */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2rem;
    color: var(--primary-blue);
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin: 0;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-blue);
    background-color: var(--light-blue);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-top: var(--header-height);
    padding: 2rem 0;
    background-color: var(--gray-light);
}

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

/* Form Styles */
.form-group {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-weight: 500;
}

select, input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--gray);
    background-color: var(--white);
    transition: border-color 0.3s ease;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px var(--light-blue);
}

.column-select {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.column-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.generate-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 1rem 2rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.generate-btn:hover {
    background-color: var(--dark-blue);
}

/* Results Styles */
.results {
    margin-top: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    color: var(--primary-blue);
}

.download-btns {
    display: flex;
    gap: 1rem;
}

.download-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-container {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 1rem;
}

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

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--light-blue);
    color: var(--primary-blue);
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:hover {
    background-color: var(--light-blue);
}

/* Loading Styles */
.loading {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-blue);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error Styles */
.error {
    display: none;
    background-color: #fce8e6;
    color: #c5221f;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Footer Styles */
.main-footer {
    background-color: var(--white);
    padding: 3rem 0 1rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-blue);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--gray);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        padding: 1rem;
    }

    .main-nav ul {
        margin-top: 1rem;
        gap: 1rem;
    }

    .container {
        padding: 1rem;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .download-btns {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Add styles for the new slider controls */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    transition: opacity .2s;
}

.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
}

.help-text {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Style for the missing values in the table */
.missing-value {
    color: #999;
    font-style: italic;
}

/* Style for the variance indicator */
.variance-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.variance-low {
    background-color: #4CAF50;
}

.variance-medium {
    background-color: #FFC107;
}

.variance-high {
    background-color: #F44336;
}

/* Data Statistics Styles */
.data-stats {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.data-stats h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--primary-blue);
    font-size: 1.2rem;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.column-stats {
    margin-top: 1rem;
}

.column-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

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

.column-name {
    font-weight: 500;
    color: var(--dark-blue);
}

.column-metrics {
    display: flex;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-value {
    font-weight: 500;
}

.metric-label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Blurry blobs background for all pages */
.site-bg-blobs {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.site-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}
.site-blob-blue {
    width: 420px; height: 420px;
    background: #3b82f6;
    top: -120px; left: -120px;
}
.site-blob-orange {
    width: 340px; height: 340px;
    background: #ff9800;
    top: 60px; right: -100px;
    left: auto;
    opacity: 0.32;
}
.site-blob-blue-bottom {
    width: 900px; height: 900px;
    background: #3b82f6;
    bottom: -350px; right: -350px;
    opacity: 0.32;
    filter: blur(80px);
}

/* Subtle grid pattern overlay */
.site-bg-grid {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
    background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="60" height="60" fill="none"/><path d="M60 0V60M0 60H60" stroke="%2399a3ba" stroke-width="1" opacity="0.10"/><path d="M0 0H60V60" stroke="%2399a3ba" stroke-width="1" opacity="0.10"/></svg>');
    background-size: 60px 60px;
    opacity: 0.25;
    mix-blend-mode: multiply;
}
