@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 420px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.search {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.search input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 16px;
    font-size: 16px;
    background: #f8f9fa;
    color: #2d3436;
    outline: none;
    transition: all 0.3s ease;
}

.search input:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search input::placeholder {
    color: #74b9ff;
}

.search button {
    width: 52px;
    height: 52px;
    border: none;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.search button img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.main-info {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 30px;
}

.weather-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.temp-info {
    flex: 1;
}

.temp {
    font-size: 56px;
    font-weight: 700;
    color: #2d3436;
    line-height: 1;
    margin-bottom: 8px;
}

.city {
    font-size: 22px;
    font-weight: 500;
    color: #636e72;
    margin: 0;
}

.details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 25px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 18px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-item img {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

.detail-text {
    display: flex;
    flex-direction: column;
}

.value {
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    line-height: 1.2;
}

.label {
    font-size: 13px;
    color: #636e72;
    font-weight: 400;
    margin-top: 2px;
}

/* Tablet Responsive */
@media (max-width: 768px) {
    .container {
        max-width: 380px;
    }
    
    .card {
        padding: 30px;
    }
    
    .main-info {
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .weather-icon {
        width: 90px;
        height: 90px;
    }
    
    .temp {
        font-size: 50px;
    }
    
    .city {
        font-size: 20px;
    }
    
    .details {
        padding: 20px;
        gap: 18px;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .container {
        max-width: 340px;
    }
    
    .card {
        padding: 25px;
    }
    
    .search {
        gap: 10px;
        margin-bottom: 25px;
    }
    
    .search input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .search button {
        width: 48px;
        height: 48px;
    }
    
    .main-info {
        gap: 18px;
        margin-bottom: 22px;
    }
    
    .weather-icon {
        width: 80px;
        height: 80px;
    }
    
    .temp {
        font-size: 44px;
    }
    
    .city {
        font-size: 18px;
    }
    
    .details {
        padding: 18px;
        gap: 15px;
    }
    
    .detail-item {
        gap: 12px;
    }
    
    .detail-item img {
        width: 26px;
        height: 26px;
    }
    
    .value {
        font-size: 16px;
    }
    
    .label {
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .container {
        max-width: 300px;
    }
    
    .card {
        padding: 22px;
        border-radius: 20px;
    }
    
    .search input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .search button {
        width: 44px;
        height: 44px;
    }
    
    .main-info {
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .weather-icon {
        width: 75px;
        height: 75px;
    }
    
    .temp {
        font-size: 40px;
    }
    
    .city {
        font-size: 16px;
    }
    
    .details {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 15px;
    }
    
    .detail-item {
        gap: 10px;
        justify-content: center;
    }
    
    .detail-item img {
        width: 24px;
        height: 24px;
    }
    
    .value {
        font-size: 15px;
    }
}

/* Loading state */
.card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error state */
.error {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Success animation */
.card.success {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}