/**
 * WeatherGet - Mobile App Style Theme
 * Adapted from HavaDurumu
 */

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

    /* Gray tones */
    --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;

    /* Blue tones */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-200: #bfdbfe;
    --blue-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;

    /* Other colors */
    --green-500: #22c55e;
    --yellow-500: #eab308;
    --orange-500: #f97316;
    --red-500: #ef4444;

    /* Theme */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-dark: #0f172a;
    --text-mid: #475569;
    --text-light: #94a3b8;
    --border: #e2e8f0;

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

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

    /* Shadows */
    --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);
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

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

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

img, svg {
    max-width: 100%;
    display: block;
    vertical-align: middle;
}

ul, ol {
    list-style: none;
}

button, input {
    font: inherit;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ==================== Layout ==================== */
.wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 12px;
}

.lay {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    gap: 16px;
}

.sl, .sr {
    display: none;
}

.main {
    flex: 1;
}

@media (min-width: 768px) {
    .lay {
        flex-direction: row;
    }
    .sl {
        display: block;
        width: 220px;
        flex-shrink: 0;
    }
    .main {
        flex: 1;
        min-width: 0;
    }
}

@media (min-width: 1200px) {
    .sr {
        display: block;
        width: 280px;
        flex-shrink: 0;
    }
}

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

.hdr .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
}

.logo svg {
    width: 28px;
    height: 28px;
}

.logo span {
    color: var(--blue-600);
}

/* Top Navigation */
.top-nav {
    display: none;
    align-items: center;
    gap: 4px;
    flex: 1;
    margin-left: 16px;
}

@media (min-width: 768px) {
    .top-nav {
        display: flex;
    }
}

.top-nav a {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-mid);
    border-radius: 6px;
    transition: all 0.15s;
}

.top-nav a:hover {
    background: var(--gray-100);
    color: var(--text-dark);
}

.top-nav a.active {
    background: var(--blue-600);
    color: #fff;
}

/* Header Right */
.hdr-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* Search */
.srch {
    position: relative;
    width: 160px;
}

@media (min-width: 1024px) {
    .srch {
        width: 220px;
    }
}

.srch input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    background: var(--gray-100);
    color: var(--text-dark);
}

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

.srch svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--gray-400);
}

.srch-res {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 101;
    max-height: 300px;
    overflow-y: auto;
}

.srch-res:not(:empty) {
    display: block;
}

.srch-res a {
    display: block;
    padding: 10px 12px;
    font-size: 14px;
}

.srch-res a:hover {
    background: var(--gray-50);
}

/* Language */
.lang {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
}

.lang-btn img {
    width: 18px;
    height: 13px;
    border-radius: 2px;
}

.lang-dd {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: none;
    min-width: 140px;
    z-index: 100;
}

.lang-dd.open {
    display: block;
}

.lang-dd a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13px;
}

.lang-dd a:hover {
    background: var(--gray-50);
}

.lang-dd img {
    width: 18px;
    height: 13px;
    border-radius: 2px;
}

/* Mobile Menu */
.mbtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.mbtn svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 768px) {
    .mbtn {
        display: none;
    }
}

.nav {
    display: none;
}

.nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.nav a {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}

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

/* ==================== Breadcrumb ==================== */
.bread {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

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

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

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

.card-head {
    display: flex;
    align-items: center;
    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%);
}

.card-head svg {
    width: 18px;
    height: 18px;
    color: var(--blue-600);
}

.card-head img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.card-date {
    margin-left: auto;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-light);
}

.card-body {
    padding: 16px;
}

.mb1 {
    margin-bottom: 16px;
}

/* ==================== Weather Card ==================== */
.weather-card {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

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

.wc-title h1 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.wc-title h1 img {
    width: 22px;
    height: 16px;
    border-radius: 2px;
}

.wc-title p {
    font-size: 12px;
    color: var(--text-mid);
    margin: 2px 0 0;
}

.wc-date {
    font-size: 12px;
    color: var(--text-mid);
    white-space: nowrap;
}

.wc-body {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    gap: 12px;
}

@media (min-width: 600px) {
    .wc-body {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

/* Temperature Section */
.wc-temp {
    text-align: center;
    padding: 8px 0;
}

@media (min-width: 600px) {
    .wc-temp {
        flex: 0 0 auto;
        padding: 0;
    }
}

.wc-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 4px;
}

@media (min-width: 600px) {
    .wc-icon {
        width: 100px;
        height: 100px;
    }
}

.wc-degrees {
    font-size: 52px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -2px;
    margin: 4px 0;
    color: var(--text-dark);
}

.wc-cond {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 2px;
}

.wc-feels {
    font-size: 13px;
    color: var(--text-light);
}

/* Details Grid */
.wc-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid var(--border);
}

@media (min-width: 600px) {
    .wc-details {
        flex: 1;
    }
}

@media (min-width: 1024px) {
    .wc-details {
        grid-template-columns: repeat(4, 1fr);
    }
}

.wcd-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: var(--gray-50);
    border-radius: 6px;
    transition: background 0.2s;
}

.wcd-item:hover {
    background: var(--gray-100);
}

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

.wcd-label {
    font-size: 10px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

.wcd-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

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

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

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

.hourly-item.now {
    background: linear-gradient(180deg, var(--blue-600) 0%, var(--blue-500) 100%);
    border-color: var(--blue-600);
    color: #fff;
}

.hourly-item.now .hourly-time,
.hourly-item.now .hourly-temp {
    color: #fff;
}

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

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

.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;
}

.hourly-item.now .hourly-rain {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ==================== Daily List ==================== */
.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;
}

.daily-day-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.daily-day-date {
    font-size: 11px;
    color: var(--text-light);
}

.daily-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

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

.daily-cond {
    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;
}

/* ==================== AQI ==================== */
.aqi-box {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
}

.aqi-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.aqi-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.aqi-lbl {
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.9;
}

.aqi-txt {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

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

.aqi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.aqi-item {
    padding: 10px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--gray-100);
}

.aqi-item-lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-light);
}

.aqi-item-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 2px;
}

/* ==================== Sidebar ==================== */
.sidebar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sb-sec {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
}

.sb-sec:last-child {
    border-bottom: none;
}

.sb-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--blue-600);
    margin-bottom: 12px;
}

.sb-title img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}

.sb-title svg {
    width: 14px;
    height: 14px;
}

.sb-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--text-mid);
    border-radius: 6px;
    transition: all 0.15s;
}

.sb-links a:hover {
    background: var(--gray-50);
    color: var(--text-dark);
}

.sb-links a img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    margin-right: 8px;
}

.sb-links .count {
    font-size: 12px;
    color: var(--text-light);
}

/* ==================== Widget ==================== */
.widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.widget:last-child {
    margin-bottom: 0;
}

.wgt-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.wgt-head svg {
    width: 16px;
    height: 16px;
    color: var(--blue-600);
}

.wgt-body {
    padding: 16px;
}

/* Sun/Moon Widget */
.sun-moon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    text-align: center;
}

.sun-item {
    text-align: center;
}

.sun-item-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 6px;
}

.sun-item-icon svg {
    width: 100%;
    height: 100%;
}

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

.sun-item-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 2px;
}

/* Tips Widget */
.tip-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}

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

.tip-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.tip-icon.cold {
    background: var(--blue-100);
}

.tip-icon.energy {
    background: #fef3c7;
}

.tip-icon.pipe {
    background: #fce7f3;
}

.tip-icon.health {
    background: #dcfce7;
}

.tip-content {
    flex: 1;
}

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

.tip-desc {
    font-size: 12px;
    color: var(--text-mid);
    margin-top: 2px;
}

/* ==================== About ==================== */
.about h2 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.about p {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ==================== Footer ==================== */
.ftr {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 32px;
}

.ftr-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .ftr-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ftr-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.ftr-links a {
    display: block;
    font-size: 13px;
    color: var(--text-mid);
    padding: 4px 0;
}

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

.ftr-btm {
    border-top: 1px solid var(--border);
    margin-top: 24px;
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
}

/* ==================== Utilities ==================== */
.hide {
    display: none;
}

@media (max-width: 767px) {
    .hide-m {
        display: none;
    }
}

/* ==================== Print ==================== */
@media print {
    .hdr, .ftr, .sl, .sr {
        display: none;
    }
}
