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

body {
    font-family: 'Times New Roman', Times, serif;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

main.dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInDown 1s ease-out forwards;
}

header h1 {
    font-size: 3rem;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255,255,255,0.3);
}

header p {
    font-size: 1.2rem;
    color: #cccccc;
}

.search-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

#cityInput {
    padding: 15px 20px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    width: 300px;
    transition: all 0.3s ease;
}

#cityInput:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

button {
    padding: 15px 30px;
    font-size: 1.1rem;
    font-family: 'Times New Roman', serif;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #4a4a4a, #666666);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, #666666, #888888);
}

#geoBtn {
    background: linear-gradient(45deg, #2a5f8e, #3a7ab8);
}

#geoBtn:hover {
    background: linear-gradient(45deg, #3a7ab8, #4a8ec8);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.weather-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    padding: 30px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.weather-card.show {
    opacity: 1;
    transform: translateY(0);
}

.hero-card {
    grid-column: 1 / -1;
    text-align: center;
}

.hero-card .weather-icon {
    font-size: 10rem;
    filter: drop-shadow(0 0 40px rgba(255,255,255,0.6));
}

.hero-card .temp {
    font-size: 5rem;
}

.hourly-card, .graph-card, .insights-card, .wind-card {
    grid-column: span 1;
}

.forecast-grid {
    grid-column: span 2;
}

.forecast-grid h3 {
    margin-bottom: 20px;
}

.forecast-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.weather-icon {
    font-size: 8rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.5));
}

.current-city {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.temp {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.detail-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

.forecast-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.2s;
}

.forecast-section.show {
    opacity: 1;
    transform: translateY(0);
}

#forecastList {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.forecast-day {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

.forecast-day:hover {
    transform: scale(1.05);
}

.forecast-icon {
    font-size: 3rem;
    margin: 15px 0;
}

.forecast-temp {
    font-size: 1.8rem;
    font-weight: bold;
}

.favorites-section {
    margin-top: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
}

#favoritesList {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.fav-city {
    background: linear-gradient(45deg, #2a5f8e, #3a7ab8);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.fav-city:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 95, 142, 0.5);
}

.fav-icon {
    font-size: 1.2rem;
}

#errorMsg {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
    grid-column: 1 / -1;
    display: none;
}

.error-card {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff6b6b;
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
    text-align: center;
    grid-column: 1 / -1;
}

/* Skeleton Loaders */
.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.skeleton-card {
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-hero {
    grid-column: 1 / -1;
    height: 300px;
}

.skeleton-hourly, .skeleton-graph {
    height: 250px;
}

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

.last-city-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 15px 25px;
    border: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    margin-bottom: 20px;
}

.last-city-card h3 {
    margin: 0;
    color: #cccccc;
}

/* Hourly Timeline */
#hourlyTimeline {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
    scrollbar-width: thin;
}

.hourly-item {
    background: rgba(255,255,255,0.05);
    min-width: 80px;
    padding: 12px 8px;
    border-radius: 12px;
    text-align: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.hourly-item .time {
    font-size: 0.85rem;
    color: #cccccc;
    margin-bottom: 5px;
}

.hourly-item .hourly-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.hourly-item .hourly-temp {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Wind Compass */
.wind-compass {
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.wind-arrow {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 40px solid #4a90e2;
    transform-origin: bottom center;
    transition: transform 0.8s ease;
    animation: rotateArrow 2s linear infinite;
}

.wind-compass::before {
    content: 'N';
    position: absolute;
    top: 10px;
    font-weight: bold;
}

.wind-compass::after {
    content: 'S';
    position: absolute;
    bottom: 10px;
    font-weight: bold;
}

#windDir {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

#windDetails {
    text-align: center;
    margin-top: 15px;
    color: #cccccc;
}

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

/* Favorites Sidebar */
.favorites-section {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    max-width: 350px;
}

.favorites-section h3 {
    margin-bottom: 20px;
    text-align: center;
}

#favoritesList {
    max-height: 300px;
    overflow-y: auto;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.7s forwards;
}

footer p {
    margin: 5px 0;
    color: #cccccc;
}

/* Animations */
@keyframes fadeInDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
        align-items: center;
    }
    
    #cityInput {
        width: 100%;
        max-width: 350px;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .temp {
        font-size: 3rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .current-weather {
        padding: 20px;
    }
}
