:root {
    --bg-gradient: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent: #00e5ff;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
}

.app-container {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

header p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

#city-search {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

#city-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#city-search:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.5);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #1a2f38;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-top: 0.5rem;
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-results li {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    text-align: left;
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results li:hover {
    background: rgba(0, 229, 255, 0.2);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
}

.loading {
    text-align: center;
    font-size: 1.2rem;
    color: var(--accent);
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.hidden {
    display: none !important;
}

.weather-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: fadeIn 0.5s ease;
}

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

.location-header {
    text-align: center;
}

.location-header h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.country-badge {
    background: rgba(0, 229, 255, 0.15);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-weather {
    text-align: center;
}

.temp-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temperature {
    font-size: 5rem;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #b2ebf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.condition {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .glass-panel {
        padding: 1.5rem;
    }
    .temperature {
        font-size: 4rem;
    }
    .weather-details {
        gap: 0.5rem;
    }
    .detail-value {
        font-size: 0.95rem;
    }
}
