:root{
  --bg: #0b0c10;
  --fg: #e6e6e6;
  --muted: #a9a9b3;
  --accent-color: var(--accent-color);
  --accent: #4da3ff;
  --chip: #1f2937;
  --card: #14161d;
  --border: #222533;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

html.light body {
  --bg:#e1e1e1;
  --fg:#191919;
  --muted:#4b5563;
  --accent: var(--accent-color);
  --chip:#f3f4f6;
  --card:#f9fafb;
  --border:#e5e7eb;
  --shadow: 0 12px 24px rgba(0,0,0,.08);
}

/* Overrides the topbar style specifically for light mode */
html.light .topbar {
  background: var(--card); /* Sets the background to #f9fafb */
  backdrop-filter: none;    /* Removes the blur effect to match the solid look */
}

.brand-link {
  text-decoration: none;
}

/* ===================================
   HEADER STYLES
   =================================== */

.topbar {
    position: sticky; top:0; z-index:9;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(0deg, rgba(0,0,0,.0), rgba(0,0,0,.25)), var(--bg);
    backdrop-filter: saturate(1.1) blur(6px);
}

.topbar-inner-container {
    width: 100%;
    max-width: 1050px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.topbar-flex-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.brand-logo {
  background-color: var(--accent-color);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: 'Agbalumo', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  padding-top: 5px;
}

.menu-link {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.menu-link:hover {
  background-color: var(--chip);
}

.top-actions {
  display:flex;
  gap:10px;
  align-items:center;
}

@media (min-width: 651px) {
    .menu-toggle {
        display: none;
    }
    
    .topbar-flex-container {

    }
    .top-menu {
        display: flex;
        align-items: center;
        margin-right: auto;
    }
}

/* --- UNIVERSAL MOBILE MENU STYLES --- */
@media (max-width: 650px) {
    /* By default on mobile, hide the desktop menu group */
    .topbar-flex-container {
        display: none;
    }

    /* Show the hamburger button */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--fg);
        font-size: 24px;
        cursor: pointer;
    }

    /* This is the dropdown panel that appears when the menu is open */
    #mainHeader.menu-open .topbar-flex-container {
        display: flex; /* Show the group as the dropdown */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow);
        padding: 10px 18px 20px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Styles for the items inside the open dropdown */
    #mainHeader.menu-open .top-menu,
    #mainHeader.menu-open .top-actions {
        display: flex;
    }
    #mainHeader.menu-open .top-menu {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    #mainHeader.menu-open .top-actions {
        width: 100%;
        padding-top: 15px;
        margin-top: 10px;
        border-top: 1px solid var(--border);
    }
}

/* ===================================
   GENERAL PAGE STYLES
   =================================== */

@font-face {
  font-family: 'Time Traveler';
  src: url('../fonts/TimeTravelerPal-Normal-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.45 'Inter', system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
  display: flex;
  flex-direction: column;
    
}

.ghost-btn, .ghost-link{
  border:1px solid var(--border); background:transparent; color:var(--fg);
  padding:8px 10px; border-radius:12px; cursor:pointer; text-decoration:none;
}
.ghost-btn:hover, .ghost-link:hover{ border-color:#2a2e3f }

.container{ 
    max-width:1050px; 
    margin: 0 auto; 
    padding: 28px 18px 60px; 
    flex-grow: 1;
    width: 100%;
}

.hero{ text-align:center; margin-top: 60px; }
.location-line{ color: var(--muted); margin-bottom: 10px; font-size: 18px; }
.chip {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    vertical-align: middle;
}


.actions{ margin-top: 24px; }
.primary-btn{
  background-color:var(--accent-color); !important; border: none; cursor: pointer;
  padding: 12px 20px;
  color: #fff !important;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.1s ease;
}
.primary-btn:active{ transform: translateY(1px); }

.search{ margin-top: 60px; }
h2{
  margin: 0 0 18px;
  font-size: 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 10px;
}
.search-wrapper {
  position: relative;
  flex-grow: 1;
}
.search-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card); color: var(--fg);
  border:1px solid var(--border);
  font-size: 16px;
}
.search-input:focus { outline: none; border-color: #2b6cff; }
.search-row .primary-btn { flex-shrink: 0; }
@media (max-width: 640px){
  .search-row { flex-direction: column; }
  .search-row .search-wrapper,
  .search-row .primary-btn { width: 100%; }
}


.help{ color: var(--muted); font-size: 14px; margin: 10px 2px 0; }

.city-grid{
  display:grid; gap:12px; grid-template-columns: repeat( auto-fit, minmax(220px, 1fr) );
}
/* THIS IS THE FIX FOR THE CLICKABLE CURSOR */
#cityGrid .city-card {
  cursor: pointer;
}
.city-card{
  position: relative;
  border:1px solid var(--border); background: var(--card); border-radius: 16px; padding: 18px;
  box-shadow: var(--shadow);
}
.city-title{ font-weight:700; font-size: 17px; margin-bottom: 6px; }
.city-time{
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight:800;
  font-family: 'Inter', sans-serif;
}
.city-sub{ color: var(--muted); font-size: 13px; margin-top: 6px; }

.city-result-grid{ margin-top: 12px; }

/* --- Footer Carousel --- */
.footer-carousel {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 5px 0;
    color: var(--muted);
    z-index: 10;
    border-top: 1px solid var(--border);
    background: linear-gradient(0deg, rgba(0,0,0,.0), rgba(0,0,0,.25)), var(--bg);
    backdrop-filter: saturate(1.1) blur(6px);
    
    /* Hide the horizontal scrollbar and prevent text wrapping */
    overflow: hidden;
    white-space: nowrap;
}

html.light .footer-carousel {
    background: var(--card);
    backdrop-filter: none;
}

/* --- Footer Carousel Hover Effect --- */
#footerCarouselTrack {
    display: flex;
    align-items: center;
}

/* Style the link tags to be inline and look correct */
a.carousel-item {
    /* Reset link appearance */
    color: inherit;
    text-decoration: none;

    /* **THE FIX IS HERE** */
    display: flex;
    flex-direction: row;    /* Arrange items horizontally */
    align-items: baseline;  /* Align text along the bottom for a clean look */
    white-space: nowrap;    /* Prevent city info from wrapping to a new line */

    /* Restore spacing */
    gap: 2px; /* Creates space between city, time, and offset */
    padding: 5px 10px;
}

a.carousel-item:hover .city {
    color: var(--accent-color); /* Optional: Add a hover effect */
}

.carousel-track {
    display: inline-block;
    /* The animation will be applied by JavaScript */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.carousel-item {
    display: inline-block;
    margin: 0 20px;
    font-size: 14px;
}

.carousel-item .city {
    font-weight: 700;
    color: var(--accent-color);
}

.carousel-item .time {
    font-variant-numeric: tabular-nums;
    margin: 0 8px;
}



.city-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.add-city-btn {
    display: flex
;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 22px;
    font-weight: bold;
    color: #ffffff;
    background-color: var(--accent-color);
    border: 1px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s 
    ease;
    position: absolute;
    top: 50px;
    right: 18px;
}
.add-city-btn:hover { color: var(--fg); border-color: var(--accent); }
.remove-city-btn {
  position: absolute; 
  bottom: 15px; 
  left: 15px;
  width: 20px; 
  height: 20px;
  background-color: rgba(0,0,0,0.3); color: var(--muted);
  border: none; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.city-card:hover .remove-city-btn { opacity: 1; }
.remove-city-btn:hover { color: #fff; background-color: var(--accent-color); }

@media (max-width: 480px) {
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.autocomplete-results {
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: 240px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 12px 12px;
  z-index: 10;
}
.autocomplete-item { padding: 10px 14px; cursor: pointer; }
.autocomplete-item:hover { background-color: var(--chip); }
.autocomplete-item mark { 
    background: none; 
    color: var(--accent-color);
    font-weight: bold; 
}

/* --- Timezone Slider Styles --- */
.info-slider {
  position: fixed; top: 0; right: -450px;
  width: 100%; max-width: 420px; height: 100%;
  background-color: var(--card); border-left: 1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  z-index: 1001;
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
}
.info-slider.is-open { right: 0; }
.slider-content { padding: 30px; }
.close-slider-btn {
  position: absolute; top: 15px; right: 20px;
  background: none; border: none; color: var(--muted);
  font-size: 28px; cursor: pointer; line-height: 1; padding: 5px;
}
.close-slider-btn:hover { color: var(--fg); }
.slider-backdrop {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.slider-backdrop.is-visible { opacity: 1; pointer-events: all; }
.slider-content h2 { font-size: 28px; margin-top: 10px; margin-bottom: 5px; }
.slider-content h2 strong { font-weight: 900; }
.slider-content p { font-size: 20px; color: var(--muted); margin-top: 0; margin-bottom: 24px; }
.slider-content ul { list-style: none; padding: 0; margin-bottom: 30px; font-size: 16px; }
.slider-content li { margin-bottom: 12px; }

.change-block {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid #dfdfdf;
    border-radius: 16px;
    padding: 16px;
    /* background-color: #e1e1e1; */
    margin-top: 25px;
}

.change-block .date-box {
    background-color: var(--chip);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid var(--accent-color);
}

.change-block .date-box .day { font-size: 24px; display: block; line-height: 1; }
.change-block .date-box .month { font-size: 14px; display: block; color: var(--muted); margin-top: 4px; text-transform: uppercase; }
.change-block h3 { margin-top: 0; margin-bottom: 8px; font-size: 18px; }
.change-block ul { margin: 0; font-size: 14px; color: var(--muted); }
.change-block li { margin-bottom: 6px; }
.change-block strong { color: var(--fg); font-weight: 700; }

/* --- Time Zone Page Styles --- */

.page-title {
    font-size: 50px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: -0.05em;
}



.page-subtitle { font-size: 18px; color: var(--muted); margin-top: 0; letter-spacing: -0.05em;}
.timezone-list-section { margin-top: 40px; }
.tz-group { margin-bottom: 40px; }
.tz-group-header {
  font-size: 24px; font-weight: 700; color: var(--fg);
  border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 20px;
}
.tz-group-header .utc-offset { font-family: monospace; font-size: 20px; color: var(--muted); margin-left: 10px; }
.tz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tz-entry { line-height: 1.6; }
.tz-name { font-weight: 700; color: var(--fg); }
.tz-cities { font-size: 14px; color: var(--muted); }
.tz-search-wrapper { margin-top: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.tz-search-input {
  width: 100%; padding: 12px 16px; border-radius: 12px;
  background: var(--card); color: var(--fg); border: 1px solid var(--border);
  font-size: 16px; font-family: 'Inter', sans-serif;
}
.tz-search-input:focus { outline: none; border-color: var(--accent); }
.hidden { display: none !important; }

/* --- Tooltip Styles --- */
.tippy-box[data-theme~='whatime'] {
  background-color: #f9fafb;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow);
}
.tippy-box[data-theme~='whatime'][data-placement^='top'] > .tippy-arrow::before { border-top-color: #f9fafb; }
.tippy-box[data-theme~='whatime'][data-placement^='bottom'] > .tippy-arrow::before { border-bottom-color: #f9fafb; }
html.light body .tippy-box[data-theme~='whatime'] {
  background-color: #111827;
  color: #f9fafb;
  border: 1px solid #374151;
}
html.light body .tippy-box[data-theme~='whatime'][data-placement^='top'] > .tippy-arrow::before { border-top-color: #111827; }
html.light body .tippy-box[data-theme~='whatime'][data-placement^='bottom'] > .tippy-arrow::before { border-bottom-color: #111827; }
.tippy-content { padding: 4px 8px; line-height: 1.5; }

/* --- City Card Actions & Dragging Styles --- */

.city-card-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    align-items: center; /* Center the toggle vertically */
}

/* The toggle switch container */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

/* Hide the default HTML checkbox */
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider (the track of the toggle) */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #191919;
    transition: .4s;
    border-radius: 34px;
}

/* The knob of the toggle */
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Styles for the 'On' state */
input:checked + .slider {
    background-color: var(--accent-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Visual feedback for the item being dragged */
.sortable-ghost {
    opacity: 0.4;
    background-color: #4da3ff;
}

/* --- Scroll Progress & Back to Top Button --- */

.progress-wrap {
  position: fixed;
  right: 40px;
  bottom: 100px;
  height: 46px;
  width: 46px;
  cursor: pointer;
  display: block;
  border-radius: 50px;
  box-shadow: inset 0 0 0 2px var(--border);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 200ms linear;
  
  /* NEW: SVG arrow as a background image */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
  color: var(--fg); /* This variable will now color the arrow */
}

.progress-wrap.active-progress {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.progress-wrap:hover {
  background-color: var(--accent-color);
  border-color: var(--accent);
  color: #fff; /* This will make the arrow white on hover */
}

.progress-wrap svg {
  position: absolute;
  top: 0;
  left: 0;
}

.progress-wrap svg path { 
  fill: none; 
}

.progress-wrap svg.progress-circle path {
  stroke: var(--accent-color);
  stroke-width: 4;
  box-sizing: border-box;
  transition: all 200ms linear;
}

/* Add this to style.css */

.logo-accent-letter {
    font-family: 'Agbalumo', cursive; /* Apply the new font */
    /* If Agbalumo is much larger or smaller than Inter, you might need a slight adjustment */
    /* font-size: 1.1em; */ 
    /* color: #f00; */ /* Optional: Change color if you want it to stand out more */
}


/* --- 7-Day Forecast --- */

.forecast-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding: 10px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.forecast-container.is-loading {
    opacity: 0.5;
    transform: scale(0.98); /* A subtle shrink adds to the effect */
    pointer-events: none; /* Prevents clicking during the update */
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--muted);
    background-color: var(--chip);
    padding: 10px;
    border-radius: 12px;
    min-width: 80px;
}
.forecast-day .day-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--fg);
}
.forecast-day .temps {
    font-size: 14px;
    margin-top: 5px;
}
.forecast-day .temps strong {
    color: var(--fg);
}

/* --- Generic Input Style --- */
.styled-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--card); /* This matches the homepage input */
    color: var(--fg);
    border: 1px solid var(--border);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}
.styled-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* --- Dropdown Menu --- */
.dropdown {
    position: relative; /* This is the anchor for the dropdown menu */
}

.dropdown-toggle {
    background: none;
    border: none;
    font-size: 16px; /* Match font size of other links */
    font-family: 'Inter', sans-serif;
    padding: 8px 12px;
}

.dropdown-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 100;
}

/* This class will be added by JavaScript to show the menu */
.dropdown.is-open .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    color: var(--fg);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
}

.dropdown-menu a:hover {
    background-color: var(--chip);
}

.menu-link.dropdown-toggle {
    background: none;
    border: none;
    color: var(--fg);
    cursor: pointer;
    /* It inherits font-size, padding, etc., from the .menu-link class */
}

/* --- Hide "Back to Top" on Mobile --- */
@media (max-width: 768px) {
    .progress-wrap {
        display: none !important;
    }
    #settings-sidebar {
        display: none !important;
    }
    
}

/* --- DST Change Info Blocks --- */
.change-block {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-top: 25px;
}

.change-block .date-box {
    background-color: var(--chip);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    font-weight: 700;
    flex-shrink: 0;
}

.change-block .date-box .day {
    font-size: 40px;
    display: block;
    line-height: 1;
    color: var(--accent-color);
}

.change-block .date-box .month,
.change-block .date-box .weekday {
    font-size: 14px;
    display: block;
    color: var(--muted);
    margin-top: 4px;
    text-transform: uppercase;
}
.change-block .date-box .weekday {
    margin-top: 6px;
}

.change-block h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 18px;
}

.change-block ul {
    list-style: square;
    padding-left: 20px;
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.change-block li {
    margin-bottom: 6px;
}

.change-block strong {
    color: var(--fg);
    font-weight: 700;
}

/* --- Pulsing Animation for the Timezone Chip --- */

/* Defines the keyframes for the pulse effect */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(224, 63, 86, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0);
  }
}

/* Applies the animation to the specific chip on the homepage */
#tzAbbrev {
  animation: pulse 2s infinite;
}

/* --- Buy Me A Coffee Button --- */
.buy-me-a-coffee-btn {
  position: fixed;
  bottom: 100px;
  left: 40px;
  height: 50px;
  width: 50px;
  background-color: var(--chip);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  z-index: 5;
  
  /* The SVG icon is embedded as a background image */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8h1a4 4 0 0 1 0 8h-1'%3E%3C/path%3E%3Cpath d='M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z'%3E%3C/path%3E%3Cline x1='6' y1='1' x2='6' y2='4'%3E%3C/line%3E%3Cline x1='10' y1='1' x2='10' y2='4'%3E%3C/line%3E%3Cline x1='14' y1='1' x2='14' y2='4'%3E%3C/line%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px;
  color: var(--fg); /* This colors the SVG icon */

  transition: all 0.3s ease;
}

.buy-me-a-coffee-btn:hover {
  background-color: var(--accent-color); /* Red background on hover */
  border-color: #fff;       /* White border on hover */
  color: #fff;              /* White icon on hover */
  transform: scale(1.1);
}

/* Hide this button on mobile, just like the Back to Top button */
@media (max-width: 768px) {
    .buy-me-a-coffee-btn {
        display: none;
    }
    
        #settings-trigger {
        display: none !important;
    }
}

/* --- Global Countdown Display --- */
.global-countdown {
    /* This makes it stick to the top of the viewport */
    position: fixed;
    top: 66px; /* Adjust this value to match your header's height */
    
    /* This centers it horizontally */
    left: 50%;
    transform: translateX(-50%);
    
    z-index: 9; /* Positioned just below the header */
    
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--card);
    /* --- border: 1px solid var(--border); --- */
    /* --- border-radius: 999px; --- */
    padding: 6px 12px;
    box-shadow: var(--shadow);
    font-size: 14px;
    font-weight: 700;
    border-top-left-radius: 0px; 
    border-bottom-right-radius: 12px; 
    border-top-right-radius: 0; 
    border-bottom-left-radius: 12px;
}

.global-countdown.hidden {
    display: none;
}

#global-countdown-event {
    color: var(--muted);
}

#global-countdown-time {
    color: var(--accent-color);
    font-size: 16px;
    min-width: 50px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

#global-countdown-close {
    background: var(--chip);
    color: var(--muted);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
#global-countdown-close:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* Hide on mobile to prevent clutter */
@media (max-width: 900px) {
    .global-countdown {
        display: none;
    }
}

/* --- Pulsing Animation for Coffee Button --- */

/* 1. Defines the animation keyframes */
@keyframes pulse-coffee {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(224, 63, 86, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(224, 63, 86, 0);
  }
}

/* 2. Applies the animation to the button */
.buy-me-a-coffee-btn {
  /* ... your existing styles for the button ... */
  
  animation: pulse-coffee 2s infinite;
}

/* --- Weather Widget Section --- */
.weather-image-display {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    background-color: var(--card);
    background-size: cover;
    background-position: center;
    color: #fff;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Align content to the bottom */
    padding: 20px;
    margin-top: 30px; /* Space above the image */
    margin-bottom: 20px; /* Space between image and forecast */
}
/* Dark overlay */
.weather-image-display::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.1));
    z-index: 1;
}
.weather-image-display > * {
    position: relative;
    z-index: 2;
}
.current-weather { text-shadow: 0 2px 5px rgba(0,0,0,0.5);}
.current-temp { font-size: 30px; font-weight: 800; line-height: 1; }
.current-city-weather { font-size: 18px; font-weight: 700; }
.current-weather-icon {
    position: absolute;
    top: 10px;
    right: 10px;
}
.current-weather-icon .icon {
    transform: scale(0.4);
    transform-origin: top right;
}

/* --- Time Zone Difference Chart --- */
.tz-diff-chart-container {
    margin-top: 60px;
}

.tz-diff-chart {
    position: relative;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.tz-diff-chart::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
    z-index: 1;
}

.diff-row {
    position: relative;
    display: grid;
    /* NEW: Updated grid columns for the new layout */
    grid-template-columns: 100px 1fr 1fr 100px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
}

.diff-row.is-current {
    background-color: var(--chip);
    border-radius: 8px;
    margin: -4px -8px;
    padding: 12px 8px;
}

.diff-row .label { text-align: right; color: var(--muted); font-weight: 700; }
.diff-row .offset { text-align: left; color: var(--muted); font-weight: 700; }
.diff-row .city-name { font-weight: 700; color: var(--fg); }

/* NEW: Alignment styles */
.diff-row .city-name.left-aligned { text-align: right; }
.diff-row .city-name.right-aligned { text-align: left; }

.diff-bar-container { display: flex; }
.diff-bar-container.left { justify-content: flex-end; }
.diff-bar-container.right { justify-content: flex-start; }

.diff-bar {
    height: 12px;
    background-color: var(--accent);
    border-radius: 4px;
}

/* The central red line */
.tz-diff-chart::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--accent-color);
    transform: translateX(-50%);
    z-index: 1;
}

.diff-row {
    position: relative;
    display: grid;
    grid-template-columns: 100px 1fr 1fr 100px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 15px;
}

.diff-row.is-current {
    background-color: var(--chip);
    border-radius: 8px;
    margin: -4px -8px; /* Adjust for padding */
    padding: 12px 8px;
}

.diff-row .label,
.diff-row .offset {
    color: var(--muted);
    font-weight: 700;
}

.diff-row .label {
    text-align: right;
}
.diff-row .offset {
    text-align: left;
}
.diff-row .city-name {
    font-weight: 700;
    color: var(--fg);
}

.diff-bar-container {
    display: flex;
}
.diff-bar-container.left {
    justify-content: flex-end; /* Bars grow from right to left */
}
.diff-bar-container.right {
    justify-content: flex-start; /* Bars grow from left to right */
}

.diff-bar {
    height: 12px;
    background-color: var(--accent-color);
    border-radius: 4px;
}


/* --- Hide Time Difference Chart on Mobile --- */
@media (max-width: 768px) {
    .tz-diff-chart-container {
        display: none;
    }
}

/* --- Time Difference String in Sidebar --- */
.time-diff-string {
    font-size: 16px !important; /* Override other p styles */
    font-weight: 700;
    color: var(--fg) !important;
    margin-bottom: 25px !important;
    border: 1px solid var(--border);
    background-color: var(--chip);
    padding: 8px 12px;
    border-radius: 8px;
}


/* --- Custom Dropdown Styles --- */
.dropdown {
    min-width: 180px; /* A bit wider for years and cantons */
    position: relative;
    font-weight: 700;
    font-size: 16px;
}

.dropdown .select {
    background: var(--chip);
    color: var(--fg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: 0.3s;
}

.dropdown .select-clicked {
    border-color: var(--accent-color);
    box-shadow: 0 0 0.5em var(--accent-color);
}

.dropdown .select:hover {
    background: var(--card);
}

.dropdown .caret {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--fg);
    transition: 0.3s;
}

.dropdown .caret-rotate {
    transform: rotate(180deg);
}

.dropdown .menu {
    list-style: none;
    padding: 0.5em;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    border-radius: 0.5em;
    color: var(--muted);
    position: absolute;
    top: 3.2em;
    left: 0;
    width: 100%;
    opacity: 0;
    display: none;
    transition: 0.2s ease-in-out;
    z-index: 10;
    max-height: 250px; /* Prevent super long lists */
    overflow-y: auto;
}

.dropdown .menu li {
    padding: 0.7em 0.5em;
    margin: 0.3em 0;
    border-radius: 0.5em;
    cursor: pointer;
    color: var(--fg);
}

.dropdown .menu li:hover {
    background: var(--chip);
}

.dropdown .menu .active {
    background: var(--accent-color);
    color: #fff;
}

.dropdown .menu-open {
    display: block;
    opacity: 1;
}

@media (max-width: 600px) {
    .dropdown .menu {
        left: auto;
        right: 0;
    }
}

/* --- Custom Scrollbar for Dropdown Menu --- */
.dropdown .menu::-webkit-scrollbar {
    width: 8px; /* Sets the width of the scrollbar */
}

.dropdown .menu::-webkit-scrollbar-track {
    background: var(--chip); /* Sets the background of the track */
    border-radius: 10px;
}

.dropdown .menu::-webkit-scrollbar-thumb {
    background-color: var(--accent-color); /* Sets the color of the scroll handle (red) */
    border-radius: 10px; /* Rounds the corners of the handle */
    border: 2px solid var(--chip); /* Optional: Adds a small border to match the track */
}

/* --- New Vertical Color Picker --- */
#settings-sidebar {
    position: fixed;
    top: 50%;
    right: 15px; /* Position from the right edge */
    transform: translateY(-50%);
    z-index: 1050;
    
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 99px; /* This creates the pill shape */
    box-shadow: var(--shadow);
    
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center;
    padding: 8px; /* Padding inside the pill */
}

#settings-panel {
    overflow: hidden; /* Hides swatches during animation */
    /* NEW: Animation using max-height for a clean slide-up/down */
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding-bottom 0.4s ease;
}

.color-palette {
    display: flex;
    flex-direction: column; /* Stack color swatches vertically */
    gap: 10px;
}

#settings-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px; /* A little space around the icon */
    display: flex;
}

#settings-trigger svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-color);
    transition: transform 0.4s ease;
}

/* --- Open/Closed States --- */
#settings-sidebar.is-open #settings-panel {
    max-height: 300px; /* Animate to full height */
    opacity: 1;
    padding-bottom: 15px; /* Add space between swatches and trigger */
}

#settings-sidebar.is-open #settings-trigger svg {
    transform: rotate(90deg);
}

/* Note: Swatch styles remain the same as they were working correctly */
.color-swatch {
    width: 24px;   /* <-- Change this */
    height: 24px;  /* <-- Change this */
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-color);
}

.back-link {
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-block;
    margin-top: 20px;
    margin-bottom: 20px;
}


/* --- Global Toast Notification --- */
#toast-notification {
    position: fixed;
    /* CHANGE: Move from top to bottom */
    bottom: 20px;
    left: 50%;
    background: var(--card);
    color: var(--fg);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 3000;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    
    /* Initially hidden */
    opacity: 0;
    /* CHANGE: Start position is now below the screen */
    transform: translate(-50%, 20px); 
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

#toast-notification.show {
    opacity: 1;
    /* Final position is centered */
    transform: translate(-50%, 0);
}

#toast-color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

/* --- Global Modal Overlay Styles --- */
.modal-overlay {
    position: fixed; /* Takes the modal out of the normal page flow */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
    display: flex; /* Centers the content */
    align-items: center;
    justify-content: center;
    z-index: 2000; /* Ensures it's on top of other content */
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* Prevents interaction when hidden */
}

.modal-content {
    background: var(--card); /* Use your theme's card background */
    border-radius: 16px;
    box-shadow: var(--shadow); /* Use your theme's shadow */
    transform: scale(1);
    transition: transform 0.3s ease;
    /* Prevent content overflow from breaking the modal */
    overflow: hidden; 
}

.modal-overlay.hidden .modal-content {
    transform: scale(0.95); /* Optional: Slight shrink effect when hiding */
}


/* --- Global Button Styles --- */
.action-btn-outline,
.action-btn-primary,
.btn-outline, /* Added general class */
.btn-primary { /* Added general class */
    height: 40px;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: background-color 0.2s, color 0.2s, filter 0.2s;
    font-family: Inter, system-ui; /* Match font if needed */
    display: inline-flex; /* Use flex for alignment with icons */
    align-items: center;
    justify-content: center;
    gap: 8px; /* Space between icon and text */
    text-decoration: none; /* For <a> tags styled as buttons */
}

.action-btn-outline,
.btn-outline {
    background: transparent;
    color: var(--fg);
}
.action-btn-outline:hover,
.btn-outline:hover {
    background: var(--chip);
}

.action-btn-primary,
.btn-primary {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}
.action-btn-primary:hover,
.btn-primary:hover {
    filter: brightness(1.1);
}

/* --- Global Dropdown Styles --- */
.dropdown-container { /* General container for dropdowns */
    position: relative;
    display: inline-block;
    z-index: 100;
}

.main-button-group { /* For buttons like Export + Arrow */
    display: flex;
    border-radius: 8px;
    overflow: hidden;
}

.main-button-group .btn-primary,
.main-button-group .action-btn-primary {
    border-radius: 0;
    border: none;
}

.main-button-group .btn-primary:first-child,
.main-button-group .action-btn-primary:first-child {
    border-radius: 8px 0 0 8px;
}

.main-button-group .dropdown-toggle {
    width: 40px;
    border-radius: 0 8px 8px 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.dropdown-toggle svg {
    display: block;
}

/* General Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 200px;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 110; /* Ensure it's above other elements */
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    background: none;
    border: none;
    color: var(--fg);
    padding: 10px 15px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none; /* For <a> tags used as items */
    font-family: Inter;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
    stroke: currentColor;
}

.dropdown-item:hover {
    background: var(--bg-soft);
}

/* --- Navigation Dropdown --- */

/* 1. The main container is just a simple wrapper */
#mainHeader .menu-dropdown-container {
    position: relative;
    display: inline-block; /* Sits in line with other links */
}

/* 2. Style the <a> tag to hold the caret */
#mainHeader .menu-dropdown-container .menu-link {
    display: flex;
    align-items: center;
    gap: 4px; /* Space between "Create" and the caret */
}

/* 3. Style the dropdown menu (hidden by default) */
#mainHeader .menu-dropdown-container .dropdown-menu {
    position: absolute;
    top: 100%; /* Sits right below the <a> tag */
    left: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 8px 0;
    min-width: 160px;
    z-index: 100;
    
    /* Hide it */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    
    /* Delay hiding to prevent "gap" issue */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s ease 0.2s;
}

/* 4. Show the menu on hover */
#mainHeader .menu-dropdown-container:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    
    /* Show instantly to allow mouse to move onto it */
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s ease 0s;
}

/* 5. Rotate the caret on hover */
#mainHeader .menu-dropdown-container .caret {
    transition: transform 0.2s ease;
    color: currentColor; 
}
#mainHeader .menu-dropdown-container:hover .menu-link .caret {
    transform: rotate(180deg);
}

/* 6. Style the links inside the dropdown */
#mainHeader .menu-dropdown-container .dropdown-item {
    display: block;
    padding: 10px 15px;
    color: var(--fg);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

#mainHeader .menu-dropdown-container .dropdown-item:hover {
    background: var(--chip);
}

/* 7. Highlight the active item in the dropdown */
#mainHeader .menu-dropdown-container .dropdown-item.active {
    color: var(--accent-color);
    font-weight: 700;
}



/* --- CSS Fixes for Coolors Conflicts --- */

/* Force your navigation bar to be on top */
header#mainHeader {
    position: relative !important;
    z-index: 1001 !important;
}

/* Force Coolors wrapper to be below your header */
.wrapper#collage-maker {
    padding-top: 80px; /* Adjust this value to match your header's height */
}

/* Reset styles for your navigation that Coolors breaks.
  We use !important to ensure your styles win.
*/
#mainHeader .top-menu .menu-link,
#mainHeader .top-menu .menu-dropdown-container a,
#mainHeader .top-menu .menu-dropdown-container span {
    font-family: Inter, sans-serif !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: var(--fg) !important;
    padding: 10px 15px !important;
    background: none !important;
    text-transform: none !important;
    line-height: 1.5 !important;
}

#mainHeader .top-menu .menu-link.active {
    color: var(--accent-color) !important;
    border-bottom: 2px solid var(--accent-color) !important;
}

/* Fix dropdown menu position */
#mainHeader .menu-dropdown-container .dropdown-menu {
    top: 100% !important;
    padding: 8px 0 !important;
    min-width: 160px !important;
}

#mainHeader .menu-dropdown-container .dropdown-item {
    padding: 10px 15px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--fg) !important;
}

#mainHeader .menu-dropdown-container .dropdown-item:hover {
    background: var(--chip) !important;
}

/* Reset button styles for your theme toggle */
#mainHeader #themeToggle {
    background: transparent !important;
    border: none !important;
    color: var(--fg) !important;
    font-size: 24px !important;
}

/* Fix your logo */
#mainHeader .brand-logo {
    font-family: 'Pacifico', sans-serif !important;
    font-size: 32px !important;
    color: var(--accent-color) !important;
    background: none !important;
}



/* --- CUSTOM SPEECH BUBBLE TOOLTIP STYLES --- */
#custom-tooltip {
    /* 1. Base Box Styling (The Black Bubble) */
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    
    background-color: #1a1a1a; /* Solid Black Background */
    color: #FFFFFF; /* White Text */
    
    padding: 8px 15px; /* Generous padding */
    border-radius: 8px; /* Slightly rounded corners */
    
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: capitalize; /* Optional: Makes the text look clean */
    
    /* Animation and initial hidden state */
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(5px); 
}

/* 2. The Caret (Speech Bubble Arrow) */
#custom-tooltip::after {
    content: "";
    position: absolute;
    /* Center it horizontally */
    left: 50%;
    /* Position it just below the main box */
    top: 100%; 
    margin-left: -5px; /* Pull it back half its width (10px total) */
    
    /* Create the downward triangle using borders */
    border-width: 5px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent; /* Solid top border (the arrow color) and transparent sides/bottom */
}

/* 3. Class to make the tooltip visible */
#custom-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}


body.no-scroll {
    overflow: hidden;
}






