:root {
  --bg: #0f1117;
  --card: #1a1d26;
  --accent: #7ef0a6;
  --accent-soft: rgba(126, 240, 166, 0.15);
  --text: #f1f3f5;
  --muted: #9aa3b2;
  --danger: #e74c3c;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --maxw: 1100px;
}

/* BASE */
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  line-height: 1.5;
}

/* LAYOUT */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
}

/* HEADINGS */
h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 5px;
}

h2 {
  text-align: center;
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 20px;
}

/* LOCAL TIME */
#local-time {
  color: var(--accent);
  font-weight: bold;
}

/* INPUT AREA */
#add-zone {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 25px 0;
}

/* INPUTS */
input, select {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #12141b;
  color: var(--text);
  font-size: 0.95rem;
  transition: 0.2s ease;
}

input::placeholder {
  color: #777;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* BUTTON */
button {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: none;
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(126, 240, 166, 0.2);
}

button:active {
  transform: scale(0.98);
}

/* GRID */
#zones-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* RESPONSIVE GRID */
@media (max-width: 1100px) {
  #zones-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  #zones-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  #zones-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .scroll-track {
    animation-duration: 60s;
  }
}

/* CARD */
.time-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
  border: 1px solid var(--border);
  transition: 0.2s ease;
  position: relative;
}

.time-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* FLAG */
.flag {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* CITY NAME */
.time-card h3 {
  margin: 5px 0;
  font-size: 1.1rem;
}

/* TIME */
.time {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--accent);
  margin-top: 10px;
}

/* LABEL */
.label-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 5px;
  cursor: pointer;
}

.label-text:hover {
  color: var(--accent);
}

/* REMOVE BUTTON */
.remove-btn {
  margin-top: 12px;
  background: var(--danger);
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: 6px;
}

.remove-btn:hover {
  background: #ff5c4d;
}

/* FOOTER */
footer {
  margin-top: 60px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* LINKS */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* HEADER */
.app-header {
  text-align: center;
  margin-bottom: 30px;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

/* CONTROL PANEL */
.control-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 30px;
}

.panel-header {
  text-align: center;
  margin-bottom: 15px;
}

.panel-header #local-time {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--accent);
}

/* CONTROLS */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ZONES SECTION */
.zones-section h2 {
  text-align: center;
  margin-bottom: 15px;
}

/* QUICK LINKS */
.quick-links {
  margin-top: 40px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.city-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: 0.2s;
}

.city-link:hover {
  background: var(--accent-soft);
}

/* INFO SECTION */
.info-section {
  margin-top: 50px;
  color: var(--muted);
}

.info-section h2,
.info-section h3 {
  color: var(--text);
}

.info-section ul {
  padding-left: 20px;
}

/* EXPLORE SECTION */
.explore-section {
  margin-top: 50px;
}

.explore-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 25px;
}

/* GROUPS */
.city-group {
  margin-bottom: 30px;
}

.city-group h3 {
  margin-bottom: 10px;
}

/* REGION BLOCK */
.region-block {
  margin-bottom: 15px;
}

.region-block h4 {
  margin-bottom: 5px;
  color: var(--accent);
}

/* LINKS */
.link-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.city-link.featured {
  background: var(--accent-soft);
  font-weight: bold;
}

/* EXPAND BUTTON */
.expand-btn {
  display: block;
  margin: 10px auto;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.expand-btn:hover {
  background: var(--accent-soft);
}

/* HIDDEN */
.hidden {
  display: none;
}

.scroll-wrapper {
  overflow: hidden;
  position: relative;

  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  padding: 10px 0;
}

.scroll-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll-left 40s linear infinite; /*adjust to 40 to make it slower*/
}

.scroll-item {
  white-space: nowrap;
  padding: 8px 14px;
  background: #1a1a25;
  border-radius: 20px;
  text-decoration: none;
  color: #7ef0a6;
  font-size: 0.95em;
  transition: all 0.2s ease;
}

.scroll-item:hover {
  background: #7ef0a6;
  color: #0b0b0b;
  transform: scale(1.1);
}

/* Pause on hover (nice UX touch) */
.scroll-wrapper:hover .scroll-track {
  animation-play-state: paused;
}

@keyframes scroll-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.scroll-wrapper::before,
.scroll-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  width: 40px;
  height: 100%;
  z-index: 2;
}

.scroll-wrapper::before {
  left: 0;
  background: linear-gradient(to right, #0b0b0b, transparent);
}

.scroll-wrapper::after {
  right: 0;
  background: linear-gradient(to left, #0b0b0b, transparent);
}

.main-header {
  position: sticky;
  top: 0;
  background: rgba(15,17,23,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.logo a {
  font-weight: bold;
  color: var(--text);
  font-size: 1.1rem;
}

.main-nav {
  display: flex;
  gap: 20px;
}

.main-nav a {
  color: var(--muted);
  transition: 0.2s;
}

.main-nav a:hover {
  color: var(--accent);
}