body {
    font-family: Arial, sans-serif;
    padding: 20px;
    background: #f5f5f5;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.title-row h1 {
    margin: 0;
}

#showHideRegionsBtn {
    padding: 8px 12px;
    border: none;
    border-radius: 7px;
    background: #2563eb;
    color: white;
    cursor: pointer;
    white-space: nowrap;
}

#showHideRegionsBtn:hover {
    background: #1d4ed8;
}

.region {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    padding: 8px;
    background: white;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.city {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    cursor: pointer;
    background: #fafafa;
    user-select: none;
    white-space: nowrap;
}

.city.center {
    font-weight: bold;
    border: 2px solid #333;
    min-width: 100px;
    text-align: center;
}

.city.selected {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

.toggle-btn {
    padding: 8px 10px;
    border: none;
    border-radius: 7px;
    background: #111827;
    color: white;
    cursor: pointer;
    white-space: nowrap;
}

.toggle-btn:hover {
    background: #374151;
}

.towns {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.towns.open {
    display: flex;
}.coord-modal-backdrop {
     display: none;
     position: fixed;
     inset: 0;
     background: rgba(0, 0, 0, 0.45);
     align-items: center;
     justify-content: center;
     z-index: 9999;
 }

.coord-modal-backdrop.open {
    display: flex;
}

.coord-modal {
    width: min(500px, 92vw);
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.coord-modal h2 {
    margin-top: 0;
    font-size: 20px;
}

#coordText {
    width: 100%;
    height: 130px;
    padding: 10px;
    resize: vertical;
    box-sizing: border-box;
    font-family: monospace;
}

.coord-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.coord-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
}

.copy-btn {
    background: #2563eb;
    color: white;
}

.close-btn {
    background: #e5e7eb;
}
.weather-row {
    margin-top: 24px;
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.weather-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.weather-temp {
    font-size: 34px;
    font-weight: 800;
    color: #374151;
    min-width: 95px;
}

.weather-details {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px 18px;
    font-size: 15px;
}

.weather-label {
    color: #6b7280;
}

.weather-value {
    font-weight: 700;
    color: #111827;
}
.weather-graph-row {
    margin-top: 14px;
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
}

.weather-graph-title {
    font-weight: 800;
    margin-bottom: 12px;
    color: #111827;
}

.temp-graph {
    display: flex;
    align-items: end;
    gap: 14px;
    height: 130px;
}

.temp-point {
    flex: 1;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.temp-bar {
    width: 100%;
    min-height: 18px;
    border-radius: 10px 10px 4px 4px;
    background: #93c5fd;
    margin-bottom: 8px;
}

.temp-value {
    font-weight: 700;
    color: #111827;
}
  .weather-chart-row {
      margin-top: 14px;
      padding: 16px;
      background: white;
      border: 1px solid #ddd;
      border-radius: 14px;
  }

.weather-chart-title {
    font-weight: 800;
    margin-bottom: 10px;
    color: #111827;
}

.weather-chart-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    touch-action: pan-y;
    cursor: grab;
}



.weather-chart-scroll:active {
    cursor: grabbing;
}



#hourlyTempCanvas {
    display: block;
    height: 190px;
}
.daily-weather-row {
    margin-top: 14px;
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
}

.daily-weather-title {
    font-weight: 800;
    margin-bottom: 14px;
    color: #111827;
}

.daily-weather-list {
    display: grid;
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    gap: 12px;
}

.daily-weather-item {
    min-height: 150px;
    padding: 12px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f9fafb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
.daily-weather-item {
    cursor: pointer;
    transition: 0.2s ease;
}

.daily-weather-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.daily-weather-item-selected {
    border-color: #f5b400;
    background: #fff7db;
}
.daily-weather-day {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    text-align: center;
}

.daily-weather-icon {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.daily-weather-temp {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
}
@media (max-width: 900px) {
    .daily-weather-list {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
        scroll-behavior: smooth;
    }

    .daily-weather-item {
        min-width: 110px;
        flex: 0 0 110px;
    }
}






.weather-extra-details {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px 18px;
    font-size: 15px;
    padding-left: 18px;
    border-left: 1px solid #e5e7eb;
    align-items: center;
}

.weather-extra-title {
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.weather-extra-value {
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
}


.weather-item {
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: max-content;
}

.weather-item-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}



.weather-items-row {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
}

.weather-hour-item {
    padding: 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: max-content;
    flex: 0 0 auto;
}

.weather-hour-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.weather-hour-temp {
    font-size: 30px;
    font-weight: 800;
    color: #374151;
}

.weather-hour-icon {
    width: 90px;
    height: 90px;
    object-fit: contain;
}
.weather-hour-time {
    font-weight: 900;
    color: #dc2626;
    font-size: 17px;
    margin-bottom: 2px;
}
.weather-hour-details {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px 18px;
    font-size: 15px;
    padding-left: 18px;
    border-left: 1px solid #e5e7eb;
    align-items: center;
}
.weather-items-row {
    margin-top: 14px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    cursor: grab;
    touch-action: pan-x;
    user-select: none;
}

.weather-items-row:active {
    cursor: grabbing;
}

.weather-hour-item {
    flex: 0 0 auto;
}
.weather-source-title {
    margin-left: auto;
    margin-right: 0;
    font-size: 18px;
    font-weight: 700;
    color: #374151;
}


.hourly-weather-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    padding-bottom: 8px;
    cursor: grab;
}

.hourly-weather-row:active {
    cursor: grabbing;
}

.hourly-weather-item {
    flex: 0 0 auto;
    min-width: 72px;
}
