* {
    -webkit-tap-highlight-color: transparent;
}

/* HAVA DURUMU SAYFASI */
.weather-page {
    width: min(1100px, 94%);
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding: 16px 0 40px;
    color: var(--text, #f1f5f9);
    overflow-x: clip;
}

.weather-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 0 12px;
    padding-top: 2px;
}

.weather-header h1 {
    width: 100%;
    margin: 0;
    text-align: center;
    font-size: clamp(36px, 5vw, 46px);
    line-height: 1.2;
}

.weather-toolbar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.toolbar-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}


.weather-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    color: var(--muted, #94a3b8);
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid var(--border, #334155);
    border-radius: 9px;
    outline-offset: -2px;
    -webkit-tap-highlight-color: transparent;
    font-size: 14px;
}

.weather-status {
    color: var(--muted, #94a3b8);
    margin: 0;
    line-height: 1.4;
    overflow-wrap: anywhere;
    font-size: 12px;
    text-align: right;
}


.location-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.location-area input {
    width: 250px;
    min-width: 0;
    padding: 10px 11px;
    color: var(--text, #f1f5f9);
    background: var(--surface, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 9px;
    font-size: 14px;
}

.location-area button {
    flex: 0 0 38px;
    width: 38px;
    min-height: 38px;
    padding: 0;
    color: white;
    background: var(--accent, #2563eb);
    border: 0;
    border-radius: 9px;
    font-size: 20px;
    cursor: pointer;
}



.search-results {
    display: none;
    position: absolute;
    z-index: 10;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 10px;
}

.search-results.visible {
    display: block;
}

.search-result {
    display: block;
    width: 100%;
    min-height: 0;
    padding: 12px;
    color: var(--text, #f1f5f9);
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    cursor: pointer;
}
.location-area .search-result-button {
    display: block;
    flex: none;
    width: 100%;
    min-height: 0;
    padding: 12px;
    color: var(--text, #f1f5f9);
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 14px;
}

.search-result:hover {
    background: var(--surface-hover, #334155);
}

.current-weather,
.detail-section {
    min-width: 0;
    max-width: 100%;
    padding: 20px;
    background: rgba(15, 23, 42, .22);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 0;
    border-radius: 18px;
}

.current-top {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 1.4fr) minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.weather-location-block {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 0;
    justify-self: start;
}

.weather-summary-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    align-self: end;
}

.weather-summary-left {
    grid-column: 1;
    grid-row: 1;
}

.weather-summary-right {
    grid-column: 3;
    grid-row: 1;
}

.weather-center {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.weather-update-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    min-width: 0;
    justify-self: end;
    max-width: 100%;
}

.eyebrow {
    color: var(--muted, #94a3b8);
    margin: 0 0 4px;
}

.location-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    min-height: 22px;
    margin-bottom: 4px;
}

.location-title-row .eyebrow {
    margin: 0;
    line-height: 22px;
}

.location-detail {
    color: var(--muted, #94a3b8);
    margin: 0 0 10px;
    font-size: 12px;
}

.refresh-location-button {
    display: inline-grid;
    flex: 0 0 22px;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    color: var(--accent, #60a5fa);
    background: transparent !important;
    border: 0 !important;
    border-radius: 50%;
    cursor: pointer;
    transition: color .2s, transform .2s, opacity .2s;
}

.refresh-location-button svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.refresh-location-button:hover {
    color: var(--text, #f1f5f9);
    background: transparent !important;
    transform: rotate(-25deg);
}

.refresh-location-button:disabled {
    cursor: wait;
    opacity: .65;
}

.refresh-location-button.is-refreshing {
    animation: location-refresh-spin .8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .refresh-location-button.is-refreshing { animation-duration: 2s; }
}
.weather-center h2 {
    margin: 0;
    font-size: 22px;
}

.temperature {
    margin: 8px 0 0;
    font-size: clamp(58px, 12vw, 90px);
    font-weight: 700;
    line-height: 1.1;
}

.weather-symbol {
    display: block;
    margin: 0 0 7px;
    font-size: clamp(64px, 9vw, 86px);
    line-height: .82;
}

.high-low {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: min(230px, 100%);
    max-width: 230px;
    margin: 8px 0 0;
    color: var(--muted, #94a3b8);
    font-size: 16px;
}
.high-low strong {
    color: var(--text, #f1f5f9);
    font-weight: 600;
}


.summary-item,
.detail-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
    padding: 16px 11px;
    background: rgba(15, 23, 42, .22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 0;
    border-radius: 12px;
}

.summary-item {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 5px;
}

.summary-item span {
    min-width: 0;
    color: var(--text, #f1f5f9);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
}

.summary-item strong {
    flex: 0 0 auto;
    color: var(--muted, #94a3b8);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.detail-card {
    padding: 11px;
}

.detail-card span {
    color: var(--muted, #94a3b8);
    font-size: 13px;
}

.detail-card strong {
    font-size: 20px;
    font-weight: 700;
}

.details-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 12px 0;
    padding: 12px;
    color: var(--text, #f1f5f9);
    background: var(--surface, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
}

.details-toggle:hover {
    background: var(--surface-hover, #334155);
}

.weather-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.weather-details > .detail-section {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.detail-section h2 {
    margin: 0 0 18px;
    font-size: 20px;
}

.hourly-slider {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.hourly-forecast {
    display: flex;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
}

.hour-card {
    flex: 0 0 105px;
    width: 105px;
    min-width: 105px;
    padding: 14px 8px;
    text-align: center;
    background: rgba(15, 23, 42, .22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 0;
    border-radius: 12px;
    scroll-snap-align: start;
}

.hour-card span,
.hour-card strong {
    display: block;
    margin: 7px 0;
}

.hour-card .hour-icon {
    font-size: 25px;
}

.hourly-nav {
    width: 38px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--text, #f1f5f9);
    background: var(--background, #111827);
    border: 1px solid var(--border, #334155);
    border-radius: 10px;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.hourly-nav:disabled {
    opacity: .3;
    cursor: default;
}

.hourly-hint {
    margin: 10px 0 0;
    color: var(--muted, #94a3b8);
    font-size: 12px;
    text-align: center;
}

.daily-forecast {
    display: grid;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.day-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 40px minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    background: rgba(15, 23, 42, .22);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 0;
    border-radius: 10px;
}

.day-icon {
    font-size: 23px;
}

.day-rain {
    color: var(--muted, #94a3b8);
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

.weather-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 24px;
    color: var(--muted, #94a3b8);
    text-align: center;
    font-size: 12px;
}

.weather-photo-credit {
    max-width: 100%;
    color: var(--muted, #94a3b8);
    font-size: 10px;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.weather-photo-credit:hover {
    color: var(--text, #f1f5f9);
    text-decoration: underline;
}

.current-weather {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: background-image .25s ease;
}

[hidden] {
    display: none !important;
}

@media (max-width: 650px) {
    .weather-page { width: calc(100% - 20px); padding: 7px 0 24px; }
    .weather-header { margin-bottom: 4px; padding-top: 0; }
    .weather-header h1 { font-size: 34px; }
    .weather-toolbar { margin-bottom: 7px; }
    .current-weather { padding: 10px; }
    .current-top {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
        align-items: center;
        gap: 5px;
    }
    .weather-location-block { top: 0; left: 0; }
    .weather-update-panel {
        top: 0;
        right: 0;
        gap: 7px;
        justify-self: end;
        max-width: 100%;
    }
    .weather-summary-side { gap: 7px; align-self: end; }
    .weather-center {
        grid-column: 2;
        grid-row: 1;
        padding-top: 0;
        gap: 0;
    }
    .weather-center h2 {
        margin: 0;
        font-size: 17px;
        line-height: 1;
    }
    .weather-status { max-width: 135px; font-size: 10px; }
    .temperature {
        margin: 0;
        font-size: clamp(46px, 9vw, 60px);
        line-height: 1;
    }
    .weather-symbol {
        display: block;
        margin: 0 0 6px;
        font-size: clamp(54px, 11vw, 68px);
        line-height: .82;
    }
    .high-low { margin-top: 5px; font-size: 14px; }
    .summary-item {
        gap: 5px;
        padding: 14px 10px;
        border-radius: 9px;
    }
    .summary-item span { font-size: 14px; }
    .summary-item strong { font-size: 17px; }
    .location-carousel-controls { min-height: 32px; margin: 3px 0 5px; gap: 5px; }
    .location-nav { flex-basis: 27px; width: 27px; height: 27px; }
    .details-toggle { margin: 5px 0; padding: 9px; font-size: 14px; }
    .toolbar-main { gap: 10px; }
    .weather-meta { flex: 0 0 auto; }
    .location-area { flex: 1 1 auto; justify-content: flex-end; gap: 4px; }
    .location-area input { width: 100%; min-width: 0; flex: 1 1 auto; }
    .location-area button { flex: 0 0 38px; width: 38px; padding: 0; }
    .back-button, .location-button { white-space: nowrap; padding: 8px 12px; font-size: 13px; }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .current-weather, .detail-section { padding: 10px; }
    .detail-card { padding: 9px; }
    .detail-card span { font-size: 12px; }
    .detail-card strong { font-size: 19px; font-weight: 700; }
    .hourly-slider { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 6px; }
    .hourly-nav { width: 32px; height: 40px; }
    .hour-card { flex-basis: 96px; width: 96px; min-width: 96px; }
    .day-row {
        grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr) minmax(0, 1fr);
        gap: 6px;
        font-size: 13px;
    }
}

/* Kayıtlı konum sekmeleri */
.location-carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin: 10px 0 18px;
    min-width: 0;
}
.location-nav {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--text, #f1f5f9);
    background: var(--surface, #1e293b);
    border: 1px solid var(--border, #334155);
    border-radius: 10px;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.location-nav:disabled {
    opacity: .3;
    cursor: default;
}
.location-indicators {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 5px 2px 9px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}
.location-indicators::-webkit-scrollbar {
    display: none;
}
.location-tab-item {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    flex: 0 0 calc((100% - 24px) / 4);
    width: calc((100% - 24px) / 4);
    min-width: 0;
    gap: 4px;
    max-width: none;
    scroll-snap-align: start;
    padding: 3px 5px 3px 10px;
    background: var(--background, #111827);
    border: 1px solid var(--border, #334155);
    border-radius: 10px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity .15s, border-color .15s, transform .15s;
}
.location-tab-item.active {
    border-color: var(--accent, #2563eb);
    background: var(--surface, #1e293b);
}
.location-tab-item.dragging {
    opacity: .4;
    transform: scale(.96);
    cursor: grabbing;
}
.location-tab-item.drag-over {
    border-color: var(--accent, #60a5fa);
    transform: scale(1.04);
}
.location-tab {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
    width: 0;
    max-width: none;
    padding: 5px 2px;
    overflow: hidden;
    color: var(--muted, #94a3b8);
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    text-align: left;
}
.location-tab-name {
    display: inline-block;
    width: max-content;
    max-width: none;
    white-space: nowrap;
}
.location-tab.is-marquee .location-tab-name {
    max-width: none;
    animation: location-name-marquee var(--marquee-duration, 3s) linear infinite alternate;
}
@keyframes location-name-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-1 * var(--marquee-distance))); }
}
@media (prefers-reduced-motion: reduce) {
    .location-tab.is-marquee .location-tab-name { animation-duration: 16s; }
}
.location-tab.active {
    color: var(--text, #f1f5f9);
}
.location-remove-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    padding: 0;
    color: var(--muted, #94a3b8);
    background: transparent;
    border: 0;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}
.location-remove-button:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, .12);
}
.location-counter {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    white-space: nowrap;
    color: var(--muted, #94a3b8);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
/* Eski kart tamamen çıkar, yeni kart arkasından aynı yönde girer */
.current-weather.location-changing-next {
    animation: weather-card-in-next .38s cubic-bezier(.22, .7, .25, 1) both;
    will-change: transform;
}
.current-weather.location-changing-prev {
    animation: weather-card-in-prev .38s cubic-bezier(.22, .7, .25, 1) both;
    will-change: transform;
}
.weather-card-outgoing {
    position: fixed !important;
    z-index: 999 !important;
    margin: 0 !important;
    pointer-events: none !important;
    overflow: hidden;
    will-change: transform;
}
.weather-card-outgoing.out-next {
    animation: weather-card-out-next .38s cubic-bezier(.22, .7, .25, 1) both;
}
.weather-card-outgoing.out-prev {
    animation: weather-card-out-prev .38s cubic-bezier(.22, .7, .25, 1) both;
}
@keyframes weather-card-out-next {
    from { transform: translateX(0); }
    to { transform: translateX(-105%); }
}
@keyframes weather-card-in-next {
    from { transform: translateX(105%); }
    to { transform: translateX(0); }
}
@keyframes weather-card-out-prev {
    from { transform: translateX(0); }
    to { transform: translateX(105%); }
}
@keyframes weather-card-in-prev {
    from { transform: translateX(-105%); }
    to { transform: translateX(0); }
}
.search-result-button {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.search-result-button::after {
    content: "＋";
    flex: 0 0 auto;
    color: var(--accent, #60a5fa);
    font-size: 19px;
    font-weight: 700;
}
@media (prefers-reduced-motion: reduce) {
    .current-weather.location-changing-next,
    .current-weather.location-changing-prev,
    .weather-card-outgoing { animation: none !important; }
}


.location-tab-touch-ghost,
.location-tab-drag-ghost {
    position: fixed !important;
    z-index: 10000 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    padding: 3px 5px 3px 10px !important;
    overflow: hidden;
    opacity: .45 !important;
    background: var(--surface, #1e293b) !important;
    border: 1px solid var(--accent, #60a5fa) !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .22);
    pointer-events: none !important;
    transform: scale(.88) !important;
    transform-origin: center center;
}
.location-tab-touch-ghost .location-remove-button,
.location-tab-drag-ghost .location-remove-button {
    display: none !important;
}
.location-tab-item.dragging {
    opacity: .2;
}

/* Sabit mevcut konum sekmesi ve elle konum yenileme düğmesi */
.current-location-fixed {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    padding: 3px 5px 3px 9px;
    background: var(--background, #111827);
    border: 1px solid var(--border, #334155);
    border-radius: 10px;
}
.current-location-fixed .location-tab {
    flex: 0 0 auto;
    width: auto;
    max-width: 130px;
    padding: 5px 2px;
}
.current-location-refresh {
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    color: var(--accent, #60a5fa);
    background: transparent;
    border: 0;
    border-radius: 7px;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}
.location-title-row .current-location-refresh { align-self: center; }
.current-location-refresh:disabled { opacity: .5; cursor: wait; }
@media (max-width: 650px) {
    .current-location-fixed { gap: 1px; padding: 2px 3px 2px 6px; }
    .current-location-fixed .location-tab { flex: 0 0 auto; width: auto; font-size: 11px; max-width: 105px; }
    .location-title-row .current-location-refresh { flex-basis: 30px; width: 30px; height: 30px; }
}

.weather-photo-authors {
    max-width: 100%;
    color: var(--muted, #94a3b8);
    font-size: 10px;
    overflow-wrap: anywhere;
}
.weather-photo-authors a {
    color: inherit;
    text-decoration: underline;
}
.weather-photo-authors a:hover {
    color: var(--text, #f1f5f9);
}
