:root {
    --primary-color: #ffffff;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align to top so scrolling works naturally */
    padding-top: 50px;
    padding-bottom: 50px;
    color: var(--text-color);
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Richer gradient with more colors as requested */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab, #8e44ad, #f1c40f, #e74c3c);
    background-size: 400% 400%;
    /* Slower animation (30s) */
    animation: gradientBG 30s ease infinite;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: rgba(0, 0, 0, 0.2);
    /* Slight overlay for readability */
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 1000px;
    /* Increased width for 2 columns */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 10px 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.search-box button:hover {
    transform: scale(1.1);
}

.weather-info {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.location-date h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.location-date p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.current-weather {
    margin-bottom: 30px;
}

.temp-container {
    font-size: 4rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.temp-container .unit {
    font-size: 2rem;
    vertical-align: top;
}

#weather-desc {
    font-size: 1.2rem;
    text-transform: capitalize;
    opacity: 0.9;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.forecast-section {
    margin-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    animation: fadeIn 0.6s ease;
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.forecast-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
    margin: 0;
}

.toggle-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
    display: flex;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 12px;
    font-size: 0.8rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
}

.forecast-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom Scrollbar */
.forecast-container::-webkit-scrollbar {
    width: 4px;
}

.forecast-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.forecast-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.forecast-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 12px;
    transition: background 0.2s;
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.forecast-day {
    font-weight: 500;
    font-size: 0.95rem;
}

.forecast-icon {
    font-size: 1.5rem;
    margin-right: 15px;
}

.forecast-temp {
    font-weight: 600;
    opacity: 0.9;
}

.forecast-temp .min {
    opacity: 0.6;
    font-size: 0.85rem;
    margin-left: 5px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-size: 0.8rem;
    opacity: 0.7;
}

.detail-item .value {
    font-size: 1.1rem;
    font-weight: 600;
}

.loading {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-msg {
    text-align: center;
    color: #ffcccc;
    background: rgba(255, 0, 0, 0.1);
    padding: 10px;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

/* News Section Styles */
.news-section h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.1);
}

.news-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFCC70;
    margin-bottom: 5px;
    display: inline-block;
}

.news-item h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-meta {
    font-size: 0.8rem;
    opacity: 0.6;
    display: flex;
    justify-content: space-between;
}

/* Glass Button */
.glass-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.hidden {
    display: none !important;
}

/* Hamburger Menu Button */
.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 60px;
   height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}

.hamburger-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-btn:active {
    transform: scale(0.95);
}

/* Cyprus Cities Menu */
.cyprus-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    padding: 100px 20px 20px 20px;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.3);
}

.cyprus-menu:not(.hidden) {
    transform: translateX(0);
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.menu-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.close-menu {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.cities-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding-right: 5px;
}

.cities-list::-webkit-scrollbar {
    width: 5px;
}

.cities-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cities-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.city-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px 18px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.city-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .cyprus-menu {
        width: 85%;
        max-width: 320px;
    }
    .hamburger-btn {
        width: 50px;
        height: 50px;
    }
}
