* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    /* Fontu Poppins yaptık */
}

body {
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(87, 199, 119, 1) 50%, rgba(255, 197, 51, 1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    color: white;
}

body.default {
    background: #020024;
    background: linear-gradient(90deg, rgba(2, 0, 36, 1) 0%, rgba(3, 247, 235, 1) 39%, rgba(183, 72, 247, 1) 100%);
    background-attachment: fixed;
}

body.sunny {
    background: #78d9ff;
    background: linear-gradient(319deg,rgba(120, 217, 255, 1) 32%, rgba(87, 199, 184, 1) 67%, rgba(237, 221, 83, 1) 75%);
    background-attachment: fixed;
}

body.rainy {
    background: linear-gradient(to bottom, #202020, #111119);
    background-attachment: fixed;
}
.pwabutton{
    position: absolute;
    top: 30px;    
    right: 40px;  
    z-index: 1000; 
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: bold;
    background-color: #4A90E2;
    color: white;
    border: none;
    outline: none;/* bu none olan kodlar djangonun kendi koyduğu renk ve dokunuşları silmemizi sağlıyor bunları kullanmak önemli */
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* YAĞMUR KONTEYNERİ (Kutuların arkasında duran sabit katman) */
.rain-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    /* Tıklamaları engellemesin */
}

body.rainy .rain-container {
    display: block;
    /* Sadece yağmurluysa görünür! */
}

.rain {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
}

.rain.back-row {
    bottom: 60px;
    opacity: 0.5;
}

.drop {
    position: absolute;
    bottom: 100%;
    width: 15px;
    height: 120px;
    pointer-events: none;
    animation: drop 0.5s linear infinite;
}

@keyframes drop {
    0% {
        transform: translateY(0vh);
    }

    75% {
        transform: translateY(90vh);
    }

    100% {
        transform: translateY(90vh);
    }
}

.stem {
    width: 1px;
    height: 60%;
    margin-left: 7px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.25));
    animation: stem 0.5s linear infinite;
}

@keyframes stem {

    0%,
    65% {
        opacity: 1;
    }

    75%,
    100% {
        opacity: 0;
    }
}

.splat {
    width: 15px;
    height: 10px;
    border-top: 2px dotted rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    opacity: 1;
    transform: scale(0);
    animation: splat 0.5s linear infinite;
}

@keyframes splat {

    0%,
    80% {
        opacity: 1;
        transform: scale(0);
    }

    90% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.search-container {
    margin-bottom: 40px;
    width: 100%;
    max-width: 400px;
}

.search-container form {
    display: flex;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.search-btn {
    padding: 12px 25px;
    border-radius: 30px;
    border: none;
    background: white;
    color: #18085c;
    font-weight: 600;
    cursor: pointer;
}

/* Dashboard Yerleşimi */
.dashboard-wrapper {
    width: 100%;
    max-width: 1200px;
}

.bento-grid {
    display: grid;
    /* 1. Kolon (Nem/Konfor), 2. Kolon (Rüzgar/Hissedilen), 3. Kolon (Sağ Kutu) */
    grid-template-columns: 1fr 1fr 1.2fr;

    /* 1. Satır otomatik, 2. ve 3. satırlar birbirine tamamen eşit (1fr) olacak */
    grid-template-rows: auto 1fr 1fr;
    gap: 20px;
    width: 100%;
}

/* Glassmorphism Kutular */
.box {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.main-box {
    grid-column: 1 / 3;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.city-name {
    font-size: 2.5rem;
    font-weight: 800;
}

.temperature {
    font-size: 4.5rem;
    font-weight: 800;
    color: #ffffff;
}

.ai-comment-section {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.15);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #f87171;
}

.ai-comment {
    font-style: italic;
    line-height: 1.6;
    font-weight: 300;
}

.detail-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
    width: 100%;
}

.label {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.value {
    font-size: 1.8rem;
    font-weight: 600;
}


.side-box {
    grid-column: 3;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Aşağıdaki kutularla aynı hizada bitmesi için tam uzatıyoruz */
}

.side-box h3 {
    margin-bottom: 20px;
    font-weight: 600;
}

.hour-item {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 10px;
}

.spotify-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.spotify-widget:hover {
    transform: translateY(-5px);
    /* Üzerine gelince hafif kalkma efekti */
    background: rgba(255, 255, 255, 0.12);
}

.spotify-cover {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.spotify-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    color: white;
}

.spotify-link-btn {
    background: #1DB954;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    width: 100%;
    display: inline-block;
}

.spotify-link-btn:hover {
    background: #1ed760;
    transform: scale(1.05);
}

.playlist-heading {
    margin-top: 30px;
    /* Üstteki saatlik tahminlerle arayı açar */
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    /* Çizimindeki gibi sola yaslı veya center yapabilirsin */
}

.logo-container {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 100;
}

.site-logo {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.08);
}