*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f1f5f9;
    color: #1e293b;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #1e293b;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-links a {
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.15s ease;
}

.nav-links a:hover {
    background: rgba(226, 232, 240, 0.7);
    color: #0f172a;
}

.menu-btn {
    background: none;
    border: none;
    padding: 0.4rem;
    border-radius: 8px;
    color: #475569;
    cursor: pointer;
    display: none;
}

.menu-btn:hover {
    background: rgba(226, 232, 240, 0.7);
}

/* Mobile menu */
.mobile-menu {
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.75rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-menu a {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

.mobile-menu a:hover {
    background: #f1f5f9;
}

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 5rem 1.25rem 3rem;
}

.weather-section {
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 0;
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.emoji {
    font-size: 1.25rem;
}

.weather-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.875rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.relative {
    position: relative;
}

.suggestions-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
}

.suggestion-item {
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #eff6ff;
}

.weather-display {
    margin: 0 1.5rem 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 50%, #f0f9ff 100%);
    border: 1px solid #bfdbfe;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
}

.weather-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.weather-item .label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.weather-item .value {
    font-weight: 600;
    color: #1e293b;
}

.weather-item .location {
    font-size: 1.05rem;
}

.weather-item .temp {
    font-size: 2rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: -0.03em;
}

.weather-item .condition {
    display: inline-block;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
    width: fit-content;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.news-column {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease;
}

.news-column:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.column-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.column-header h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.accent {
    width: 6px;
    height: 18px;
    border-radius: 999px;
}

.accent.red { background: #ef4444; }
.accent.black { background: #0f172a; }
.accent.green { background: #16a34a; }
.accent.blue { background: #3b82f6; }

.news-list {
    flex: 1;
}

.news-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: #f8fafc;
}

.news-item .thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.news-item .placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 500;
}

.news-item .google-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid #bfdbfe;
}

.news-item a {
    font-size: 0.825rem;
    font-weight: 500;
    color: #334155;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.news-item:hover a {
    color: #2563eb;
}

.top-stories {
    margin-top: 0.5rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.section-title .badge {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
    background: #e2e8f0;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.story-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.story-image {
    position: relative;
    height: 160px;
    background: #f1f5f9;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.05);
}

.story-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.story-image.google-bg {
    background: linear-gradient(135deg, #eff6ff, #e0e7ff);
    display: flex;
    align-items: center;
    justify-content: center;
}

.big-g {
    font-size: 3rem;
    font-weight: 700;
    color: rgba(59, 130, 246, 0.35);
}

.source-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    font-size: 0.7rem;
    font-weight: 600;
    color: #1e293b;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.black { background: #0f172a; }
.dot.green { background: #16a34a; }
.dot.blue { background: #3b82f6; }

.story-body {
    padding: 1.15rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.story-body h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.15s ease;
}

.story-card:hover .story-body h3 {
    color: #2563eb;
}

.read-more {
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #2563eb;
}

.footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.footer-brand span:first-child {
    font-weight: 600;
    color: #1e293b;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #2563eb;
}

@media (max-width: 1100px) {
    .news-grid,
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .weather-controls {
        grid-template-columns: 1fr;
    }

    .weather-display {
        grid-template-columns: 1fr 1fr;
    }

    .news-grid,
    .stories-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding-top: 4.5rem;
    }
}

@media (max-width: 480px) {
    .weather-display {
        grid-template-columns: 1fr;
    }

    .weather-item .temp {
        font-size: 1.75rem;
    }
}