.weather-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    perspective: 1000px;
    margin-bottom: 30px;
}

.flip-card {
    background-color: transparent;
    width: 250px;
    height: 320px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.flip-card-front {
    background-color: var(--bg-color-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.weather-icon { font-size: 60px; margin-bottom: 10px; }
.weather-title { font-size: 22px; font-weight: 800; margin-bottom: 5px; }
.weather-rarity { font-size: 14px; opacity: 0.7; font-style: italic; }

.flip-card-back {
    background-color: #1e1e1e;
    color: #fff;
    transform: rotateY(180deg);
    border: 1px solid #333;
    text-align: left;
}

.back-header {
    font-size: 14px;
    text-transform: uppercase;
    font-weight: bold;
    color: #90CAF9;
    margin-top: 10px;
    margin-bottom: 2px;
}

.flip-card-back p {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.flip-card-back p:last-child { border-bottom: none; }

@media (max-width: 768px) {
    .flip-card {
        width: 100%;
        max-width: 350px;
        height: 280px;
    }
}

