/* Font Definitions */
.montserrat-regular {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: "Host Grotesk", sans-serif;
    font-weight: 400;
    font-style: normal;
    margin: 0;
    padding: 0;
    color: #fff;
    background: linear-gradient(45deg, rgb(1, 7, 19), rgb(15, 25, 45));
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    min-height: 100vh;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 99999999;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.weather-spinner {
    width: 120px;
    height: 120px;
    position: relative;
    margin-bottom: 20px;
}

.weather-spinner::before {
    content: "🌤️";
    font-size: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: weatherSpin 2s linear infinite;
}

.weather-spinner::after {
    content: "";
    width: 100px;
    height: 100px;
    border: 3px solid rgba(33, 236, 190, 0.3);
    border-top: 3px solid #21ecbe;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: spin 1.5s linear infinite;
}

.loading-text {
    color: #21ecbe;
    font-family: "Montserrat", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes weatherSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

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

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

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    font-family: "Montserrat", sans-serif !important;
    letter-spacing: 1px !important;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu li a:hover {
    color: #21ecbe;
}

.slide-btn {
    cursor: pointer;
}

/* Header */
.header {
    margin-top: 60px;
    text-align: center;
    padding: 15px 0;
}

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

.header-logo {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Wind Meter Styles */
.wind-meter-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 600px;
}

.wind-meter-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wind-meter-title {
    text-align: center;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wind-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.wind-compass {
    position: relative;
    width: 200px;
    height: 200px;
}

.compass-face {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(33, 236, 190, 0.1) 0%, rgba(33, 236, 190, 0.05) 100%);
    border: 2px solid rgba(33, 236, 190, 0.3);
    box-shadow: inset 0 0 20px rgba(33, 236, 190, 0.1);
}

.compass-markings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.compass-marking {
    position: absolute;
    color: #ffffff;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.compass-marking.n {
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-marking.e {
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-marking.s {
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-marking.w {
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-marking.ne {
    top: 15px;
    right: 15px;
    font-size: 12px;
}

.compass-marking.se {
    bottom: 15px;
    right: 15px;
    font-size: 12px;
}

.compass-marking.sw {
    bottom: 15px;
    left: 15px;
    font-size: 12px;
}

.compass-marking.nw {
    top: 15px;
    left: 15px;
    font-size: 12px;
}

.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #21ecbe;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(33, 236, 190, 0.5);
}

.wind-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center bottom;
    transition: transform 0.5s ease-in-out;
}

.arrow-head {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid #21ecbe;
    filter: drop-shadow(0 0 4px rgba(33, 236, 190, 0.8));
}

.arrow-shaft {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 60px;
    background: linear-gradient(to bottom, #21ecbe, rgba(33, 236, 190, 0.3));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(33, 236, 190, 0.6);
}

.wind-info {
    text-align: center;
    color: #ffffff;
}

.wind-speed {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #21ecbe;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

.wind-direction-text {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 1rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.main-title {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
    font-family: "Montserrat", sans-serif !important;
    letter-spacing: 1px !important;
}

.subtitle {
    font-size: 1.4rem;
    opacity: 0.8;
    font-weight: 400;
}

/* Weather Container */
.weather-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr; /* Current Weather | Today's Details | Weather Info | Wind Meter */
    gap: 20px;
    align-items: stretch;
    flex-shrink: 0;
}

/* Current Weather Section */
.current-weather {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

/* Conditions Display */
.conditions-display {
    text-align: center;
    margin-bottom: 15px;
}

.conditions-text {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    color: #21ecbe;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    text-transform: capitalize;
}

/* Temperature Range */
.temperature-range {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 200px;
    margin-top: 15px;
}

.temp-range-item {
    font-family: "Montserrat", sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.background-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.weather-display {
    position: relative;
    z-index: 2;
}

.current-temperature-title {
    font-size: 1.2rem;
    margin: 0 0 15px 0;
    font-weight: 600;
    color: #fff;
    text-align: center;
}


.temperature-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.temperature-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.weather-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.temperature-element {
    font-size: 12rem;
    font-family: 'Montserrat', Arial, sans-serif;
    color: #fff;
    margin: 0;
    transition: color 0.3s ease;
    cursor: pointer;
    position: relative;
    line-height: 1;
    font-weight: 800;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    display: none;
    pointer-events: none;
}

.sun-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.sun-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sun-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.sunrise-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    margin-right: 5px;
}

.sun-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Weather Details Section */
.weather-details-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

/* Additional Weather Info Section */
.weather-additional-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.details-title {
    margin: 0 0 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
    font-family: "Montserrat", sans-serif;
    letter-spacing: 1px;
}

.details-grid {
    display: grid;
    gap: 8px;
    flex: 1;
    align-content: start;
}

.detail-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
}

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

.wind-direction-icon {
    font-size: 1.2rem;
    color: #21ecbe;
    transition: transform 0.3s ease;
    display: inline-block;
    font-weight: bold;
}

.detail-item:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.1);
}

/* Forecast Section */
.forecast-section {
    margin: 30px 0;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

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

.forecast-day:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.forecast-day h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #21ecbe;
}

.forecast-day .date {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.forecast-day hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 15px 0;
}

.forecast-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    display: block;
    object-fit: contain;
}

.forecast-day p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Temperature Chart Section */
.chart-section {
    margin: 30px 0;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    text-align: center;
    font-family: "Host Grotesk", sans-serif;
    line-height: 1.1;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.chart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: "Host Grotesk", sans-serif;
}

.chart-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.chart-btn.active {
    background: #21ecbe;
    border-color: #21ecbe;
    color: #000;
    font-weight: 600;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.chart-range {
    font-size: 0.9rem;
    color: #21ecbe;
    font-weight: 500;
}

.chart-stats {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: right;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.last-updated {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Responsive Design */

/* Tablet responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .weather-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .weather-additional-section {
        grid-column: 1 / -1;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
        position: relative;
    }
    
    .container {
        padding: 0 15px;
        min-height: auto;
        height: auto;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-brand h2 {
        font-size: 1.3rem;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .nav-menu li a {
        font-size: 0.9rem;
    }
    
    .header {
        margin-top: 55px;
        padding: 10px 0;
    }
    
    .header-content {
        gap: 15px;
    }
    
    .header-logo {
        height: 60px;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .weather-container {
        grid-template-columns: 1fr;
        gap: 15px;
        height: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .current-weather,
    .weather-details-section,
    .weather-additional-section {
        padding: 15px;
    }
    
    .current-weather {
        min-height: 350px;
        height: auto;
    }
    
    .temperature-element {
        font-size: 9rem;
    }
    
    .weather-icon {
        width: 50px;
        height: 50px;
    }
    
    .forecast-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .forecast-day {
        padding: 15px;
    }
    
    .chart-container {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .chart-title {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .chart-controls {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .chart-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .chart-wrapper {
        height: 250px;
        padding: 10px;
    }
    
    .chart-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .chart-stats {
        text-align: left;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .nav-brand h2 {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu li a {
        font-size: 0.8rem;
    }
    
    .header {
        margin-top: 50px;
        padding: 8px 0;
    }
    
    .header-content {
        gap: 10px;
    }
    
    .header-logo {
        height: 50px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .current-weather,
    .weather-details-section,
    .weather-additional-section {
        padding: 12px;
    }
    
    .current-weather {
        min-height: 300px;
    }
    
    .temperature-element {
        font-size: 7rem;
    }
    
    .weather-icon {
        width: 40px;
        height: 40px;
    }
    
    .forecast-day {
        padding: 12px;
    }
    
    .forecast-day h4 {
        font-size: 1rem;
    }
    
    .forecast-day .date {
        font-size: 0.8rem;
    }
    
    .forecast-icon {
        width: 40px;
        height: 40px;
    }
    
    .forecast-day p {
        font-size: 0.8rem;
    }
    
    .chart-container {
        padding: 15px 10px;
    }
    
    .chart-title {
        font-size: 1.2rem;
    }
    
    .chart-controls {
        gap: 6px;
    }
    
    .chart-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .chart-wrapper {
        height: 200px;
        padding: 8px;
    }
    
    .chart-range {
        font-size: 0.85rem;
    }
    
    .chart-stats {
        font-size: 0.75rem;
    }
}

/* Use Montserrat font for all titles */
h1, h2 {
    font-family: "Montserrat", sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    font-stretch: normal !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .current-weather,
    .weather-details-section,
    .weather-additional-section {
        border: 2px solid #fff;
    }
    
    .detail-item,
    .sun-item {
        border: 1px solid #fff;
    }
    
    .forecast-day {
        border: 2px solid #fff;
    }
    
    .chart-container {
        border: 2px solid #fff;
    }
    
    .chart-btn {
        border: 2px solid #fff;
    }
    
    .chart-btn.active {
        background: #fff;
        color: #000;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #21ecbe;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .current-weather,
    .weather-details-section,
    .weather-additional-section {
        border: 2px solid #fff;
    }
    
    .detail-item,
    .sun-item {
        border: 1px solid #fff;
    }
    
    .forecast-day {
        border: 2px solid #fff;
    }
    
    .chart-container {
        border: 2px solid #fff;
    }
    
    .chart-btn {
        border: 2px solid #fff;
    }
    
    .chart-btn.active {
        background: #fff;
        color: #000;
    }
}

/* Focus styles for accessibility */
button:focus,
a:focus {
    outline: 2px solid #21ecbe;
    outline-offset: 2px;
}
