* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2980b9;
    --secondary-blue: #3498db;
    --light-blue: #74b9ff;
    --dark-blue: #0984e3;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #2c3e50;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --success: #00b894;
    --warning: #fdcb6e;
    --error: #e17055;
    --aqi-good: #00e400;
    --aqi-moderate: #ffff00;
    --aqi-unhealthy: #ff7e00;
    --aqi-very-unhealthy: #ff0000;
    --aqi-hazardous: #8f3f97;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --primary-blue: #1a5276;
    --secondary-blue: #21618c;
    --light-blue: #2c3e50;
    --dark-blue: #1a252f;
    --white: #2c3e50;
    --light-gray: #34495e;
    --dark-gray: #1a252f;
    --text-dark: #ecf0f1;
    --text-light: #bdc3c7;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--dark-blue) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-dark);
    transition: background 0.3s ease;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.sun {
    position: absolute;
    top: 5%;
    right: 5%;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    border-radius: 50%;
    box-shadow: 0 0 30px #f1c40f;
    animation: float 6s ease-in-out infinite;
}

[data-theme="dark"] .sun {
    background: linear-gradient(135deg, #f39c12, #d35400);
    box-shadow: 0 0 30px rgba(243, 156, 18, 0.5);
}

.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 40px;
    animation: float 8s ease-in-out infinite;
}

[data-theme="dark"] .cloud {
    background: rgba(255, 255, 255, 0.3);
}

.cloud-1 {
    width: 80px;
    height: 30px;
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.cloud-2 {
    width: 70px;
    height: 25px;
    top: 25%;
    right: 8%;
    animation-delay: 2s;
}

.cloud-3 {
    width: 100px;
    height: 35px;
    top: 10%;
    right: 20%;
    animation-delay: 4s;
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: inherit;
    border-radius: 50%;
}

.cloud::before {
    width: 35px;
    height: 35px;
    top: -18px;
    left: 10px;
}

.cloud::after {
    width: 30px;
    height: 30px;
    top: -15px;
    right: 10px;
}

.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-icon {
    position: absolute;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.2);
    animation: floatAround 20s linear infinite;
}

.floating-icon:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 70%;
    left: 85%;
    animation-delay: 5s;
}

.floating-icon:nth-child(3) {
    top: 85%;
    left: 15%;
    animation-delay: 10s;
}

.floating-icon:nth-child(4) {
    top: 35%;
    left: 75%;
    animation-delay: 15s;
}

.floating-icon:nth-child(5) {
    top: 60%;
    left: 25%;
    animation-delay: 20s;
}

.floating-icon:nth-child(6) {
    top: 25%;
    left: 60%;
    animation-delay: 25s;
}

.voice-search-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.voice-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(155, 89, 182, 0.3);
}

.voice-search-btn:active {
    transform: translateY(0);
}

.voice-search-btn.listening {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse 1s infinite;
}

.voice-search-btn i {
    font-size: 1.2rem;
}

.voice-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.voice-modal.active {
    display: flex;
}

.voice-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

[data-theme="dark"] .voice-modal-content {
    background: var(--dark-gray);
    color: white;
}

.voice-icon {
    font-size: 4rem;
    color: #9b59b6;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.voice-icon.listening {
    color: #e74c3c;
    animation: pulse 0.5s infinite;
}

.voice-status {
    transition: all 0.3s ease;
}

.voice-status.ready {
    color: #3498db;
}

.voice-status.listening {
    color: #9b59b6;
}

.voice-status.detecting {
    color: #f39c12;
}

.voice-status.speaking {
    color: #2ecc71;
}

.voice-status.processing {
    color: #3498db;
}

.voice-status.success {
    color: #27ae60;
}

.voice-status.error {
    color: #e74c3c;
}

.voice-status.timeout {
    color: #f39c12;
}

.voice-icon i {
    transition: all 0.3s ease;
}

.voice-tips {
    margin-top: 15px;
    color: var(--text-light);
    font-size: 0.8rem;
    font-style: italic;
}

.voice-icon i.listening {
    color: #9b59b6;
    animation: pulse 1s infinite;
}

.voice-icon i.active {
    color: #2ecc71;
    animation: bounce 1s infinite;
}

.voice-icon i.success {
    color: #27ae60;
    animation: none;
}

.voice-icon i.error {
    color: #e74c3c;
    animation: shake 0.5s ease-in-out;
}

.voice-transcript {
    font-size: 1.1rem;
    color: var(--text-light);
    min-height: 24px;
    margin-bottom: 20px;
}

.voice-wave {
    display: flex;
    justify-content: center;
    gap: 4px;
    height: 40px;
    align-items: center;
    margin-bottom: 20px;
}

.wave-bar {
    width: 4px;
    height: 20px;
    background: #9b59b6;
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.wave-bar:nth-child(1) {
    animation-delay: 0.1s;
}

.wave-bar:nth-child(2) {
    animation-delay: 0.2s;
}

.wave-bar:nth-child(3) {
    animation-delay: 0.3s;
}

.wave-bar:nth-child(4) {
    animation-delay: 0.4s;
}

.wave-bar:nth-child(5) {
    animation-delay: 0.5s;
}

.wave-bar:nth-child(6) {
    animation-delay: 0.6s;
}

.wave-bar:nth-child(7) {
    animation-delay: 0.7s;
}

.wave-bar:nth-child(8) {
    animation-delay: 0.8s;
}

.voice-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.voice-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
}

.app-container {
    min-height: 1100px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    overflow-y: auto;
}

.weather-app {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow-y: auto;
    animation: slideUp 0.6s ease-out;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .weather-app {
    background: rgba(44, 62, 80, 0.95);
}

.app-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: 15px 20px;
    position: relative;
    flex-shrink: 0;
}

.app-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(8px);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-title i {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.header-controls {
    display: flex;
    gap: 8px;
}

.theme-toggle,
.temp-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.theme-toggle:hover,
.temp-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.9;
}

.location-auto {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 12px;
}

.location-auto:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-section {
    padding: 15px;
    background: var(--white);
    flex-shrink: 0;
}

[data-theme="dark"] .search-section {
    background: var(--light-gray);
}

.search-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.search-box {
    display: flex;
    background: var(--light-gray);
    border-radius: 12px;
    padding: 4px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 50px;
    flex: 1;
}

.search-box:focus-within {
    border-color: var(--secondary-blue);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.search-icon {
    padding: 10px 12px;
    color: var(--text-light);
    font-size: 1rem;
    display: flex;
    align-items: center;
}

#cityInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 0.95rem;
    color: var(--text-dark);
    outline: none;
    min-width: 0;
}

#cityInput::placeholder {
    color: var(--text-light);
}

.search-button {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.search-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.3);
}

.quick-access {
    margin-top: 20px;
}

.section-title {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-cities {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.city-chip {
    background: rgba(52, 152, 219, 0.1);
    border: 1.5px solid transparent;
    color: var(--primary-blue);
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .city-chip {
    background: rgba(52, 152, 219, 0.2);
    color: #74b9ff;
}

.city-chip:hover {
    background: var(--secondary-blue);
    color: white;
    transform: translateY(-1px);
}

.recent-searches,
.favorite-cities {
    margin-bottom: 15px;
}

.recent-list,
.favorites-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.recent-item,
.favorite-item {
    background: var(--light-gray);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .recent-item,
[data-theme="dark"] .favorite-item {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.recent-item:hover,
.favorite-item:hover {
    background: var(--secondary-blue);
    color: white;
    transform: translateY(-1px);
}

.favorite-item .fav-star {
    color: gold;
}

.weather-tabs {
    display: flex;
    overflow-x: auto;
    padding: 10px 15px;
    gap: 5px;
    background: var(--light-gray);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-blue);
}

.tab-btn.active {
    background: var(--secondary-blue);
    color: white;
}

.tabs-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.tab-content {
    display: none;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.weather-main {
    padding: 0 15px 15px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    padding: 20px 0;
}

.weather-loader {
    text-align: center;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(52, 152, 219, 0.2);
    border-top: 3px solid var(--secondary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loader-text {
    color: var(--text-light);
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow);
    animation: fadeIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
}

.weather-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.location-info {
    margin-bottom: 15px;
}

.city-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.2;
}

.country-name {
    font-size: 0.85rem;
    opacity: 0.9;
}

.weather-main-info {
    margin: 15px 0;
}

.temperature {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 8px 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1;
}

.weather-condition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    margin-bottom: 3px;
    flex-wrap: wrap;
}

.condition-icon {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.condition-text {
    font-weight: 500;
    font-size: 0.95rem;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    transition: transform 0.3s ease;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-card:hover {
    transform: translateY(-3px);
}

.detail-icon {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.detail-label {
    font-size: 0.7rem;
    opacity: 0.9;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.hourly-forecast-container {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .hourly-forecast-container {
    background: var(--light-gray);
}

.hourly-header {
    margin-bottom: 20px;
}

.hourly-header h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hourly-now {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.hourly-timeline {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 20px;
}

.hourly-item {
    min-width: 80px;
    background: var(--light-gray);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hourly-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.hourly-time {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.hourly-temp {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hourly-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.hourly-rain {
    font-size: 0.8rem;
    color: var(--secondary-blue);
}

.hourly-chart-container {
    height: 200px;
    margin-top: 20px;
}

.forecast-container {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .forecast-container {
    background: var(--light-gray);
}

.forecast-header {
    margin-bottom: 20px;
}

.forecast-header h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forecast-location {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.forecast-days {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forecast-day {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.forecast-day:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow);
}

.day-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.day-name {
    font-weight: 600;
    min-width: 100px;
}

.day-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.day-temps {
    display: flex;
    align-items: center;
    gap: 20px;
}

.day-high {
    font-weight: 700;
    font-size: 1.2rem;
}

.day-low {
    color: var(--text-light);
    font-size: 1rem;
}

.day-rain {
    color: var(--secondary-blue);
    font-size: 0.9rem;
    min-width: 80px;
    text-align: right;
}

.air-quality-container {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .air-quality-container {
    background: var(--light-gray);
}

.aqi-header {
    margin-bottom: 20px;
}

.aqi-header h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aqi-location {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.aqi-meter {
    margin: 30px 0;
    position: relative;
    height: 80px;
}

.aqi-scale {
    display: flex;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.aqi-segment {
    flex: 1;
    position: relative;
}

.aqi-segment.good {
    background: var(--aqi-good);
}

.aqi-segment.moderate {
    background: var(--aqi-moderate);
}

.aqi-segment.unhealthy {
    background: var(--aqi-unhealthy);
}

.aqi-segment.very-unhealthy {
    background: var(--aqi-very-unhealthy);
}

.aqi-segment.hazardous {
    background: var(--aqi-hazardous);
}

.aqi-segment span {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    white-space: nowrap;
}

.aqi-indicator {
    position: absolute;
    top: -10px;
    left: 0;
    transform: translateX(-50%);
    transition: left 1s ease;
}

.aqi-indicator .needle {
    width: 2px;
    height: 40px;
    background: #000;
    margin: 0 auto;
}

.aqi-indicator .circle {
    width: 20px;
    height: 20px;
    background: #000;
    border-radius: 50%;
    margin: 0 auto;
}

.aqi-value {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

.aqi-category {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.aqi-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.aqi-components {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.aqi-component {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.component-name {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.component-value {
    font-size: 1rem;
    font-weight: 600;
}

.health-recommendations {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 15px;
}

.health-recommendations h4 {
    margin-bottom: 10px;
    font-size: 1rem;
}

.health-recommendations ul {
    list-style: none;
    padding-left: 0;
}

.health-recommendations li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    padding-left: 20px;
    position: relative;
}

.health-recommendations li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-blue);
}

.map-container {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .map-container {
    background: var(--light-gray);
}

.map-header {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-controls {
    display: flex;
    gap: 8px;
}

.map-layer-btn {
    background: var(--light-gray);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.map-layer-btn.active {
    background: var(--secondary-blue);
    color: white;
}

.map-layer-btn:hover {
    transform: translateY(-1px);
}

#weatherMap {
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
}

.map-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.compare-container {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .compare-container {
    background: var(--light-gray);
}

.compare-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compare-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-comparison-btn {
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.add-comparison-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.compare-inputs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.compare-city {
    display: flex;
    gap: 8px;
}

.compare-input {
    flex: 1;
    background: var(--light-gray);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
    color: var(--text-dark);
}

.compare-search {
    background: var(--secondary-blue);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.compare-search:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.compare-vs {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-blue);
    text-align: center;
}

.compare-results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.compare-city-result {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 15px;
}

.compare-city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.compare-city-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.compare-city-temp {
    font-size: 1.5rem;
    font-weight: 700;
}

.compare-city-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.compare-detail {
    text-align: center;
}

.compare-detail-label {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.compare-detail-value {
    font-size: 0.9rem;
    font-weight: 600;
}

.weather-suggestions {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .weather-suggestions {
    background: var(--light-gray);
}

.suggestions-header {
    margin-bottom: 15px;
}

.suggestions-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.suggestion-item {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.suggestion-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.suggestion-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.suggestion-desc {
    font-size: 0.8rem;
    color: var(--text-light);
}

.weather-sounds {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    margin-top: 15px;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .weather-sounds {
    background: var(--light-gray);
}

.sounds-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.sounds-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sounds-toggle {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.sounds-toggle:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.sounds-toggle.playing {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.sounds-progress {
    height: 6px;
    background: var(--light-gray);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #9b59b6, #3498db);
    width: 0%;
    transition: width 0.3s ease;
}

.app-footer {
    background: var(--light-gray);
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-info {
    color: var(--text-light);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.separator {
    opacity: 0.5;
}

.footer-share {
    display: flex;
    gap: 8px;
}

.share-btn,
.refresh-btn {
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.share-btn:hover,
.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 10px;
}

.system-status {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.status-indicator {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-indicator i {
    font-size: 0.6rem;
}

.status-indicator.active {
    color: var(--success);
}

.status-indicator.warning {
    color: var(--warning);
}

.status-indicator.error {
    color: var(--error);
}

.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 300px;
}

.notification {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

[data-theme="dark"] .notification {
    background: var(--dark-gray);
    color: white;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: var(--success);
}

.notification.warning .notification-icon {
    color: var(--warning);
}

.notification.error .notification-icon {
    color: var(--error);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-light);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
}

.error-container {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 16px;
    padding: 20px;
    color: white;
    text-align: center;
    animation: shake 0.5s ease-in-out;
    margin-bottom: 10px;
}

.error-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.error-title {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.error-message {
    margin-bottom: 15px;
    opacity: 0.9;
    font-size: 0.9rem;
    line-height: 1.3;
}

.retry-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.retry-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.8rem;
}

.retry-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.location-options {
    padding: 15px;
    text-align: center;
}

.options-header {
    margin-bottom: 15px;
}

.options-header .location-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.options-header h3 {
    color: var(--text-dark);
    margin-bottom: 3px;
    font-size: 1.3rem;
}

.options-header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.option-card {
    background: white;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

[data-theme="dark"] .option-card {
    background: var(--light-gray);
}

.option-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-blue);
}

.option-card.capital {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}

.option-card.city {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.option-card.city .option-type,
.option-card.city .option-name {
    color: white;
}

.option-icon {
    font-size: 1.5rem;
    margin-bottom: 6px;
}

.option-type {
    font-size: 0.65rem;
    color: var(--text-light);
    margin-bottom: 3px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.option-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.select-btn {
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.select-btn:hover {
    background: var(--primary-blue);
    transform: scale(1.05);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(3deg);
    }
}

@keyframes floatAround {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(60px, 30px) rotate(90deg);
    }

    50% {
        transform: translate(30px, 60px) rotate(180deg);
    }

    75% {
        transform: translate(-30px, 30px) rotate(270deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-3px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(3px);
    }
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(0.3);
    }

    50% {
        transform: scaleY(1);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Medium screens (tablets) */
@media (max-width: 992px) {
    .weather-app {
        width: 95%;
        margin: 10px auto;
    }

    .compare-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .compare-vs {
        display: none;
    }

    .aqi-details {
        grid-template-columns: 1fr;
    }
}

/* Small screens (large phones) */
@media (max-width: 768px) {
    .weather-app {
        width: 98%;
        border-radius: 12px;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-controls {
        align-self: flex-end;
        margin-top: -40px;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    .voice-search-btn {
        align-self: flex-end;
        width: 50px;
        height: 50px;
    }

    .weather-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tab-btn {
        flex: 1;
        min-width: 100px;
        justify-content: center;
        font-size: 0.75rem;
    }

    .suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        flex-direction: column;
        gap: 10px;
    }

    .footer-share {
        align-self: flex-end;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .weather-app {
        width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .app-container {
        padding: 0;
    }

    .app-header {
        padding: 12px 15px;
    }

    .app-title {
        font-size: 1.1rem;
    }

    .search-box {
        flex-direction: column;
        padding: 8px;
    }

    #cityInput {
        width: 100%;
        margin: 8px 0;
    }

    .search-button {
        width: 30%;
        justify-content: center;
    }

    .quick-cities {
        flex-wrap: wrap;
        justify-content: center;
    }

    .city-chip {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }

    .weather-details {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .detail-card {
        min-height: 60px;
        padding: 10px;
    }

    .hourly-timeline {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 10px 5px;
    }

    .hourly-item {
        min-width: 70px;
        padding: 10px;
    }

    .forecast-day {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .day-info {
        flex-direction: column;
        gap: 8px;
    }

    .day-name {
        min-width: auto;
    }

    .day-temps {
        justify-content: center;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .system-status {
        justify-content: center;
        text-align: center;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .retry-buttons {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .app-title {
        font-size: 1rem;
    }

    .temperature {
        font-size: 2rem;
    }

    .condition-icon {
        font-size: 1.5rem;
    }

    .tab-btn {
        min-width: 80px;
        padding: 6px 8px;
        font-size: 0.7rem;
    }

    .compare-inputs {
        flex-direction: column;
    }

    .compare-city {
        flex-direction: column;
    }

    .compare-search {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 8px;
        align-items: flex-start;
    }

    .weather-app {
        max-height: 300vh;
        border-radius: 16px;
        margin: 0;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .header-controls {
        align-self: flex-end;
    }

    .header-bottom {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    .voice-search-btn {
        align-self: flex-end;
        width: 100%;
        max-width: 50px;
    }

    .aqi-details,
    .compare-results {
        grid-template-columns: 1fr;
    }

    .compare-inputs {
        grid-template-columns: 1fr;
    }

    .compare-vs {
        display: none;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-share {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 5px;
    }

    .weather-app {
        max-height: 300vh;
        border-radius: 14px;
    }

    .search-box {
        flex-direction: row;
        min-height: 45px;
    }

    .search-button {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    #cityInput {
        font-size: 0.9rem;
    }

    .weather-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 60px;
        justify-content: center;
    }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .system-status {
        justify-content: center;
    }

    .hourly-timeline {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .hourly-item {
        min-width: 70px;
    }
}

@media (max-width: 360px) {
    .app-title {
        font-size: 1.1rem;
    }

    .temperature {
        font-size: 2rem;
    }

    .weather-details {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .retry-buttons {
        grid-template-columns: 1fr;
    }
}

@media (hover: none) and (pointer: coarse) {

    .search-button:hover,
    .city-chip:hover,
    .detail-card:hover,
    .option-card:hover,
    .retry-button:hover,
    .select-btn:hover,
    .tab-btn:hover,
    .suggestion-item:hover,
    .hourly-item:hover,
    .forecast-day:hover,
    .compare-search:hover,
    .add-comparison-btn:hover,
    .share-btn:hover,
    .refresh-btn:hover,
    .theme-toggle:hover,
    .temp-toggle:hover,
    .voice-search-btn:hover,
    .sounds-toggle:hover {
        transform: none;
    }

    .search-box:focus-within {
        transform: none;
    }

    .voice-search-btn:active,
    .search-button:active {
        transform: scale(0.98);
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}