* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1c3a 0%, #2d1b69 25%, #1e3c72 50%, #2a5298 75%, #9b59b6 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(72, 61, 139, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(25, 25, 112, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 450px;
    width: 100%;
    background: rgba(16, 20, 43, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(138, 43, 226, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    color: #e0e6ff;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    font-weight: 300;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.header h1 i {
    background: linear-gradient(135deg, #667eea, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-box {
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 18px 55px 18px 20px;
    font-size: 16px;
    border: none;
    border-radius: 20px;
    background: rgba(30, 60, 114, 0.3);
    color: #ffffff;
    outline: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(138, 43, 226, 0.2);
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(30, 60, 114, 0.4);
    border-color: rgba(138, 43, 226, 0.5);
    box-shadow: 0 0 20px rgba(138, 43, 226, 0.2);
}

.search-input::placeholder {
    color: rgba(224, 230, 255, 0.6);
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea, #9b59b6);
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 12px;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
}

.default-message {
    text-align: center;
    padding: 40px 0;
}

.default-icon {
    margin-bottom: 20px;
}

.default-icon i {
    font-size: 60px;
    background: linear-gradient(135deg, #667eea, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.8;
}

.default-message h2 {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 15px;
    color: #ffffff;
}

.default-message p {
    color: rgba(224, 230, 255, 0.7);
    font-size: 16px;
}

.weather-info {
    display: none;
    animation: fadeIn 0.6s ease;
}

.weather-info.active {
    display: block;
}

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

.location {
    text-align: center;
    margin-bottom: 25px;
}

.location i {
    color: #9b59b6;
    margin-right: 8px;
}

.location span {
    font-size: 20px;
    font-weight: 300;
    color: #ffffff;
}

.country {
    opacity: 0.7;
    font-size: 16px !important;
    margin-left: 5px;
}

.main-weather {
    text-align: center;
    margin-bottom: 35px;
}

.weather-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.weather-icon i {
    background: linear-gradient(135deg, #667eea, #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(138, 43, 226, 0.3));
}

.temperature {
    font-size: 56px;
    font-weight: 300;
    margin-bottom: 10px;
    color: #ffffff;
}

.description {
    font-size: 18px;
    text-transform: capitalize;
    color: rgba(224, 230, 255, 0.8);
    font-weight: 300;
}

.details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.detail-item {
    background: rgba(30, 60, 114, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.15);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(30, 60, 114, 0.3);
    border-color: rgba(138, 43, 226, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.detail-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #9b59b6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 12px;
    color: rgba(224, 230, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.loading {
    text-align: center;
    padding: 40px 0;
    display: none;
}

.loading.active {
    display: block;
}

.loading-spinner {
    margin-bottom: 20px;
}

.loading-spinner i {
    font-size: 40px;
    color: #9b59b6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading p {
    color: rgba(224, 230, 255, 0.8);
    font-size: 16px;
}

.error {
    display: none;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #ff6b6b;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.error.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.error i {
    margin-right: 10px;
    font-size: 16px;
}

/* Weather condition backgrounds */
.clear-day { 
    background: linear-gradient(135deg, #1a1c3a 0%, #ffd89b 50%, #19547b 100%); 
}

.clear-night { 
    background: linear-gradient(135deg, #0c0c0c 0%, #2d1b69 50%, #1a1a2e 100%); 
}

.rain { 
    background: linear-gradient(135deg, #16213e 0%, #2d1b69 25%, #1e3c72 100%); 
}

.snow { 
    background: linear-gradient(135deg, #e6ddd4 0%, #9b59b6 50%, #2d1b69 100%); 
}

.cloudy { 
    background: linear-gradient(135deg, #2c3e50 0%, #2d1b69 50%, #34495e 100%); 
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 25px 20px;
        max-width: 100%;
    }
    
    .temperature {
        font-size: 48px;
    }
    
    .weather-icon {
        font-size: 60px;
    }
    
    .details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .detail-item {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .search-input {
        padding: 15px 50px 15px 18px;
        font-size: 15px;
    }
}