/* General Variables */
:root {
    --primary-color: #4a6fa1;
    --primary-dark: #385a8a;
    --primary-light: #5a80b4;
    --secondary-color: #f0f2f5;
    --accent-color: #ff8c00;
    --text-color: #333;
    --text-light: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --card-bg: rgba(255, 255, 255, 0.95);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Weather Background Themes */
.weather-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
    transition: background 0.5s ease;
    padding: 20px 0;
}

.weather-wrapper.clear {
    background: linear-gradient(135deg, #ffdc89, #f79d00);
}

.weather-wrapper.clouds {
    background: linear-gradient(135deg, #bdc3c7, #2c3e50);
}

.weather-wrapper.rain {
    background: linear-gradient(135deg, #6e7786, #2c3e50);
}

.weather-wrapper.snow {
    background: linear-gradient(135deg, #e6e6e6, #b3b3b3);
}

.weather-wrapper.thunderstorm {
    background: linear-gradient(135deg, #4b4b4b, #1e1e1e);
}

.weather-wrapper.mist {
    background: linear-gradient(135deg, #b8d8e7, #8aa9c1);
}

/* Header Styles */
.header {
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
}

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

.header-title {
    margin-bottom: 1rem;
}

.app-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

/* Search Form Styles */
.search-container {
    width: 100%;
    max-width: 500px;
}

.search-form {
    width: 100%;
}

.input-group {
    display: flex;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
    outline: none;
}

.search-button {
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-button:hover {
    background-color: var(--primary-dark);
}

/* Weather Grid */
.weather-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (min-width: 992px) {
    .weather-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.spinner {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
}

/* Card Styles */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.card-container {
    margin-bottom: 20px;
}

.card-body {
    padding: 20px;
}

.section-title {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Current Weather Card */
.current-weather .location-info {
    margin-bottom: 20px;
}

.city-name {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.current-date {
    color: var(--text-light);
    font-size: 1rem;
}

.current-weather-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.temperature-container {
    display: flex;
    align-items: baseline;
}

.temperature {
    font-size: 3.5rem;
    font-weight: bold;
}

.unit {
    font-size: 1.8rem;
    margin-left: 5px;
}

.weather-description {
    font-size: 1.2rem;
    margin-top: 5px;
    text-transform: capitalize;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .weather-details-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
}

.detail-item i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Weather Highlights */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.highlight-card {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: var(--border-radius);
}

.highlight-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.sun-time {
    display: flex;
    justify-content: space-between;
}

.sun-time div {
    display: flex;
    align-items: center;
}

.sun-time i {
    margin-right: 10px;
    color: var(--accent-color);
}

.uv-index {
    display: flex;
    align-items: center;
}

.uv-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 15px;
}

.uv-level {
    padding: 4px 8px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
}

.visibility-info {
    display: flex;
    align-items: center;
}

.visibility-info i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.air-quality {
    display: flex;
    align-items: center;
}

.aqi-value {
    font-size: 1.8rem;
    font-weight: bold;
    margin-right: 15px;
}

.aqi-level {
    padding: 4px 8px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
}

/* Forecast Container */
.forecast-card {
    margin-bottom: 20px;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.forecast-item {
    text-align: center;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
}

.forecast-day {
    font-weight: bold;
    margin-bottom: 5px;
}

.forecast-icon {
    margin: 10px 0;
}

.forecast-temp {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.max-temp {
    font-weight: bold;
}

.min-temp {
    color: var(--text-light);
}

/* Hourly Forecast */
.hourly-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
}

.hourly-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 15px;
    min-width: 100px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
}

.hourly-time {
    font-weight: bold;
    margin-bottom: 10px;
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 1.5rem 0;
    color: white;
}

.copyright {
    font-size: 0.9rem;
    margin-top: 5px;
    opacity: 0.8;
}

/* Weather map */
.weather-map {
    height: 400px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Local time */
.local-time {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.local-time i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    color: var(--text-color);
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: #e9ecef;
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: #dee2e6;
} 