/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(125deg, #0b2b3b 0%, #1a4a6f 50%, #2c5f7a 100%);
    min-height: 100vh;
    font-family: 'Inter', 'Segoe UI', 'Roboto', system-ui, -apple-system, sans-serif;
    padding: 2rem 2rem 1.5rem;
    position: relative;
}

/* декоративные элементы для заполнения пространства */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,240,0.08) 0%, rgba(0,0,0,0) 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "⛅";
    font-size: 280px;
    position: fixed;
    bottom: -60px;
    right: -60px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
    font-family: monospace;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* шапка с кнопкой */
.header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.7rem 1.8rem;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.02);
}

/* заголовок страницы для ритма */
.page-title {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.3px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-title p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* сетка карточек — более просторная, но не пустая */
.cities-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0 2rem;
}

/* карточка — с воздухом, но не сжатая */
.weather-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(2px);
    border-radius: 2rem;
    width: 320px;
    padding: 1.6rem 1.5rem 1.8rem;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.weather-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 40px -15px rgba(0, 0, 0, 0.4);
    background: white;
}

/* город с иконкой */
.city-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    border-bottom: 2px solid #e9f0f5;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
}

.city-name {
    font-size: 1.9rem;
    font-weight: 700;
    color: #1a3e50;
    letter-spacing: -0.3px;
}

.city-icon {
    font-size: 1.8rem;
    opacity: 0.7;
}

/* время — крупно и выразительно */
.time-block {
    background: linear-gradient(115deg, #f0f6fa 0%, #ffffff 100%);
    border-radius: 1.5rem;
    padding: 0.9rem 0.5rem;
    text-align: center;
    margin-bottom: 1.3rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02), 0 2px 6px rgba(0,0,0,0.05);
}

.current-time {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: #0f2f3c;
    letter-spacing: 2px;
}

.current-date {
    font-size: 0.85rem;
    color: #4f6f82;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* погода главная */
.weather-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background: #f9fdfe;
    border-radius: 1.2rem;
    padding: 0.6rem 1rem;
}

.temp-block {
    text-align: left;
}

.temp {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1b4e6e;
    line-height: 1;
}

.temp span {
    font-size: 1.2rem;
    font-weight: 500;
    color: #5f7f96;
}

.desc {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c5e7a;
    background: #eef3f8;
    display: inline-block;
    padding: 0.2rem 1rem;
    border-radius: 40px;
    margin-top: 0.3rem;
}

.weather-emoji {
    font-size: 3rem;
    background: rgba(200, 225, 240, 0.4);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 60px;
}

/* детали погоды в сетке 2x2 */
.weather-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin: 1rem 0 0.8rem;
}

.detail-card {
    background: #f1f7fb;
    border-radius: 1rem;
    padding: 0.6rem 0.3rem;
    text-align: center;
    transition: all 0.2s;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #5b7e94;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1d4b67;
    margin-top: 0.2rem;
}

.feels-like-block {
    background: #eaf2f7;
    border-radius: 1rem;
    padding: 0.5rem;
    text-align: center;
    margin-top: 0.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1d5b7a;
}

.refresh-note {
    font-size: 0.65rem;
    text-align: center;
    color: #8aaec2;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #cbdde6;
}

/* футер */
footer {
    text-align: center;
    margin-top: 2.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    padding: 0.5rem 1.8rem;
    border-radius: 60px;
}

/* адаптивность */
@media (max-width: 750px) {
    body {
        padding: 1.2rem;
    }
    .weather-card {
        width: 100%;
        max-width: 340px;
    }
    .current-time {
        font-size: 1.8rem;
    }
    .temp {
        font-size: 2.3rem;
    }
    .page-title h1 {
        font-size: 1.6rem;
    }
}