/* Баштапкы стилдер */
* { 
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif; 
}
body { 
    background: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?w=1920') no-repeat center fixed; 
    background-size: cover;
    min-height: 100vh;
    display: flex;
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 15px;
}

.header-container { 
    text-align: center;
    margin-bottom: 15px; 
}
#main-header { 
    color: white;
    font-size: 24px;
    text-transform: uppercase;
    font-weight: bold; 
}
#current-date { 
    color: white; 
    font-size: 16px; 
    margin-top: 5px; 
}

.app-container {
    width: 100%;
    max-width: 1050px;
    display: flex;
    justify-content: center;
}

.glass-layout { 
    display: flex;
    width: 100%; 
    min-height: 535px; 
    border-radius: 35px;
    overflow: hidden;
    position: relative; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.weather-main { 
    width: 62%; 
    background: rgba(46, 125, 50, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px;
    color: white; 
}

#city-name {
    font-size: 28px;
    margin-bottom: 5px;
}

.big-temp { 
    font-size: 85px; 
    font-weight: bold;
    margin: 5px 0;
}

.section-title {
    font-size: 16px;
    margin-top: 15px;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Сааттык Прогноз Карусель */
.carousel-container { 
    width: 100%; 
    overflow: hidden; 
}
.scroll-wrapper { 
    display: flex;
    gap: 12px;
    width: max-content; 
}
.infinite-anim { 
    animation: scrollLinear 30s linear infinite; 
}
.carousel-container:hover .infinite-anim {
    animation-play-state: paused;
}

@keyframes scrollLinear {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scroll-wrapper .card {
    min-width: 95px; 
    height: 120px;
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 15px;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 5 күндүк прогноз */
.fixed-weekly-row { 
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    gap: 10px; 
}
.fixed-weekly-row .card { 
    flex: 1;
    height: 115px;
    background: rgba(255, 255, 255, 0.25); 
    border-radius: 18px;
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: space-around;
}

/* Сайдбар */
.sidebar { 
    width: 38%;
    background: rgba(255, 255, 255, 0.98); 
    padding: 35px 25px; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.search-group label, #region-controls label {
    font-weight: 600;
    color: #333;
}

.globe-icon { 
    font-size: 26px; 
    cursor: pointer; 
    position: absolute;
    right: 5px;
    top: -5px;
    transition: transform 0.3s ease; 
}
.globe-icon:active {
    transform: scale(0.9);
}
.globe-icon.active { 
    filter: drop-shadow(0 0 8px #007BFF);
}

.search-row { 
    display: flex; 
    margin-top: 5px;
}
#city-input { 
    flex: 1;
    padding: 12px;
    border: 1px solid #ccc; 
    border-radius: 12px 0 0 12px;
    outline: none; 
    font-size: 16px;
}
#search-btn { 
    background: #2e7d32;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 12px 12px 0;
    cursor: pointer; 
    font-weight: bold; 
    font-size: 16px;
}
#search-btn:active {
    background: #1b5e20;
}

#region-controls {
    margin-top: 25px;
}

#region-select { 
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-top: 8px;
    font-size: 16px;
    outline: none;
}

.sidebar-footer p { 
    font-size: 14px; 
    font-weight: bold; 
    font-style: italic;
    text-align: right;
    border-top: 1px solid #eee; 
    padding-top: 15px;
    color: #666;
}

/* 📱 */
@media (max-width: 768px) {
    body {
        justify-content: flex-start;
        padding: 10px;
    }

    .glass-layout {
        flex-direction: column;
        height: auto;
        border-radius: 20px;
    }

    /* Издөө бөлүмү телефондо эң өйдө жагына чыкты */
    .sidebar {
        width: 100%;
        order: 1;
        padding: 20px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        background: rgba(255, 255, 255, 0.95);
    }

    /* Аба ырайы маалыматы издөөнүн астына келтирдим */
    .weather-main {
        width: 100%;
        order: 2;
        padding: 20px;
        text-align: center;
    }

    .globe-icon {
        right: 0;
        top: -5px;
    }

    .big-temp {
        font-size: 70px;
    }

    /* 5 күндүк прогноз телефондун экранына батыш үчүн ылайыкталды */
    .fixed-weekly-row {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .fixed-weekly-row .card {
        min-width: 65px;
        flex: 1 1 65px;
        height: 100px;
        padding: 5px;
    }

    .sidebar-footer {
        display: none;
    }
    
    #region-controls {
        margin-top: 15px;
    }
}
/* Сааттык Прогноз Карусель */
.carousel-container { 
    width: 100%; 
    overflow: hidden; 
}
.scroll-wrapper { 
    display: flex;
    gap: 12px;
    width: max-content; 
    cursor: pointer; /* Басууга боло тургандыгын көрсөтөт */
}
.infinite-anim { 
    animation: scrollLinear 30s linear infinite; 
}

/* Кодуңуздун туруктуу иштеши үчүн ховерди JS аркылуу башкарылуучу .paused классына алмаштырдык */
.scroll-wrapper.paused {
    animation-play-state: paused !important;
}

@keyframes scrollLinear {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scroll-wrapper .card {
    min-width: 95px; 
    height: 120px;
    background: rgba(255, 255, 255, 0.2); 
    border-radius: 15px;
    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    user-select: none; /* Телефондон басканда текст көк болуп белгиленип калбашы үчүн */
}