/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0d1421 0%, #1a1a2e 50%, #16213e 100%);
    min-height: 100vh;
    color: #e5e5e5;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    background: linear-gradient(135deg, 
        rgba(13, 20, 33, 0.95) 0%, 
        rgba(26, 26, 46, 0.95) 50%, 
        rgba(22, 33, 62, 0.95) 100%);
    backdrop-filter: blur(10px);
}

/* Header Styles */
.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.accent {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-container {
    display: flex;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input-container:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    font-size: 1rem;
    background: transparent;
    color: #e5e5e5;
    min-width: 250px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.5);
}

.location-btn {
    background: rgba(0, 0, 0, 0.4);
    color: #e5e5e5;
    border: 2px solid rgba(59, 130, 246, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.9rem;
}

.location-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

/* Loading and Error States */
.loading-overlay, .error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 20, 33, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #e5e5e5;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
}

.error-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
}

.retry-btn {
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Dashboard Layout */
.dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    gap: 2rem;
}

/* Hero Section */
.hero-section {
    margin-bottom: 1rem;
}

.current-weather-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.current-weather-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.location-info {
    text-align: center;
    margin-bottom: 2rem;
}

.location-name {
    font-size: 2rem;
    font-weight: 600;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
}

.current-time {
    color: #9ca3af;
    font-size: 1rem;
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
}

.temperature-section {
    flex: 1;
}

.current-temperature {
    font-size: 5rem;
    font-weight: 300;
    color: #3b82f6;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.weather-description {
    font-size: 1.5rem;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.feels-like {
    color: #9ca3af;
    font-size: 1rem;
}

.weather-icon-container {
    flex-shrink: 0;
}

.weather-icon-main {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.weather-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
}

.highlight-item {
    text-align: center;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.highlight-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
}

.highlight-label {
    display: block;
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.highlight-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #3b82f6;
}

/* Charts Section */
.charts-section {
    margin: 2rem 0;
}

.chart-container {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.chart-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e5e5;
}

.chart-toggle, .time-toggle {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50px;
    padding: 0.25rem;
}

.toggle-btn, .time-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #9ca3af;
}

.toggle-btn.active, .time-btn.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

.weather-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Details Section */
.details-section {
    margin: 2rem 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.detail-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-icon {
    font-size: 1.5rem;
}

.detail-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e5e5e5;
}

.sun-times, .precipitation-info, .wind-info, .visibility-info {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.sun-time, .precip-item, .wind-item, .visibility-item {
    text-align: center;
    flex: 1;
}

.sun-time span, .precip-item span, .wind-item span, .visibility-item span {
    display: block;
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.sun-time strong, .precip-item strong, .wind-item strong, .visibility-item strong {
    font-size: 1.2rem;
    color: #3b82f6;
    font-weight: 600;
}

/* Radar Section */
.radar-section {
    margin: 2rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e5e5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.radar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.radar-control-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e5e5e5;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.radar-control-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    transform: scale(1.05);
}

.radar-timestamp {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #e5e5e5;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.radar-map {
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 2px solid rgba(59, 130, 246, 0.3);
}

/* Forecast Section */
.forecast-section {
    margin: 2rem 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e5e5e5;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 1.5rem;
    text-align: center;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.forecast-card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.forecast-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.forecast-header {
    text-align: center;
    margin-bottom: 1rem;
}

.forecast-day {
    font-size: 1.2rem;
    font-weight: 600;
    color: #e5e5e5;
    margin-bottom: 0.25rem;
}

.forecast-date {
    font-size: 0.9rem;
    color: #9ca3af;
}

.forecast-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.forecast-icon img {
    width: 60px;
    height: 60px;
}

.forecast-temps {
    text-align: right;
}

.forecast-high {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e17055;
}

.forecast-low {
    font-size: 1rem;
    color: #74b9ff;
}

.forecast-condition {
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
    margin-bottom: 1rem;
}

.forecast-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.forecast-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e5e5e5;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .forecast-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .dashboard {
        padding: 1rem;
    }
    
    .header-content {
        padding: 0 1rem;
    }
    
    .search-section {
        width: 100%;
        justify-content: center;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
    }
    
    .current-temperature {
        font-size: 4rem;
    }
    
    .weather-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .app-title {
        font-size: 1.5rem;
    }
    
    .search-input {
        min-width: 200px;
    }
    
    .current-temperature {
        font-size: 3rem;
    }
    
    .weather-highlights {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: 1fr;
    }
    
    .radar-map {
        height: 300px;
    }
}

/* Footer Styles */
.footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    margin-top: 4rem;
    padding: 3rem 0 1rem;
    color: #e5e5e5;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #3b82f6;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
    padding-bottom: 0.5rem;
}

.footer-section p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.footer-tech {
    font-style: italic;
    color: #6b7280 !important;
    font-size: 0.85rem !important;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    border-top: 1px solid rgba(59, 130, 246, 0.2);
    margin-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 1rem 0;
    }
    
    .footer-section p {
        font-size: 0.85rem;
    }
}