/**
 * HavaNinDurumu - Mobile App Style Theme
 * %100 Mobil Uyumlu, Uygulama Tarzı
 */

/* ==================== Variables ==================== */
:root {
    /* Beyaz ve siyah */
    --white: #ffffff;
    --black: #000000;

    /* Gri tonları - daha belirgin */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Mavi tonları - daha canlı */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-300: #93c5fd;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;
    --blue-900: #1e3a8a;

    /* Diğer renkler */
    --green-500: #22c55e;
    --yellow-500: #eab308;
    --orange-500: #f97316;
    --red-500: #ef4444;
    --cyan-500: #06b6d4;
    --purple-500: #a855f7;

    /* Tema değişkenleri */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-alt: #f8fafc;
    --text-dark: #0f172a;
    --text-mid: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;

    /* Font */
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Boyutlar */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    /* Gölgeler - daha belirgin */
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);

    /* Spacing */
    --gap-xs: 4px;
    --gap-sm: 8px;
    --gap-md: 16px;
    --gap-lg: 24px;
    --gap-xl: 32px;
    --gap-2xl: 48px;

    /* Typography */
    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 15px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
}

/* ==================== Reset ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--text-dark);
    background: var(--bg-body);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font: inherit;
    cursor: pointer;
    background: none;
    border: none;
}

/* ==================== App Shell ==================== */
.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ==================== Header ==================== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
    position: relative;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 12px;
}

/* Mobile Menu Button */
.menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    order: 3;
}

.menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 1px;
    transition: all 0.2s;
}

.menu-btn:hover {
    background: var(--gray-100);
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Logo */
.logo {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    order: 1;
}

.logo-icon {
    font-size: 22px;
}

.logo-text {
    font-weight: 700;
    white-space: nowrap;
}

/* Header Navigation - Mobile: Açılır menü */
.header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 100;
}

.header-nav.open {
    display: flex;
    max-height: 500px;
}

.header-nav a {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-mid);
    border-bottom: 1px solid var(--gray-100);
    transition: all 0.15s;
}

.header-nav a:last-child {
    border-bottom: none;
}

.header-nav a:hover {
    color: var(--blue-600);
    background: var(--blue-50);
}

.header-nav a.active {
    color: var(--blue-600);
    background: transparent;
    border-bottom: 3px solid var(--blue-600);
}

/* Search - Mobile: Gizli */
.search-box {
    display: none;
    align-items: center;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    padding: 6px 12px;
    gap: 6px;
    order: 2;
}

.search-box:focus-within {
    border-color: var(--blue-400);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 13px;
    min-width: 0;
    color: var(--text-dark);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.search-box button {
    color: var(--blue-500);
    font-size: 16px;
    padding: 0;
}

/* ==================== Main Layout ==================== */
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Mobile: Single column */
.sidebar-left,
.sidebar-right {
    display: none;
}

.main-content {
    flex: 1;
    padding: var(--gap-md);
}

/* ==================== Card - App Style ==================== */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: var(--gap-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.card-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    text-align: left;
    margin: 0;
}

.card-header h2 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    line-height: 1.4;
    display: inline;
}

.card-icon {
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.card-body {
    padding: 16px;
}

/* ==================== Weather App - Mobile First Design ==================== */
.weather-app {
    background: linear-gradient(180deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--gap-md);
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
}

.weather-app * {
    color: #ffffff;
}

/* Header */
.weather-app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.weather-app-location {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.weather-app-country {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 2px;
}

/* Main Weather Display */
.weather-app-main {
    padding: 16px 0 20px;
}

.weather-app-icon {
    font-size: 80px;
    line-height: 1;
    margin-bottom: 4px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.weather-app-temp {
    font-size: 88px;
    font-weight: 200;
    line-height: 1;
    letter-spacing: -6px;
    margin-bottom: 4px;
}

.weather-app-condition {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.weather-app-feels {
    font-size: 14px;
    opacity: 0.8;
}

/* Weather Details Grid - 3x2 for mobile */
.weather-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 8px;
    margin-top: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.weather-app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
}

.wai-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.wai-value {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.wai-label {
    font-size: 10px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* Update time */
.weather-app-update {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 12px;
}

/* ==================== Weather Card - Clean Minimal Design ==================== */
.weather-card {
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: var(--gap-md);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}

.weather-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px 0;
    border-bottom: none;
    gap: 10px;
}

.weather-card-location h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a202c;
    letter-spacing: -0.3px;
}

.weather-card-location p {
    font-size: 12px;
    color: #64748b;
    margin: 2px 0 0;
}

.weather-card-date {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.weather-card-body {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    gap: 10px;
}

/* Sıcaklık bölümü */
.weather-card-temp {
    text-align: center;
    padding: 4px 0;
}

.wct-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 4px;
}

.wct-icon .weather-icon-svg {
    width: 80px;
    height: 80px;
}

/* SVG hava durumu ikonları */
.weather-icon-svg {
    display: inline-block;
    vertical-align: middle;
}

.hourly-icon .weather-icon-svg {
    width: 32px;
    height: 32px;
}

.daily-icon .weather-icon-svg {
    width: 36px;
    height: 36px;
}

.extended-icon .weather-icon-svg {
    width: 32px;
    height: 32px;
}

.wct-degrees {
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2px;
    margin: 4px 0;
    color: #1a202c;
}

.wct-condition {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #334155;
    max-width: 200px;
    text-align: center;
    line-height: 1.3;
}

.wct-feels {
    font-size: 12px;
    color: #64748b;
}

/* Detay bölümü */
.weather-card-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    border: 1px solid #e2e8f0;
}

.wcd-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    padding: 6px;
    background: #f8fafc;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.wcd-item:hover {
    background: #f1f5f9;
}

.wcd-icon {
    font-size: 16px;
    line-height: 1;
}

.wcd-label {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.wcd-value {
    font-size: 12px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.2;
}

.weather-card-footer {
    text-align: center;
    padding: 6px 12px 8px;
    font-size: 10px;
    color: #94a3b8;
}

/* Tablet */
@media (min-width: 600px) {
    .weather-card {
        border-radius: 16px;
    }

    .weather-card-header {
        padding: 12px 16px 0;
    }

    .weather-card-location h1 {
        font-size: 20px;
    }

    .weather-card-date {
        font-size: 13px;
    }

    .weather-card-body {
        flex-direction: row;
        align-items: center;
        padding: 10px 16px;
        gap: 16px;
    }

    .weather-card-temp {
        flex: 0 0 auto;
        padding: 0;
    }

    .wct-icon .weather-icon-svg {
        width: 100px;
        height: 100px;
    }

    .wct-degrees {
        font-size: 56px;
    }

    .wct-condition {
        font-size: 15px;
    }

    .weather-card-details {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 10px;
    }

    .wcd-item {
        padding: 8px;
    }

    .wcd-icon {
        font-size: 18px;
    }

    .wcd-value {
        font-size: 13px;
    }

    .weather-card-footer {
        padding: 6px 16px 10px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .weather-card {
        border-radius: 18px;
    }

    .weather-card-header {
        padding: 14px 20px 0;
    }

    .weather-card-location h1 {
        font-size: 22px;
    }

    .weather-card-date {
        font-size: 14px;
    }

    .weather-card-body {
        padding: 12px 20px;
        gap: 24px;
    }

    .wct-icon .weather-icon-svg {
        width: 120px;
        height: 120px;
    }

    .wct-degrees {
        font-size: 64px;
        letter-spacing: -3px;
    }

    .wct-condition {
        font-size: 16px;
    }

    .weather-card-details {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 14px;
    }

    .wcd-item {
        padding: 12px;
    }

    .wcd-icon {
        font-size: 20px;
    }

    .wcd-label {
        font-size: 10px;
    }

    .wcd-value {
        font-size: 14px;
    }
}

/* Page Title */
.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: var(--gap-md) 0;
    padding: 0;
}

/* ==================== Weather Hero - Legacy Support ==================== */
.weather-hero {
    background: linear-gradient(180deg, #1e40af 0%, #3b82f6 100%);
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    color: #ffffff;
    text-align: center;
    margin-bottom: var(--gap-md);
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.3);
}

.weather-hero * {
    color: #ffffff;
}

/* ==================== Hero Card (Ana Sayfa) ==================== */
.hero-card {
    background: linear-gradient(135deg, #1d4ed8 0%, #0e7490 100%) !important;
    border-radius: var(--radius);
    padding: var(--gap-md) var(--gap-lg);
    text-align: center;
    color: #ffffff !important;
    margin-bottom: var(--gap-md);
    box-shadow: var(--shadow-lg);
}

.hero-card * {
    color: #ffffff !important;
}

.hero-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-md);
    text-align: left;
}

.hero-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.hero-text {
    flex-shrink: 0;
}

.hero-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0 0 var(--gap-xs);
}

.hero-subtitle {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: 0;
}

.hero-search {
    display: flex;
    max-width: 420px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-search input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: var(--text-base);
    outline: none;
    color: var(--text-dark) !important;
}

.hero-search input::placeholder {
    color: var(--gray-400) !important;
}

.hero-search button {
    background: var(--blue-600);
    border: none;
    padding: 14px 18px;
    font-size: 20px;
    cursor: pointer;
    color: #ffffff !important;
}

.hero-search button:hover {
    background: var(--blue-700);
}

/* ==================== Section ==================== */
.section {
    background: var(--bg-card);
    border-radius: var(--radius);
    margin-bottom: var(--gap-md);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-md);
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Section Title - Standalone h2 before cards */
h2.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: var(--gap-lg) 0 var(--gap-sm);
    padding: 0;
    text-align: left;
}

h2.section-title:first-of-type {
    margin-top: 0;
}

@media (min-width: 600px) {
    h2.section-title {
        font-size: 17px;
    }
}

@media (min-width: 1024px) {
    h2.section-title {
        font-size: 18px;
    }
}

.section-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.section-body {
    padding: var(--gap-md);
}

/* ==================== Hourly Scroll - App Style ==================== */
.hourly-scroll-wrapper {
    position: relative;
}

.hourly-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.hourly-scroll::-webkit-scrollbar {
    display: none;
}

.hourly-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-dark);
    z-index: 10;
    transition: all 0.2s ease;
    user-select: none;
}

.hourly-scroll-btn:hover {
    background: var(--gray-50);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.hourly-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.hourly-scroll-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.hourly-scroll-btn-prev {
    left: -15px;
}

.hourly-scroll-btn-next {
    right: -15px;
}

@media (max-width: 768px) {
    .hourly-scroll-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .hourly-scroll-btn-prev {
        left: 5px;
    }

    .hourly-scroll-btn-next {
        right: 5px;
    }
}

.hourly-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    min-width: 60px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    scroll-snap-align: start;
}

.hourly-time {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-mid);
}

.hourly-icon {
    font-size: 28px;
    line-height: 1;
}

.hourly-temp {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

.hourly-rain {
    font-size: 10px;
    color: var(--blue-600);
    font-weight: 600;
    background: var(--blue-50);
    padding: 2px 6px;
    border-radius: 10px;
}

/* ==================== Tomorrow Card - App Style ==================== */
.tomorrow-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
}

.tomorrow-grid .grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.tomorrow-grid .grid-item-main {
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.tomorrow-grid .grid-icon {
    font-size: 56px;
    line-height: 1;
}

.tomorrow-grid .grid-day {
    font-size: 13px;
    color: var(--text-mid);
}

.tomorrow-grid .grid-condition {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.tomorrow-grid .grid-temps {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.tomorrow-grid .temp-high {
    font-size: 22px;
    font-weight: 700;
    color: var(--red-500);
}

.tomorrow-grid .temp-sep {
    font-size: 14px;
    color: var(--text-light);
}

.tomorrow-grid .temp-low {
    font-size: 18px;
    font-weight: 600;
    color: var(--blue-600);
}

.tomorrow-grid .detail-icon {
    font-size: 20px;
}

.tomorrow-grid .detail-label {
    font-size: 11px;
    color: var(--text-mid);
}

.tomorrow-grid .detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.tomorrow-desc {
    margin-top: 12px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-mid);
    background: var(--gray-50);
    border-radius: 10px;
    border: 1px solid var(--gray-200);
}

@media (max-width: 600px) {
    .tomorrow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== Daily List - App Style ==================== */
.daily-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.daily-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.daily-day {
    width: 80px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.daily-icon {
    font-size: 32px;
    line-height: 1;
}

.daily-info {
    flex: 1;
    min-width: 0;
}

.daily-condition {
    font-size: 13px;
    color: var(--text-mid);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.daily-rain {
    font-size: 11px;
    color: var(--blue-600);
    font-weight: 500;
}

.daily-temps {
    display: flex;
    gap: 8px;
    font-size: 15px;
}

.temp-high {
    font-weight: 700;
    color: var(--text-dark);
}

.temp-low {
    color: var(--text-light);
    font-weight: 500;
}

/* ==================== Extended Grid ==================== */
.extended-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap-xs);
}

.extended-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--gap-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--gray-100);
}

.extended-date {
    font-size: var(--text-xs);
    color: var(--text-mid);
}

.extended-icon {
    font-size: 24px;
    margin: 4px 0;
}

.extended-temps {
    font-size: var(--text-xs);
}

.extended-temps strong {
    color: var(--text-dark);
}

.extended-temps span {
    color: var(--text-light);
}

.extended-rain {
    font-size: 10px;
    color: var(--blue-500);
}

/* ==================== Quick Actions - App Style ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: var(--gap-md) 0;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%);
    border-radius: 16px;
    color: var(--text-dark);
    font-size: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: all 0.15s ease;
}

.action-btn:hover {
    background: var(--blue-50);
    border-color: var(--blue-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

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

.action-icon {
    font-size: 28px;
    line-height: 1;
}

.action-text {
    font-weight: 500;
    color: var(--text-mid);
}

/* ==================== City Grid ==================== */
.city-grid {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.city-card {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    transition: all 0.15s;
    border: 1px solid var(--gray-100);
}

.city-card:hover {
    background: var(--blue-50);
    border-color: var(--blue-200);
}

.city-icon {
    font-size: 32px;
    width: 44px;
    text-align: center;
}

.city-info {
    flex: 1;
}

.city-name {
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--text-dark);
}

.city-condition {
    font-size: var(--text-xs);
    color: var(--text-mid);
}

.city-temp {
    font-size: var(--text-xl);
    font-weight: 500;
    color: var(--blue-600);
}

/* ==================== Feature List ==================== */
.feature-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap-sm);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.feature-icon {
    font-size: 28px;
    width: 44px;
    text-align: center;
}

.feature-text {
    display: flex;
    flex-direction: column;
}

.feature-text strong {
    font-size: var(--text-sm);
    color: var(--text-dark);
}

.feature-text span {
    font-size: var(--text-xs);
    color: var(--text-mid);
}

/* ==================== Tag Cloud ==================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm);
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: var(--text-xs);
    color: var(--text-dark);
    transition: all 0.15s;
    border: 1px solid var(--gray-200);
}

.tag:hover {
    background: var(--blue-600);
    color: #ffffff;
    border-color: var(--blue-600);
}

.tag-cloud-lg .tag {
    padding: 8px 16px;
    font-size: var(--text-sm);
}

/* ==================== Widget ==================== */
.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--gap-md);
    margin-bottom: var(--gap-md);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--gap-sm);
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding-bottom: var(--gap-sm);
    border-bottom: 1px solid var(--gray-100);
}

.widget-content {
    font-size: 14px;
    color: var(--text-mid);
}

/* ==================== Weather Tips ==================== */
.tips-list {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.tip-item {
    display: flex;
    gap: var(--gap-sm);
    padding: var(--gap-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--tip-color, var(--blue-500));
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tip-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tip-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.tip-content {
    flex: 1;
    min-width: 0;
}

.tip-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.tip-text {
    font-size: 12px;
    color: var(--text-mid);
    line-height: 1.4;
}

/* Warning tips have subtle background */
.tip-item[style*="dc2626"],
.tip-item[style*="1d4ed8"] {
    background: rgba(239, 68, 68, 0.05);
}

/* ==================== Link List ==================== */
.link-list {
    display: flex;
    flex-direction: column;
}

.link-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    gap: var(--gap-sm);
    color: var(--text-dark);
}

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

.link-item:hover {
    color: var(--blue-600);
}

.link-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.link-item .text {
    flex: 1;
}

.link-item .arrow {
    color: var(--text-light);
}

/* ==================== Astro Grid ==================== */
.astro-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-sm);
}

.astro-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--gap-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.astro-item .label {
    font-size: 11px;
    color: var(--text-light);
}

.astro-item .value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.astro-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 4px;
}

/* ==================== AQI ==================== */
.aqi-display {
    text-align: center;
    padding: var(--gap-md);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.aqi-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.aqi-label {
    font-size: 14px;
    font-weight: 500;
    margin-top: var(--gap-sm);
    color: var(--text-dark);
}

/* ==================== Earthquake ==================== */
.earthquake-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: var(--gap-sm);
    border-bottom: 1px solid var(--gray-100);
}

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

.earthquake-mag {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.mag-low { background: var(--green-500); }
.mag-medium { background: var(--yellow-500); }
.mag-high { background: var(--orange-500); }
.mag-severe { background: var(--red-500); }

.earthquake-info {
    flex: 1;
}

.earthquake-loc {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
}

.earthquake-time {
    font-size: 12px;
    color: var(--text-light);
}

/* ==================== Alert ==================== */
.alert {
    padding: var(--gap-sm);
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-sm);
    border-left: 4px solid;
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--red-500);
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--yellow-500);
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.alert-text {
    font-size: 13px;
    color: var(--text-mid);
    margin-top: 2px;
}

/* ==================== SEO Content ==================== */
.seo-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--gap-lg);
    margin-top: var(--gap-md);
    margin-bottom: var(--gap-md);
    box-shadow: var(--shadow);
}

.seo-content h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 var(--gap-md);
    padding-bottom: var(--gap-sm);
    border-bottom: 2px solid var(--blue-500);
}

.seo-content h3 {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-dark);
    margin: var(--gap-lg) 0 var(--gap-sm);
}

.seo-content p {
    font-size: var(--text-sm);
    color: var(--text-mid);
    line-height: 1.8;
    margin: 0 0 var(--gap-md);
}

.seo-content p:last-child {
    margin-bottom: 0;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: var(--gap-sm) var(--gap-md) 2px var(--gap-md);
    margin-bottom: var(--gap-md);
    font-size: var(--text-xs);
    color: var(--text-mid);
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
}

.breadcrumb a {
    color: var(--blue-600);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    margin: 0 2px;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

.breadcrumb h2 {
    display: inline;
    font-size: inherit;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: inherit;
}

/* ==================== Badge ==================== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-mid);
}

.badge-sm {
    font-size: 10px;
    padding: 2px 8px;
    background: var(--blue-100);
    color: var(--blue-700);
    border-radius: 10px;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: var(--gap-lg) var(--gap-md);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-dark);
}

.footer-desc {
    font-size: var(--text-sm);
    color: var(--text-mid);
    margin-top: var(--gap-xs);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--gap-md);
    margin-top: var(--gap-md);
    flex-wrap: wrap;
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--text-mid);
}

.footer-links a:hover {
    color: var(--blue-600);
}

.footer-sources {
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid var(--gray-200);
}

.footer-sources-title {
    font-size: var(--text-xs);
    color: var(--text-light);
}

.footer-languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: var(--gap-md);
    padding: var(--gap-sm) 0;
}

.footer-languages .lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-100);
    transition: all 0.2s ease;
    text-decoration: none;
}

.footer-languages .lang-flag:hover {
    background: var(--blue-100);
    transform: scale(1.15);
}

.footer-languages .lang-flag.active {
    background: var(--blue-500);
    box-shadow: 0 0 0 2px var(--blue-200);
}

.footer-languages .lang-flag .flag-emoji {
    font-size: 18px;
    line-height: 1;
}

.footer-languages .lang-flag .flag-emoji img.emoji {
    width: 18px !important;
    height: 18px !important;
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: var(--gap-sm);
    margin-top: var(--gap-sm);
}

.footer-badges .badge {
    background: var(--gray-100);
}

.footer-copyright {
    margin-top: var(--gap-md);
    font-size: var(--text-xs);
    color: var(--text-light);
}

.footer-updated {
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-light);
    opacity: 0.7;
}

/* ==================== Loading ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gap-lg);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--blue-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== Utilities ==================== */
.text-center { text-align: center; }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-muted { color: var(--text-light); }
.mt-1 { margin-top: var(--gap-sm); }
.mt-2 { margin-top: var(--gap-md); }
.mb-1 { margin-bottom: var(--gap-sm); }
.mb-2 { margin-bottom: var(--gap-md); }
.hidden { display: none !important; }

/* ==================== Sidebar ==================== */
.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1e40af;
    padding: 10px var(--gap-md);
    margin-top: var(--gap-sm);
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: var(--radius-sm);
}

.sidebar-title:first-child {
    margin-top: 0;
}

.sidebar-title h2 {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    color: inherit;
    display: inline;
}

.sidebar-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: 10px var(--gap-md);
    font-size: 14px;
    color: var(--text-mid);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    margin: 0 var(--gap-sm);
    background: #f8fbff;
}

.sidebar-link:hover {
    background: #e0efff;
    color: var(--text-dark);
}

.sidebar-link.active {
    background: #e0efff;
    color: var(--text-dark);
}

.sidebar-link .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Quick Nav */
.quick-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 400px;
    overflow-y: auto;
    background: #f0f7ff;
    border-radius: var(--radius-sm);
    padding: 8px 0;
    margin: 4px 8px;
}

.quick-nav a {
    display: block;
    padding: 8px var(--gap-md);
    font-size: 13px;
    color: var(--text-mid);
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    margin: 0 var(--gap-sm);
}

.quick-nav a:hover {
    background: #e0efff;
    color: var(--text-dark);
}

.quick-nav a.active {
    background: var(--blue-50);
    color: var(--blue-600);
    font-weight: 600;
}

/* 81 İl Listesi */
.city-list-81 {
    max-height: 500px;
    padding: var(--gap-xs) 0;
}

.city-list-81 a {
    padding: 6px var(--gap-md);
    font-size: 12px;
}

/* Ülkeler Listesi */
.country-list {
    max-height: 400px;
    padding: var(--gap-xs) 0;
}

.country-list a {
    padding: 6px var(--gap-md);
    font-size: 12px;
}

/* Kıta Grupları (Collapsible) */
.continent-group {
    margin-bottom: 4px;
}

.continent-group summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px var(--gap-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    user-select: none;
    list-style: none;
}

.continent-group summary::-webkit-details-marker {
    display: none;
}

.continent-group summary::before {
    content: '▶';
    font-size: 10px;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.continent-group[open] summary::before {
    transform: rotate(90deg);
}

.continent-group summary:hover {
    background: var(--gray-100);
}

.continent-icon {
    font-size: 14px;
}

.continent-name {
    flex: 1;
}

.continent-count {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 400;
}

.continent-group .country-list {
    max-height: none;
    padding-left: 12px;
    border-left: 2px solid var(--gray-200);
    margin-left: 10px;
    margin-top: 4px;
}

/* City List (ülke şehirleri) */
.city-list {
    max-height: 300px;
    padding: var(--gap-xs) 0;
}

.city-list a {
    padding: 5px var(--gap-md);
    font-size: 12px;
}

/* ==================== Twemoji (Flag emojis) ==================== */
img.emoji {
    height: 1em;
    width: 1em;
    margin: 0 0.05em 0 0.1em;
    vertical-align: -0.1em;
    display: inline-block;
}

/* Title için biraz büyük */
h1 img.emoji {
    height: 0.9em;
    width: 0.9em;
    vertical-align: -0.05em;
}

/* Sidebar için */
.sidebar-link img.emoji,
.quick-nav img.emoji {
    height: 1.1em;
    width: 1.1em;
}

/* ==================== TABLET (min 600px) ==================== */
@media (min-width: 600px) {
    .city-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .extended-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .weather-city {
        font-size: 28px;
    }

    /* Weather App - Tablet */
    .weather-app {
        padding: 24px 20px;
    }

    .weather-app-location {
        font-size: 26px;
    }

    .weather-app-temp {
        font-size: 96px;
    }

    .weather-app-grid {
        max-width: 400px;
        margin: 20px auto 0;
        padding: 16px 12px;
    }

    .wai-value {
        font-size: 18px;
    }

    .page-title {
        font-size: 20px;
    }
}

/* ==================== DESKTOP (min 1024px) ==================== */
@media (min-width: 1024px) {
    /* Header Desktop - Tek satır: Logo | Nav | Arama */
    .header-container {
        padding: 0 24px;
    }

    .header-row {
        padding: 12px 0;
        gap: 24px;
    }

    .menu-btn {
        display: none;
    }

    .logo {
        font-size: 16px;
        order: 1;
    }

    .logo-icon {
        font-size: 26px;
    }

    .header-nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        flex: 1;
        max-height: none;
        overflow-x: auto;
        background: transparent;
        border-top: none;
        box-shadow: none;
        justify-content: center;
        gap: 6px;
        order: 2;
        margin: 0 20px;
    }

    .header-nav a {
        padding: 10px 18px;
        border-bottom: none;
        border-radius: 8px;
        font-size: 14px;
        white-space: nowrap;
        font-weight: 500;
    }

    .header-nav a:hover {
        background: var(--gray-100);
    }

    .header-nav a.active {
        background: transparent;
        color: var(--blue-600);
        border-bottom: 3px solid var(--blue-600);
    }

    .search-box {
        display: flex;
        width: 180px;
        flex-shrink: 0;
        order: 3;
    }

    /* Layout Desktop */
    .main-layout {
        flex-direction: row;
        gap: var(--gap-lg);
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 12px; /* Match header-container padding */
    }

    .sidebar-left {
        display: block;
        width: 260px;
        flex-shrink: 0;
        padding: var(--gap-lg) 0;
    }

    .main-content {
        flex: 1;
        min-width: 0;
        padding: var(--gap-lg) 0;
    }

    .sidebar-right {
        display: block;
        width: 320px;
        flex-shrink: 0;
        padding: var(--gap-lg) 0;
    }

    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-card {
        padding: var(--gap-lg) var(--gap-xl);
    }

    .hero-title {
        font-size: 28px;
    }

    .weather-hero {
        padding: var(--gap-xl);
    }

    .weather-city {
        font-size: 32px;
    }

    .weather-temp {
        font-size: 72px;
    }

    .weather-icon {
        font-size: 80px;
    }

    /* Weather App - Desktop */
    .weather-app {
        padding: 32px 24px;
        max-width: 600px;
    }

    .weather-app-location {
        font-size: 28px;
    }

    .weather-app-temp {
        font-size: 110px;
    }

    .weather-app-icon {
        font-size: 90px;
    }

    .weather-app-condition {
        font-size: 20px;
    }

    .weather-app-grid {
        max-width: 450px;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }
}

/* ==================== LARGE DESKTOP (min 1280px) ==================== */
@media (min-width: 1280px) {
    .sidebar-left {
        width: 280px;
    }

    .sidebar-right {
        width: 340px;
    }

    .city-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== RTL Support ==================== */
[dir="rtl"] .sidebar-link,
[dir="rtl"] .daily-item,
[dir="rtl"] .link-item {
    flex-direction: row-reverse;
}

/* ==================== Print ==================== */
@media print {
    .header, .sidebar-left, .sidebar-right, .footer {
        display: none;
    }
}

/* ==================== Marine Hero ==================== */
.marine-hero {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    color: #ffffff;
    margin-bottom: var(--gap-md);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.25);
}

.marine-hero * {
    color: #ffffff;
}

.marine-hero-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.marine-hero-header h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0 0 var(--gap-xs);
}

.marine-hero-header p {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: 0;
}

.marine-hero-body {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.marine-hero-main {
    text-align: center;
}

.marine-wave-icon {
    font-size: 56px;
    margin-bottom: var(--gap-xs);
    animation: wave-float 3s ease-in-out infinite;
}

@keyframes wave-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.marine-wave-height {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

.marine-wave-height span {
    font-size: 28px;
    font-weight: 400;
}

.marine-condition {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-top: var(--gap-xs);
}

.marine-hero-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-sm);
}

.marine-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--gap-md);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.marine-detail-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.marine-detail-label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 4px 0;
}

.marine-detail-value {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff !important;
}

.marine-hero-footer {
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.marine-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    font-size: var(--text-sm);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Sea Scale */
.sea-scale {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.scale-item {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-sm);
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.scale-color {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.scale-info {
    display: flex;
    flex-direction: column;
    min-width: 100px;
}

.scale-name {
    font-weight: 600;
    color: var(--text-dark);
}

.scale-range {
    font-size: 12px;
    color: var(--text-light);
}

.scale-desc {
    font-size: 13px;
    color: var(--text-mid);
    margin-left: auto;
}

/* Marine Quick Links */
.marine-quick-links {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
}

.marine-quick-link {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.marine-quick-link:hover {
    border-color: var(--blue-300);
    background: var(--blue-50);
    transform: translateX(4px);
}

.mql-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.mql-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.mql-arrow {
    font-size: 18px;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.marine-quick-link:hover .mql-arrow {
    transform: translateX(4px);
    color: var(--blue-500);
}

/* Sea Scale Compact */
.sea-scale-compact {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.scale-bar {
    display: flex;
    height: 24px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.scale-segment {
    flex: 1;
    cursor: help;
    transition: transform 0.2s ease;
}

.scale-segment:hover {
    transform: scaleY(1.2);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    padding: 0 2px;
}

.scale-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm) var(--gap-md);
    padding-top: var(--gap-sm);
    border-top: 1px solid var(--gray-100);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

@media (min-width: 600px) {
    .marine-quick-links {
        flex-direction: row;
    }

    .marine-quick-link {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: var(--gap-lg);
    }

    .mql-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .mql-arrow {
        display: none;
    }
}

/* Marine Desktop */
@media (min-width: 768px) {
    .marine-hero {
        padding: var(--gap-xl);
    }

    .marine-hero-header h1 {
        font-size: var(--text-2xl);
    }

    .marine-hero-body {
        flex-direction: row;
        align-items: center;
    }

    .marine-hero-main {
        flex: 1;
    }

    .marine-wave-icon {
        font-size: 72px;
    }

    .marine-wave-height {
        font-size: 80px;
    }

    .marine-hero-details {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
    }

    .scale-item {
        padding: var(--gap-md);
    }
}

/* ==================== Wikipedia Content ==================== */
.wiki-content {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.wiki-content p {
    margin: 0;
    line-height: 1.7;
    color: var(--text-mid);
}

.wiki-thumbnail {
    float: right;
    max-width: 150px;
    height: auto;
    margin: 0 0 var(--gap-md) var(--gap-md);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
}

.wiki-link {
    display: inline-block;
    color: var(--blue-600);
    font-size: 14px;
    text-decoration: none;
    margin-top: var(--gap-sm);
}

.wiki-link:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .wiki-thumbnail {
        float: none;
        max-width: 100%;
        margin: 0 0 var(--gap-md) 0;
    }
}

/* ==================== Air Quality Hero ==================== */
.aqi-hero {
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    color: #ffffff;
    margin-bottom: var(--gap-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.aqi-hero * {
    color: #ffffff;
}

.aqi-hero-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.aqi-hero-header h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0 0 var(--gap-xs);
}

.aqi-hero-header p {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: 0;
}

.aqi-hero-body {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.aqi-hero-main {
    text-align: center;
}

.aqi-icon {
    font-size: 56px;
    margin-bottom: var(--gap-xs);
    animation: aqi-float 3s ease-in-out infinite;
}

@keyframes aqi-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.aqi-hero-main .aqi-value {
    font-size: 72px;
    font-weight: 700;
    line-height: 1;
    margin: 0;
}

.aqi-hero-main .aqi-label {
    font-size: var(--text-lg);
    font-weight: 500;
    opacity: 0.9;
    margin-top: var(--gap-xs);
}

.aqi-status {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-top: var(--gap-xs);
}

.aqi-hero-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-sm);
}

.aqi-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--gap-md);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.aqi-detail-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.aqi-detail-label {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 4px 0;
}

.aqi-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff !important;
}

.aqi-hero-footer {
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.aqi-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    font-size: var(--text-sm);
}

/* AQI Recommendation Card */
.aqi-rec-box {
    border-left: 4px solid;
    padding: var(--gap-md);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.aqi-rec-text {
    font-size: 15px;
    color: var(--text-dark);
    margin: 0 0 var(--gap-md);
    line-height: 1.6;
}

.aqi-rec-tips {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
}

.aqi-rec-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--gap-sm);
    font-size: 14px;
    color: var(--text-mid);
}

.tip-check {
    color: var(--green-500);
    font-weight: 700;
    flex-shrink: 0;
}

/* Pollutant Grid Modern */
.pollutant-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.pollutant-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--gap-md);
}

.pollutant-header {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-sm);
}

.pollutant-icon {
    font-size: 24px;
}

.pollutant-info {
    display: flex;
    flex-direction: column;
}

.pollutant-card .pollutant-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.pollutant-card .pollutant-desc {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

.pollutant-data {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: var(--gap-sm);
}

.pollutant-card .pollutant-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.pollutant-card .pollutant-unit {
    font-size: 13px;
    color: var(--text-mid);
}

.pollutant-bar-wrap {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--gap-xs);
}

.pollutant-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pollutant-limit {
    font-size: 11px;
    color: var(--text-light);
}

/* AQI Quick Links */
.aqi-quick-links {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
}

.aqi-quick-link {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.aqi-quick-link:hover {
    border-color: var(--blue-300);
    background: var(--blue-50);
}

.aql-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.aql-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.aql-arrow {
    font-size: 18px;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.aqi-quick-link:hover .aql-arrow {
    transform: translateX(4px);
    color: var(--blue-500);
}

/* AQI Scale Compact */
.aqi-scale-compact {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.aqi-scale-bar {
    display: flex;
    height: 24px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.aqi-scale-segment {
    flex: 1;
    cursor: help;
    transition: transform 0.2s ease;
}

.aqi-scale-segment:hover {
    transform: scaleY(1.2);
}

.aqi-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-light);
    padding: 0 2px;
}

.aqi-scale-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-sm) var(--gap-md);
    padding-top: var(--gap-sm);
    border-top: 1px solid var(--gray-100);
}

.aqi-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
}

/* AQI Desktop */
@media (min-width: 600px) {
    .aqi-quick-links {
        flex-direction: row;
    }

    .aqi-quick-link {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: var(--gap-lg);
    }

    .aql-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .aql-arrow {
        display: none;
    }

    .pollutant-grid-modern {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .aqi-hero {
        padding: var(--gap-xl);
    }

    .aqi-hero-header h1 {
        font-size: var(--text-2xl);
    }

    .aqi-hero-body {
        flex-direction: row;
        align-items: center;
    }

    .aqi-hero-main {
        flex: 1;
    }

    .aqi-icon {
        font-size: 72px;
    }

    .aqi-hero-main .aqi-value {
        font-size: 88px;
    }

    .aqi-hero-details {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== History Hero ==================== */
.history-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
    border-radius: var(--radius-lg);
    padding: var(--gap-lg);
    color: #ffffff;
    margin-bottom: var(--gap-md);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.25);
}

.history-hero * {
    color: #ffffff;
}

.history-hero-header {
    text-align: center;
    margin-bottom: var(--gap-lg);
}

.history-hero-header h1 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 0 0 var(--gap-xs);
}

.history-hero-header p {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: 0;
}

.history-hero-body {
    display: flex;
    flex-direction: column;
    gap: var(--gap-lg);
}

.history-hero-main {
    text-align: center;
}

.history-icon {
    font-size: 56px;
    margin-bottom: var(--gap-xs);
    animation: history-pulse 2s ease-in-out infinite;
}

@keyframes history-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.history-range {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.9;
}

.history-years {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    margin: var(--gap-xs) 0;
}

.history-subtitle {
    font-size: var(--text-lg);
    font-weight: 500;
    opacity: 0.9;
}

.history-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-sm);
}

.history-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--gap-md);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
}

.history-stat-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.history-stat-label {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    margin: 0 0 4px 0;
    opacity: 0.9;
}

.history-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
}

.history-hero-footer {
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-size: var(--text-sm);
    opacity: 0.9;
}

/* History Date Picker */
.history-date-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
}

.date-input-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-mid);
}

.history-date-input {
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    color: var(--text-dark);
    background: var(--white);
    transition: border-color 0.2s ease;
}

.history-date-input:focus {
    outline: none;
    border-color: var(--purple-500);
}

.history-date-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    padding: 12px 24px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.history-date-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.date-quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gap-sm);
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid var(--gray-100);
}

.date-quick-links span {
    font-size: 13px;
    color: var(--text-light);
}

.date-quick-links a {
    font-size: 13px;
    color: var(--purple-500);
    text-decoration: none;
    padding: 4px 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.date-quick-links a:hover {
    background: var(--purple-500);
    color: #ffffff;
}

/* Custom Calendar Popup */
.custom-date-picker {
    position: relative;
}

.custom-date-picker .history-date-input {
    width: 100%;
    cursor: pointer;
    padding-right: 45px;
}

.date-picker-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
}

.calendar-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    padding: 16px;
    z-index: 9999;
    display: none;
    min-width: 300px;
}

.calendar-popup.active {
    display: block;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.calendar-nav {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.calendar-nav:hover {
    background: #e5e7eb;
}

.calendar-selectors {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.calendar-select {
    padding: 6px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.calendar-select:hover {
    border-color: #9ca3af;
}

.calendar-select:focus {
    border-color: #14b8a6;
}

.calendar-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    padding: 4px 0;
}

.calendar-weekdays .weekend {
    color: #ef4444;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    text-align: center;
    padding: 8px 4px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s;
}

.calendar-day:hover:not(.empty):not(.disabled) {
    background: #f3f4f6;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.weekend {
    color: #ef4444;
}

.calendar-day.today {
    background: #14b8a6;
    color: #fff;
    font-weight: 600;
}

.calendar-day.selected {
    background: #14b8a6;
    color: #fff;
    font-weight: 600;
}

.calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: transparent;
}

/* Year Comparison Grid */
.year-comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gap-md);
}

.year-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: var(--gap-md);
    text-align: center;
}

.year-card-year {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple-500);
    margin-bottom: var(--gap-xs);
}

.year-card-temps {
    font-size: 18px;
    margin-bottom: var(--gap-sm);
}

.year-temp-max {
    font-weight: 700;
    color: var(--red-500);
}

.year-temp-sep {
    color: var(--text-light);
    margin: 0 4px;
}

.year-temp-min {
    font-weight: 600;
    color: var(--blue-500);
}

.year-card-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--gap-sm);
}

.year-temp-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.year-card-precip {
    font-size: 13px;
    color: var(--text-mid);
}

.year-no-rain {
    color: var(--text-light);
}

/* Modern History Chart */
.history-chart-modern {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px;
    height: 200px;
    padding: var(--gap-md);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-temps {
    font-size: 11px;
    font-weight: 600;
    height: 20px;
    display: flex;
    align-items: center;
}

.chart-temp-max {
    color: var(--red-500);
}

.chart-temp-min {
    color: var(--blue-500);
}

.chart-bar-container {
    flex: 1;
    width: 100%;
    max-width: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    position: relative;
}

.chart-bar-max {
    width: 100%;
    background: linear-gradient(to top, #f97316, #ef4444);
    border-radius: 4px 4px 0 0;
    min-height: 4px;
}

.chart-bar-min {
    width: 100%;
    background: linear-gradient(to top, #0ea5e9, #3b82f6);
    border-radius: 0 0 4px 4px;
    min-height: 4px;
    position: absolute;
    bottom: 0;
    opacity: 0.6;
}

.chart-date {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.chart-rain {
    font-size: 12px;
    margin-top: 2px;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: var(--gap-lg);
    margin-top: var(--gap-md);
    padding-top: var(--gap-md);
    border-top: 1px solid var(--gray-100);
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
}

.legend-bar {
    width: 16px;
    height: 8px;
    border-radius: 2px;
}

.legend-max {
    background: linear-gradient(to right, #f97316, #ef4444);
}

.legend-min {
    background: linear-gradient(to right, #0ea5e9, #3b82f6);
}

/* History Table */
.history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.history-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.history-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--gray-100);
    white-space: nowrap;
}

.history-table tbody tr:hover {
    background: var(--gray-50);
}

.history-td-date {
    display: flex;
    flex-direction: column;
}

.history-td-date strong {
    color: var(--text-dark);
}

.history-td-date span {
    font-size: 12px;
    color: var(--text-light);
}

.history-td-max {
    color: var(--red-500);
    font-weight: 600;
}

.history-td-min {
    color: var(--blue-500);
    font-weight: 600;
}

.history-td-rain {
    color: var(--blue-600);
}

/* History Quick Links */
.history-quick-links {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin-bottom: var(--gap-md);
}

.history-quick-link {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
}

.history-quick-link:hover {
    border-color: var(--purple-500);
    background: #faf5ff;
}

.hql-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.hql-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.hql-arrow {
    font-size: 18px;
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.history-quick-link:hover .hql-arrow {
    transform: translateX(4px);
    color: var(--purple-500);
}

/* History Info Box */
.history-info-box {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}

.history-info-box .info-item {
    display: flex;
    gap: var(--gap-md);
    padding: var(--gap-md);
    background: var(--gray-50);
    border-radius: var(--radius);
}

.history-info-box .info-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.history-info-box .info-content h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 var(--gap-xs);
}

.history-info-box .info-content p {
    font-size: 14px;
    color: var(--text-mid);
    margin: 0;
    line-height: 1.6;
}

/* History Desktop */
@media (min-width: 600px) {
    .history-date-form {
        flex-direction: row;
        align-items: flex-end;
    }

    .date-input-group {
        flex: 1;
    }

    .history-quick-links {
        flex-direction: row;
    }

    .history-quick-link {
        flex: 1;
        flex-direction: column;
        text-align: center;
        padding: var(--gap-lg);
    }

    .hql-icon {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .hql-arrow {
        display: none;
    }

    .year-comparison-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .history-info-box {
        flex-direction: row;
    }

    .history-info-box .info-item {
        flex: 1;
    }
}

@media (min-width: 768px) {
    .history-hero {
        padding: var(--gap-xl);
    }

    .history-hero-header h1 {
        font-size: var(--text-2xl);
    }

    .history-hero-body {
        flex-direction: row;
        align-items: center;
    }

    .history-hero-main {
        flex: 1;
    }

    .history-icon {
        font-size: 72px;
    }

    .history-years {
        font-size: 72px;
    }

    .history-hero-stats {
        flex: 1;
        grid-template-columns: repeat(2, 1fr);
    }

    .year-comparison-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==================== Minimal Calendar ==================== */
.calendar-card {
    max-width: 340px;
    margin: 0 auto var(--gap-md);
}

.calendar-card .card-body {
    padding: 0;
}

.calendar-wrapper {
    padding: 20px;
}

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    transition: background 0.15s;
}

.cal-nav-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.cal-nav-btn.disabled {
    opacity: 0.3;
    cursor: default;
}

.cal-title {
    font-size: 17px;
    font-weight: 600;
    color: #1f2937;
    min-width: 120px;
    text-align: center;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 8px;
}

.cal-weekdays span {
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    padding: 8px 0;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-day {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto;
    font-size: 15px;
    color: #374151;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.1s;
}

.cal-day:hover {
    background: #f3f4f6;
}

.cal-day.empty {
    visibility: hidden;
}

.cal-day.selected {
    background: #e5e7eb;
    font-weight: 500;
}

.cal-day.today {
    border: 2px solid #60a5fa;
    color: #2563eb;
}

.cal-day.today.selected {
    background: #dbeafe;
}

.cal-day.disabled {
    color: #d1d5db;
    pointer-events: none;
}

.cal-day.disabled:hover {
    background: transparent;
}

/* ==================== Dünya Sıralamaları Widget ==================== */
.widget-rankings {
    background: linear-gradient(135deg, var(--gray-50), var(--white));
}

.rankings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-sm);
}

.ranking-tab {
    flex: 1;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.ranking-tab:hover {
    background: var(--white);
    opacity: 0.9;
}

.ranking-tab.active {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    opacity: 1;
}

.rankings-content {
    position: relative;
}

.ranking-panel {
    display: none;
    animation: fadeIn 0.2s ease;
}

.ranking-panel.active {
    display: block;
}

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

.ranking-header {
    text-align: center;
    padding-bottom: var(--gap-sm);
    margin-bottom: var(--gap-sm);
    border-bottom: 1px solid var(--gray-200);
}

.ranking-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.ranking-desc {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

a.ranking-item,
.ranking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
    transition: all 0.15s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.ranking-item:hover,
.ranking-item:hover {
    border-color: var(--blue-200);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: translateX(2px);
}

.ranking-pos {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--gray-400);
    border-radius: 50%;
}

.ranking-item:nth-child(1) .ranking-pos {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.ranking-item:nth-child(2) .ranking-pos {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.ranking-item:nth-child(3) .ranking-pos {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.ranking-flag {
    font-size: 1.3rem;
    line-height: 1;
}

.ranking-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ranking-city {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ranking-country {
    font-size: 0.7rem;
    color: var(--gray-500);
}

.ranking-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.ranking-value .value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--blue-600);
}

.ranking-value .unit {
    font-size: 0.65rem;
    color: var(--gray-400);
}

/* ==================== Legal Pages (Hakkımızda, Gizlilik, vb.) ==================== */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

.legal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.legal-header {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.legal-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
}

.legal-intro {
    font-size: 1.1rem;
    color: var(--text-mid);
    margin-bottom: var(--space-sm);
}

.legal-date {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.legal-section {
    margin-bottom: var(--space-xl);
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--blue-500);
}

.legal-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.legal-section p {
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.legal-section ul,
.legal-section ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.legal-section li {
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: var(--space-sm);
}

.legal-section a {
    color: var(--blue-600);
    text-decoration: none;
    font-weight: 500;
}

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

.legal-notice {
    background: var(--blue-50);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--blue-500);
}

.legal-notice p {
    margin-bottom: 0;
    color: var(--gray-700);
}

/* Feature list for About page */
.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: var(--space-sm) 0;
    padding-left: var(--space-lg);
    position: relative;
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--green-500);
    font-weight: 700;
}

/* Data sources for About page */
.data-sources {
    display: grid;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.source-item {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.source-item strong {
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.source-item span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Contact cards */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-lg) 0;
}

.contact-card {
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.contact-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--space-sm);
    margin-top: 0;
}

.contact-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: var(--space-sm);
}

.contact-card a {
    color: var(--blue-600);
    font-weight: 500;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* FAQ list for Contact page */
.faq-list {
    margin: var(--space-lg) 0;
}

.faq-item {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--blue-500);
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 var(--space-sm) 0;
}

.faq-item p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.6;
}

/* Social links placeholder */
.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-placeholder {
    color: var(--gray-400);
    font-style: italic;
    font-size: 0.9rem;
}

/* Mobile responsive for legal pages */
@media (max-width: 768px) {
    .legal-page {
        padding: var(--space-md) var(--space-sm);
    }

    .legal-content {
        padding: var(--space-lg);
    }

    .legal-header h1 {
        font-size: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.25rem;
    }

    .contact-cards {
        grid-template-columns: 1fr;
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
