:root {
    --primary-color: #4a90e2;
    --accent-color: #00d4ff;
    --text-color: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.08);
    --blur-bg: blur(18px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    /* light overlay */
    z-index: -1;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    transition: background-image 0.5s ease;
}

.container {
    max-width: 850px;
    width: 100%;
    padding: 35px;
    background: var(--card-bg);
    backdrop-filter: var(--blur-bg);
    -webkit-backdrop-filter: var(--blur-bg);
    border-radius: 25px;
    box-shadow: var(--glass-shadow);
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    display: flex;
    margin-bottom: 25px;
    gap: 12px;
    align-items: center;
}

.search-box button {
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--accent-color);
}

.search-box button svg {
    width: 20px;
    height: 20px;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    /* light overlay */
    z-index: -1;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    transition: background-image 0.5s ease;
}

.container {
    max-width: 850px;
    width: 100%;
    padding: 35px;
    background: var(--card-bg);
    backdrop-filter: var(--blur-bg);
    -webkit-backdrop-filter: var(--blur-bg);
    border-radius: 25px;
    box-shadow: var(--glass-shadow);
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    display: flex;
    margin-bottom: 25px;
    gap: 12px;
}

.search-box input {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.95);
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-color);
}

.search-box button {
    padding: 14px 22px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    color: white;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.search-box button:hover {
    transform: scale(1.05);
}

.weather-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.weather-icon-container {
    position: relative;
    margin: 10px 0;
}

.temp {
    font-size: 3.8rem;
    font-weight: bold;
    margin: 8px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.desc {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 20px;
    opacity: 0.9;
}

.details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    width: 100%;
    max-width: 520px;
}

.details p {
    background: rgba(255, 255, 255, 0.1);
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
}

.forecast-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px 0;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
    color: #fff;
}

.forecast-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.forecast-time,
.forecast-day {
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.forecast-icon img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
}

.time-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
    grid-column: span 2;
}

.time-column {
    background: rgba(255, 255, 255, 0.2);
    padding: 14px;
    border-radius: 12px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.05);
}

.time-label {
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.local-time {
    color: #4fc3f7;
}

.pk-time {
    color: #81c784;
}

.weather-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.raindrop {
    position: absolute;
    width: 1px;
    background: rgba(255, 255, 255, 0.6);
    animation: rain 1s linear infinite;
}

@keyframes rain {
    to {
        transform: translateY(100vh);
    }
}

@media (max-width: 600px) {
    .details {
        grid-template-columns: 1fr;
    }
    .forecast-cards {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .temp {
        font-size: 2.6rem;
    }
}

h3 {
    margin-top: 30px;
    font-size: 1.6rem;
    color: var(--accent-color);
    border-left: 6px solid var(--accent-color);
    padding-left: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.time-column.local {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 6px solid #0288d1;
}

.time-column.pk {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left: 6px solid #388e3c;
}

.forecast-card {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.1));
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: scale(1.05);
    border-color: #00d4ff;
}

.weather-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0);
    }
}

.temp {
    animation: pop 0.6s ease;
}

@keyframes pop {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.forecast-cards {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#voiceBtn {
    padding: 14px 18px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, #ff4081, #e91e63);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#voiceBtn {
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, #ff4081, #e91e63);
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

#voiceBtn svg {
    width: 20px;
    height: 20px;
}

#voiceBtn:hover {
    transform: scale(1.05);
}

.button-group {
    display: flex;
    gap: 10px;
}

.button-group button {
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(to right, #4a90e2, #00d4ff);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.button-group button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px #00d4ff;
}

.button-group button svg {
    width: 22px;
    height: 22px;
}