*,*::before,*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

:root {
    --primary: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #60a5fa;
    --light: #e0f2fe;
    --dark: #0f172a;
    --success: #22c55e;
    --error: #ef4444;
    --transition: all 0.3s ease;
    --shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    --card-radius: 16px;
    --btn-radius: 8px;
}

body {
    min-height: 100vh;
    background-color: #f8fafc;
}

.wrapper {
    width: 100%;
    min-height: 100vh;
    color: var(--light);
    background-image: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

header {
    text-align: center;
    margin-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #ffffff, #bfdbfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.tab-container {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 0.75rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tab {
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
    background: transparent;
    color: var(--light);
    padding: 0.75rem 1.25rem;
    border-radius: var(--btn-radius);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    flex: 1;
    justify-content: center;
}

.tab-icon {
    font-size: 1.25rem;
}

.tab.current-tab {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tab:hover:not(.current-tab) {
    background-color: rgba(255, 255, 255, 0.1);
}

.weather-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
}

.btn {
    border: none;
    outline: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--btn-radius);
    background-color: var(--accent);
    color: var(--dark);
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    color: white;
}

.sub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Grant location container */
.grant-location-container {
    display: none;
}

.grant-location-container.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.grant-location-container img {
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subheading {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
    margin-bottom: 1.5rem;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Search form */
.form-container {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    flex-direction: column;
}

.form-container.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.search-wrapper {
    display: flex;
    width: 100%;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.form-container input {
    flex: 1;
    border: none;
    outline: none;
    height: 50px;
    padding: 0 1.25rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--btn-radius);
    font-size: 1rem;
    color: white;
    transition: var(--transition);
}

.form-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-container input:focus {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.search-btn {
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--btn-radius);
}

.search-hint {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: center;
}

/* Loading container */
.loading-container {
    display: none;
}

.loading-container.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.loading-container p {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 1rem;
}

.loading-subtext {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* Weather info container */
.user-info-container {
    display: none;
    width: 100%;
}

.user-info-container.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-in-out;
}

.weather-card {
    width: 100%;
    padding: 1.5rem;
    border-radius: var(--card-radius);
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

.name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.name p {
    font-size: 1.75rem;
    font-weight: 600;
}

.name img {
    width: 36px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.weather-primary {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.weather-primary img {
    width: 100px;
    height: 100px;
    margin-bottom: 0.5rem;
}

.weather-primary p[data-temp] {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.weather-primary p[data-weatherDesc] {
    font-size: 1.2rem;
    text-transform: capitalize;
    opacity: 0.9;
}

.last-updated {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: center;
    margin-bottom: 1.5rem;
}

.parameter-container {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.parameter {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--btn-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
}

.parameter:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.parameter img {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
}

.param-label {
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

.param-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.additional-info {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 1rem 1.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    opacity: 0.8;
}

.info-value {
    font-weight: 600;
}

/* Error container */
.error-container {
    display: none;
    text-align: center;
}

.error-container.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.error-container img {
    margin-bottom: 1.5rem;
}

.error-heading {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--light);
}

.error-message {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    max-width: 80%;
    text-align: center;
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem 0;
    opacity: 0.7;
    font-size: 0.8rem;
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 600px) {
    .tab-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .parameter-container {
        flex-direction: column;
    }
    
    .name p {
        font-size: 1.5rem;
    }
    
    .weather-primary p[data-temp] {
        font-size: 2.5rem;
    }
}