/* ============================
   БАЗОВЫЕ СТИЛИ
============================ */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #222;
    transition: background 0.3s, color 0.3s;
}

body.dark {
    background: #1c1c1c;
    color: #e5e5e5;
}

h2 {
	text-align: center;
	padding-right: 200px;
	padding-left: 50px;
	font-size: 20px;
}

/* ============================
   ПАНЕЛЬ КНОПОК (ТЕМА + ЯЗЫК)
============================ */
.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;

    display: flex;
    gap: 12px;

    z-index: 1000;
}

.top-controls button {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;

    border: none;
    border-radius: 10px;

    background: #ffffff;
    color: #222;

    cursor: pointer;
    transition: background 0.25s, color 0.25s, transform 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.top-controls button:hover {
    transform: translateY(-2px);
}

body.dark .top-controls button {
    background: #2f2f2f;
    color: #f0f0f0;
    box-shadow: 0 2px 6px rgba(255,255,255,0.08);
}

/* ============================
   КОНТЕЙНЕР ГОРОДОВ
============================ */
#cities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    padding: 20px;
}

/* ============================
   КАРТОЧКА ГОРОДА
============================ */
.city-card {
    background: #fff;
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s cubic-bezier(.25,.46,.45,.94),
                box-shadow 0.25s cubic-bezier(.25,.46,.45,.94),
                background 0.3s;
}

body.dark .city-card {
    background: #2a2a2a;
    box-shadow: 0 3px 12px rgba(255,255,255,0.05);
}

.city-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

body.dark .city-card:hover {
    box-shadow: 0 10px 28px rgba(255,255,255,0.12);
}

/* ============================
   ЗАГОЛОВОК ГОРОДА
============================ */
.city-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* ============================
   ТЕКУЩАЯ ПОГОДА
============================ */
.city-now {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.city-now .temp {
    font-size: 32px;
    font-weight: 700;
}

/* ============================
   ИКОНКИ ПОГОДЫ
============================ */
.icon {
    width: 36px;
    height: 36px;
    color: #000; /* светлая тема */
}

body.dark .icon {
    color: #fff; /* тёмная тема */
}

/* ============================
   БЛОК ДЕНЬ / НОЧЬ
============================ */
.parts {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.part {
    flex: 1;
    background: rgba(0,0,0,0.04);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    transition: background 0.3s;
}

body.dark .part {
    background: rgba(255,255,255,0.06);
}

.part .temp {
    font-size: 20px;
    font-weight: 600;
    margin: 6px 0;
}

.cond-block {
    font-size: 13px;
    opacity: 0.8;
}

/* ============================
   АДАПТИВНОСТЬ
============================ */
@media (max-width: 480px) {
    .city-now .temp {
        font-size: 28px;
    }
    .icon {
        width: 30px;
        height: 30px;
    }
}
