/* Weather Dashboard - Romania */
/* CSS Styles */

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #c8d4e3 0%, #b8c6d9 50%, #a8b8cc 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dashboard {
    width: 100%;
    max-width: 1400px;
    min-height: 800px;
    background: linear-gradient(135deg, rgba(138, 165, 200, 0.9) 0%, rgba(120, 150, 190, 0.85) 50%, rgba(100, 135, 180, 0.9) 100%);
    border-radius: 24px;
    position: relative;
    overflow: visible;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(100, 135, 180, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
    color: white;
    font-size: 16px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Rain Effect */
.rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.rain-drop {
    position: absolute;
    width: 1.5px;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.35));
    animation: rain-fall linear infinite;
    transform: rotate(15deg);
}

@keyframes rain-fall {
    0% {
        transform: translateY(-20px) rotate(15deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(900px) rotate(15deg);
        opacity: 0;
    }
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    position: relative;
    z-index: 6000;
	overflow: visible;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
}

.nav-link.active {
    color: white;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-link:hover {
    color: white;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 20px;
}

.solar-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.solar-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.solar-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

.solar-time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.time-display, .date-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time, .date {
    font-size: 24px;
    font-weight: 500;
    color: white;
}

.time-label, .date-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.2;
}

.header-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* City Search */
.city-search-container {
    position: relative;
	z-index: 6001;
}

.search-label {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.city-search {
    width: 200px;
    padding: 10px 12px 10px 36px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
}

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

.city-search:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.city-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(60, 80, 110, 0.98);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 5000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    color: white;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dropdown-item.no-results {
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.dropdown-item.no-results:hover {
    background: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-source {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.source-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.source-name {
    font-size: 12px;
    color: white;
    font-weight: 500;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

/* Left Section */
.left-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.weather-condition {
    margin-top: 20px;
}

.condition-title {
    font-size: 64px;
    font-weight: 300;
    color: white;
    line-height: 1;
    letter-spacing: -2px;
}

.condition-subtitle {
    font-size: 28px;
    font-weight: 400;
    color: rgba(180, 200, 100, 0.9);
    margin-top: 5px;
}

.condition-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-top: 20px;
    max-width: 280px;
}

.city-temps {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.city-temp {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.city-temp .temp {
    font-size: 32px;
    font-weight: 300;
    color: white;
}

.city-temp .coords {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.city-temp .city-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.temp-bar {
    width: 60px;
    height: 4px;
    border-radius: 2px;
    margin-top: 8px;
}

.temp-bar.blue {
    background: linear-gradient(90deg, #4a90d9, #7ab8e8);
}

.temp-bar.orange {
    background: linear-gradient(90deg, #f5a623, #f8c471);
}

.temp-bar.purple {
    background: linear-gradient(90deg, #9b6dff, #b794f6);
}

.bottom-left {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.update-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 140px;
}

.update-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.update-value {
    font-size: 13px;
    color: white;
    font-weight: 500;
}

.pressure-widget {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    min-width: 140px;
}

.pressure-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.pressure-header svg {
    opacity: 0.7;
}

.pressure-label {
    font-size: 11px;
}

.pressure-value {
    font-size: 18px;
    color: white;
    font-weight: 600;
}

/* Center Section */
.center-section {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cloud-container {
    position: relative;
    width: 400px;
    height: 250px;
	z-index: 2;
}

/* Weather Visual Layers */
.sun {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    left: 35px;
    top: 15px;
    background: radial-gradient(circle, rgba(255, 213, 79, 1) 40%, rgba(255, 213, 79, 0.35) 70%, rgba(255, 213, 79, 0) 75%);
    box-shadow: 0 0 60px rgba(255, 213, 79, 0.55);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.moon {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    left: 45px;
    top: 25px;
    background: radial-gradient(circle at 35% 35%, rgba(245, 245, 255, 1) 35%, rgba(200, 210, 230, 1) 75%);
    box-shadow: 0 0 40px rgba(210, 220, 255, 0.45);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.moon::after {
    content: '';
    position: absolute;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    left: 32px;
    top: 10px;
    background: rgba(120, 150, 190, 0.55);
    filter: blur(0.2px);
}

.fog {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.fog::before,
.fog::after {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 30%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.25) 70%, rgba(255,255,255,0) 100%);
    filter: blur(6px);
    opacity: 0.9;
    animation: fog-drift 8s linear infinite;
}

.fog::after {
    animation-duration: 11s;
    opacity: 0.7;
}

@keyframes fog-drift {
    0% { transform: translateX(-15%); }
    100% { transform: translateX(15%); }
}

.snow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}

.snowflake {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    filter: blur(0.2px);
    animation: snow-fall linear infinite;
}

@keyframes snow-fall {
    0% { transform: translateY(-10px); opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.9; }
    100% { transform: translateY(280px); opacity: 0; }
}

@keyframes sun-pulse {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(1.02); }
}

@keyframes moon-glow {
    0%, 100% { transform: scale(0.98); }
    50% { transform: scale(1.02); }
}

/* Weather states driven by JS */
.cloud-container.weather-sunny .sun {
    opacity: 1;
    transform: scale(1);
    animation: sun-pulse 4s ease-in-out infinite;
}

.cloud-container.weather-night .sun {
    opacity: 0;
    transform: scale(0.95);
    animation: none;
}

.cloud-container.weather-partly .sun {
    opacity: 1;
    transform: scale(1);
}

.cloud-container.weather-night .moon {
    opacity: 1;
    transform: scale(1);
    animation: moon-glow 5s ease-in-out infinite;
}

.cloud-container.weather-fog .fog {
    opacity: 1;
}

.cloud-container.weather-snow .snow {
    opacity: 1;
}

.cloud {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    animation: float 6s ease-in-out infinite;
}

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

.cloud-part {
    position: absolute;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 245, 250, 0.95) 100%);
    border-radius: 50%;
    box-shadow:
        inset -5px -5px 20px rgba(200, 210, 220, 0.3),
        inset 5px 5px 20px rgba(255, 255, 255, 0.8);
}

.cloud-main {
    width: 220px;
    height: 130px;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 100px;
}

.cloud-left {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 15%;
}

.cloud-right {
    width: 130px;
    height: 130px;
    top: 45%;
    right: 15%;
}

.cloud-top {
    width: 100px;
    height: 100px;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
}

.cloud-small {
    width: 70px;
    height: 70px;
    top: 35%;
    left: 28%;
}

/* Cloud Weather States */
.cloud.sunny .cloud-part {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 230, 0.95) 100%);
}

.cloud.stormy .cloud-part {
    background: linear-gradient(180deg, rgba(180, 190, 200, 0.95) 0%, rgba(140, 150, 160, 0.9) 100%);
}

.cloud.snowy .cloud-part {
    background: linear-gradient(180deg, rgba(240, 245, 255, 0.98) 0%, rgba(220, 230, 245, 0.95) 100%);
}

/* Right Section */
.right-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
}

.main-temp-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
	z-index: 10;
}

.air-quality {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.quality-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.quality-badge {
    background: rgba(76, 175, 80, 0.8);
    color: white;
    font-size: 10px;
    padding: 4px 12px;
    border-radius: 12px;
    animation: pulse 2s ease-in-out infinite;
}

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

.temperature-main {
    display: flex;
    align-items: flex-start;
}

.temp-number {
    font-size: 120px;
    font-weight: 200;
    color: white;
    line-height: 1;
    letter-spacing: -5px;
}

.temp-degree {
    font-size: 40px;
    font-weight: 200;
    color: white;
    margin-top: 10px;
}

.weather-details {
    text-align: right;
}

.weather-details p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

.weather-details .location {
    margin-top: 5px;
    font-weight: 500;
	font-size: 32px;
}

.humidity-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 24px;
}

.humidity-display {
    display: flex;
    align-items: center;
    gap: 12px;
}

.drop-icon {
    color: rgba(100, 180, 230, 0.9);
}

.humidity-value {
    font-size: 28px;
    font-weight: 400;
    color: white;
}

.humidity-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.states-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.states-header {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.state-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
}

.state-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.state-name {
    flex: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.state-temp {
    font-size: 16px;
    color: white;
    font-weight: 400;
}

.state-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.state-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 10px;
    background: rgba(100, 120, 150, 0.5);
    border-radius: 50%;
}

.state-icon.sunny::before {
    width: 14px;
    height: 14px;
    background: rgba(255, 200, 50, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 200, 50, 0.5);
}

.state-icon.windy::before {
    width: 18px;
    height: 3px;
    background: rgba(100, 150, 200, 0.6);
    border-radius: 10px;
}

.state-icon.rainy::before {
    width: 14px;
    height: 8px;
    background: rgba(100, 150, 200, 0.5);
    border-radius: 50% 50% 50% 50%;
}

/* Footer */
.footer-info {
    position: relative;
    z-index: 10;
    padding: 20px 40px;
    text-align: center;
}

.footer-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.footer-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
    }

    .center-section {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .header {
        flex-wrap: wrap;
        gap: 20px;
    }

    .header-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .condition-title {
        font-size: 48px;
    }

    .temp-number {
        font-size: 80px;
    }

    .right-section {
        align-items: flex-start;
    }

    .main-temp-display {
        align-items: flex-start;
    }

    .weather-details {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .dashboard {
        border-radius: 16px;
    }

    .header {
        padding: 15px 20px;
    }

    .main-content {
        padding: 0 20px;
    }

    .city-temps {
        flex-wrap: wrap;
    }

    .bottom-left {
        flex-direction: column;
    }

    .city-search {
        width: 150px;
    }
}
