* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --wix-primary: #116dff;
    --wix-secondary: #0c5cd5;
    --wix-dark: #162d3d;
    --wix-light: #f6f8fb;
    --wix-white: #ffffff;
    --wix-text: #162d3d;
    --wix-text-light: #5f6368;
    --wix-border: #e8eaed;
    --wix-success: #00c853;
    --wix-warning: #ff9800;
    --wix-danger: #f44336;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: var(--wix-text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Wix-Style Navigation */
.wix-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
}

.wix-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wix-logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--wix-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wix-nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.wix-nav-links a {
    color: var(--wix-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: color 0.3s;
}

.wix-nav-links a:hover {
    color: var(--wix-primary);
}

/* Wix-Style Hero Section */
.hero-section {
    position: relative;
    min-height: 90vh;
    background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 109, 255, 0.05) 0%, rgba(17, 109, 255, 0.02) 100%);
    border-radius: 0 0 0 50%;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 5em;
    animation: float 3s ease-in-out infinite, rotate360 20s linear infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.hero-content h1 {
    font-size: 4.5em;
    color: var(--wix-dark);
    font-weight: 800;
    margin: 0 0 20px 0;
    letter-spacing: -2px;
    line-height: 1.1;
}

.hero-content h1 .highlight {
    color: var(--wix-primary);
    position: relative;
}

.hero-content h1 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 12px;
    background: rgba(17, 109, 255, 0.2);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-size: 3em;
    font-weight: 800;
    color: var(--wix-dark);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.section-header p {
    font-size: 1.2em;
    color: var(--wix-text-light);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    margin-bottom: 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 50px 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--wix-border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--wix-primary);
}

.feature-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.feature-card:hover .feature-icon {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    to { transform: rotate(360deg) scale(1); }
}

.feature-card h3 {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 1em;
}

.tagline {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0 0 20px;
    color: var(--wix-dark);
    line-height: 1.3;
}

.subtitle {
    font-size: 1.3em;
    color: var(--wix-text-light);
    margin-bottom: 40px;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search {
    display: flex;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-search #cityInput {
    flex: 1;
    min-width: 280px;
    padding: 18px 24px;
    font-size: 16px;
    border: 2px solid var(--wix-border);
    border-radius: 8px;
    outline: none;
    background: white;
    font-family: 'Poppins', sans-serif;
    color: var(--wix-text);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.hero-search #cityInput::placeholder {
    color: var(--wix-text-light);
}

.hero-search #cityInput:focus {
    border-color: var(--wix-primary);
    box-shadow: 0 0 0 3px rgba(17, 109, 255, 0.1);
}

.hero-search button {
    padding: 18px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    box-shadow: var(--shadow-sm);
}

.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-search #searchBtn {
    background: var(--wix-primary);
}

.hero-search #searchBtn:hover {
    background: var(--wix-secondary);
}

.hero-search .location-btn {
    background: var(--wix-dark);
}

.hero-search .location-btn:hover {
    background: #0d1f2d;
}

.stats-banner {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 60px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3em;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--wix-primary);
}

.stat-label {
    font-size: 1em;
    color: var(--wix-text-light);
    font-weight: 500;
}

.search-section {
    margin-bottom: 40px;
}

.search-box {
    display: flex;
    gap: 10px;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}

#cityInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    border-radius: 50px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#searchBtn, .location-btn {
    padding: 15px 40px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#searchBtn {
    background: #4CAF50;
}

#searchBtn:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.location-btn {
    background: #2196F3;
}

.location-btn:hover {
    background: #0b7dda;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.result-section {
    margin-bottom: 40px;
}

.major-cities {
    margin-bottom: 80px;
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.city-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--wix-border);
    position: relative;
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--wix-primary);
}

.city-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    display: inline-block;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    animation: iconFloat 3s ease-in-out infinite;
    transition: all 0.3s;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

.city-card:hover .city-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
}

.city-card h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: #333;
}

.city-aqi {
    font-size: 3em;
    font-weight: 900;
    margin: 15px 0;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    position: relative;
}

.city-card:hover .city-aqi {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.city-status {
    font-size: 0.9em;
    font-weight: bold;
    margin-top: 5px;
}

.aqi-card {
    background: white;
    border-radius: 16px;
    padding: 50px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s;
    border: 1px solid var(--wix-border);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.share-btn {
    padding: 10px 20px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.share-btn:hover {
    background: #F57C00;
    transform: scale(1.05);
}

.aqi-main {
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cityName {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
}

.aqi-value {
    font-size: 7em;
    font-weight: 900;
    margin: 30px 0;
    padding: 40px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: var(--shadow-md);
}

.aqi-status {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 20px;
}

.health-advice {
    background: #f0f7ff;
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 4px solid var(--wix-primary);
    text-align: left;
    font-size: 1.1em;
    line-height: 1.8;
    border: 1px solid #d0e4ff;
}

.aqi-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    background: white;
    padding: 25px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--wix-border);
    box-shadow: var(--shadow-sm);
}

.detail-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--wix-primary);
}

.detail-item .label {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.detail-item .value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.detail-item .unit {
    display: block;
    font-size: 0.8em;
    color: #999;
}

.timestamp {
    margin-top: 20px;
    color: #999;
    font-size: 0.9em;
}

.info-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(102, 126, 234, 0.05), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(240, 147, 251, 0.05), transparent 40%);
    pointer-events: none;
}

.info-section h3 {
    font-size: 1.8em;
    margin-bottom: 30px;
    text-align: center;
}

.aqi-scale {
    display: grid;
    gap: 15px;
}

.scale-item {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    border: 1px solid var(--wix-border);
    margin-bottom: 15px;
}

.scale-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
    border-color: var(--wix-primary);
}

.scale-color {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.scale-info strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #2c3e50;
}

.scale-info p {
    color: #7f8c8d;
    font-size: 1em;
    line-height: 1.5;
}

.good .scale-color { background: #00e400; }
.moderate .scale-color { background: #ffff00; }
.sensitive .scale-color { background: #ff7e00; }
.unhealthy .scale-color { background: #ff0000; }
.very-unhealthy .scale-color { background: #8f3f97; }
.hazardous .scale-color { background: #7e0023; }

footer {
    background: var(--wix-dark);
    text-align: center;
    padding: 60px 20px;
    color: white;
    margin-top: 0;
}

footer::before {
    display: none;
}

footer p {
    margin: 8px 0;
    opacity: 0.9;
}

footer a {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2em;
    }
    
    .tagline {
        font-size: 1.4em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .hero-search #cityInput,
    .hero-search button {
        width: 100%;
        min-width: auto;
    }
    
    .stats-banner {
        gap: 30px;
    }
    
    .stat-number {
        font-size: 2em;
    }
    
    .section-header h2 {
        font-size: 2em;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .city-icon {
        font-size: 2.5em;
    }
    
    .city-aqi {
        font-size: 2em;
    }
    
    .aqi-value {
        font-size: 4em;
        padding: 30px;
    }
    
    .aqi-status {
        font-size: 1.5em;
    }
    
    .aqi-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .scale-item {
        flex-direction: column;
        text-align: center;
    }
    
    .scale-color {
        width: 60px;
        height: 60px;
    }
}


/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse animation for city cards */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.city-card.loading .city-aqi {
    animation: pulse 1.5s infinite;
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tooltip for share button */
.share-btn {
    padding: 12px 24px;
    background: var(--wix-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.share-btn:hover {
    background: var(--wix-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Better focus states */
#cityInput:focus {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alert banner */
.alert-banner {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    border-radius: 10px;
    animation: slideDown 0.5s;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Quick Links Section */
.quick-links-section {
    margin-bottom: 80px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.link-group {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 35px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
}

.link-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.2);
}

.link-group h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.link-group ul {
    list-style: none;
    padding: 0;
}

.link-group li {
    margin-bottom: 12px;
}

.link-group a {
    color: #667eea;
    text-decoration: none;
    font-size: 1.05em;
    transition: all 0.3s;
    display: inline-block;
}

.link-group a:hover {
    color: #764ba2;
    transform: translateX(5px);
    font-weight: 600;
}
