/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    background: #eef3ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Main wrapper */
.wrapper {
    width: 95%;
    max-width: 420px;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
    text-align: center;
}

/* Heading */
h1 {
    margin-bottom: 20px;
    color: #2c2c2c;
}

/* Tabs */
.tab-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    background: #f2f5ff;
    color: #555;
    transition: 0.3s;
}

.current-tab {
    background: #4a90e2;
    color: white;
}

/* Fix container name */
.weather_container {
    width: 100%;
}

/* Grant Location */
.grant-location-container {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.grant-location-container.active {
    display: flex;
}

/* Search Form (FIXED ALIGNMENT) */
.form-container {
    display: none;
    width: 100%;
    margin-bottom: 20px;
    gap: 10px;
}

.form-container.active {
    display: flex;
}

/* Input takes full width */
.form-container input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    outline: none;
}

/* Button aligned nicely */
.form-container button {
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Buttons */
.btn {
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    padding: 10px 12px;
}

.btn:hover {
    background: #357abd;
}

/* Loading */
.loading-container {
    display: none;
}

.loading-container.active {
    display: block;
}

/* Weather Info */
.user-info-container {
    display: none;
    margin-top: 10px;
}

.user-info-container.active {
    display: block;
}

/* City + flag */
.name {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.name img {
    width: 28px;
    height: 20px;
}

/* Description */
[data-weatherDesc] {
    color: #666;
    margin-bottom: 8px;
}

/* Weather icon */
[data-weatherIcon] {
    width: 70px;
    margin: 10px auto;
}

/* Temperature */
[data-temp] {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* PARAMETER CARDS FIX */
.parameter-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.parameter {
    flex: 1;
    background: #f5f8ff;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.parameter img {
    width: 28px;
    margin-bottom: 5px;
}

.parameter p:first-of-type {
    font-size: 13px;
    color: #777;
}

.parameter p:last-of-type {
    font-weight: bold;
    margin-top: 4px;
}

/* Responsive tweak */
@media (max-width: 400px) {
    .parameter-container {
        flex-direction: column;
    }
}