@import url("https://fonts.googleapis.com/css?family=Montserrat");

:root {
  --color-bg: #111;
  --color-navbar-gradient: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);
  --color-white: white;
  --color-blue: blue;
  --color-gold: gold;
  --color-black: black;
  --color-cyan: cyan;
  --color-violet: violet;
  --color-date-bg: #222;
  --font-main: 'Montserrat', 'Baskerville Old Face', serif;
  --font-title: 30px;
  --font-date: 18px;
  --border-radius: 8px;
  --transition-fast: 0.2s;
  --transition-medium: 0.5s;
  --transition-smooth: 0.7s cubic-bezier(0.4,0,0.2,1);
}

body {
  margin: 0;
  background: #111;
  height: 100vh;
  display: flex;
  flex-direction: row;
  font-family: "Baskerville Old Face", serif;
  color: white;
  overflow: hidden;
}

.navbar {
  width: 100%;
  height: 64px;
  background: var(--color-navbar-gradient);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  border-bottom: 2px solid white;
  padding: 0 64px 0 32px;
  gap: 24px;
}

.navbar-title {
  color: blue;
  font-size: 2.7em;
  padding: 6px 24px;
  border-radius: 18px;
  background: none;
  text-shadow: 0 0 12px #fff, 0 0 24px #fff;
}

.navbar-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-controls .country-select-container {
  margin-left: 0;
  margin-right: 40px;
}

#regionBtn {
  background: white;
  color: black;
  border: 2px solid blue;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, margin-left 0.3s;
  margin-left: 12px;
}
#regionBtn:hover {
  background: blue;
  color: white;
  transform: scale(1.05);
}
#regionBtn:active {
  background: white;
  color: #181818;
  transform: scale(0.96);
}

.timezone-row, .clock-container {
  margin-top: 64px;
}

.timezone-row {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  padding: 20px;
  overflow-y: auto;
  height: 100vh;
  box-sizing: border-box;
  position: fixed;
  right: 0;
  top: 0;
  background: #111;
  border-left: 2px solid gold;
}

.timezone-row button {
  background: #222;
  color: white;
  font-size: 14px;
  border: 2px solid gold;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
  box-shadow: 0 0 8px gold;
}

.timezone-row button:hover {
  background: #444;
}

.timezone-row button.active {
  background: white;
  color: #111;
  font-weight: bold;
}

.clock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  margin: 0;
  position: relative;
  left: 0;
  top: 0;
}

.clock {
  position: relative;
  width: 300px;
  height: 300px;
  margin-bottom: 20px;
}

.circle {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 6px solid white;
}

.hour-circle { width: 170px; height: 170px; }
.minute-circle { width: 250px; height: 250px; }
.second-circle { width: 320px; height: 320px; }

.rotating {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
}

#hourRotate, #minuteRotate {
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1);
}

.planet {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px 2px white, 0 0 12px 4px blue;
}

#hourPlanet { transform: translate(-50%, -50%) translateY(-85px); }
#minutePlanet { transform: translate(-50%, -50%) translateY(-125px); }
#secondPlanet { transform: translate(-50%, -50%) translateY(-160px); }

.center-time {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: white;
  pointer-events: none;
}

.bottom-date {
  font-size: 18px;
  padding: 10px 25px;
  border-radius: 30px;
  border: 2px solid white;
  background: #222;
  color: white;
  box-shadow: 0 0 5px blue;
  transition: none;
  margin-top: 60px;
}

#dateText {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  color: violet;
  font-size: 1.2em;
  text-align: center;
  display: block;
  margin-top: 20px;
}

.clock-format-toggle-container {
  display: flex;
  justify-content: center;
  margin: 20px 0px 0 0;
}
.clock-format-toggle-container label {
  color: rgb(30, 0, 255);
  font-size: 16px;
  font-weight: bold;
  background: #222;
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid gold;
  cursor: pointer;
  user-select: none;
}
.clock-format-toggle-container input[type="checkbox"] {
  margin-right: 8px;
  accent-color: gold;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 35px;
  margin-right: 10px;
  vertical-align: middle;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: 0.5s;
  border-radius: 34px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border: 2px solid #555;
}
.slider:before {
  position: absolute;
  content: "";
  height: 25px;
  width: 25px;
  left: 4px;
  bottom: 4px;
  background-color: skyblue;
  transition: 0.7s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
input:checked + .slider {
  background-color: cyan;
  border: 2px solid blue;
}
input:checked + .slider:before {
  transform: translateX(26px);
  background-color: blue;
}
.switch-label {
  color: white;
  font-size: 18px;
  font-weight: bold;
  vertical-align: middle;
  user-select: none;
  letter-spacing: 0.5px;
}

.switch-spaced {
  margin-left: 0;
  margin-right: 10px;
}

#timezoneRow {
  right: 0px;
  position: fixed;
  top: 0;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.7s cubic-bezier(0.4,0,0.2,1), opacity 0.4s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding: 20px 0 20px 0;
  height: 80vh;
  min-width: 180px;
  box-sizing: border-box;
  background: #111;
  border-left: 2px solid black;
}
#timezoneRow.hide {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

#timezoneRow button {
  background: white;
  color: blue;
  font-size: 14px;
  border: 4px solid blue;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: left;
  box-shadow: none;
  width: 100%;
  margin-bottom: 10px;
  border-bottom: none;
}

#timezoneRow button:last-child {
  margin-bottom: 0;
}

#timezoneRow button.active {
  background: cyan;
  color: black;
  border-color: black;
  font-weight: bold;
}

.country-select-container {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 35px;
  padding: 0;
}

.country-select-container .switch-label {
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 35px;
}

#countrySelect {
  height: 35px;
  padding-top: 0;
  padding-bottom: 0;
}

.styled-dropdown, .choices__inner {
  background: #232946;
  color: #fff;
  border: 2px solid gold;
  border-radius: 12px;
  font-size: 1.1em;
  padding: 10px 18px;
  box-shadow: 0 4px 16px rgba(32,40,80,0.10), 0 1.5px 0 gold;
  margin-left: 8px;
  min-width: 180px;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.styled-dropdown:focus, .choices__inner.is-focused {
  border-color: #3a86ff;
  box-shadow: 0 0 0 2px #3a86ff, 0 4px 16px rgba(32,40,80,0.10);
  outline: none;
  background: #1a1a2e;
}
.styled-dropdown:hover, .choices__inner:hover {
  border-color: #ffd700;
  background: #1a1a2e;
}
.choices__list--dropdown, .choices__list[role="listbox"] {
  background: #232946;
  color: #fff;
  border: 2px solid gold;
  border-radius: 12px;
  box-shadow: 0 12px 32px 0 rgba(32,40,80,0.22), 0 2px 8px gold;
  margin-top: 2px;
  opacity: 0;
  transform: translateY(-32px);
  pointer-events: none;
  will-change: opacity, transform;
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.choices.is-open .choices__list--dropdown,
.choices.is-open .choices__list[role="listbox"] {
  pointer-events: auto;
  z-index: 1002;
}
.choices__list--dropdown.dropdown-animate,
.choices__list[role="listbox"].dropdown-animate {
  opacity: 1;
  transform: translateY(0);
}
/* For native select (mobile), add focus/active style */
.styled-dropdown:focus {
  box-shadow: 0 8px 24px 0 rgba(32,40,80,0.22), 0 2px 8px gold;
  border-color: #3a86ff;
}
.choices__item--choice {
  color: #fff;
  background: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.choices__item--choice.is-highlighted, .choices__item--choice:hover {
  background: gold;
  color: #232946;
}
select.styled-dropdown optgroup {
  color: gold;
  font-weight: bold;
  background: #181818;
  font-size: 1em;
  padding: 4px 0 2px 0;
}
.choices__group {
  color: gold;
  font-weight: bold;
  background: #181818;
  font-size: 1em;
  padding: 4px 0 2px 0;
  border-bottom: 1px solid #333;
}

/* Country option styles for both native and Choices.js */
.styled-dropdown option, .choices__item--choice {
  color: #e0e6f7;
  font-size: 1.13em;
  padding: 10px 18px;
  background: #232946;
  transition: background 0.2s, color 0.2s;
}
.styled-dropdown option:checked, .choices__item--choice.is-selected {
  background: #3a86ff !important;
  color: #fff !important;
}
/* For Choices.js, also highlight the selected item in the dropdown list */
.choices__item--choice.is-selected {
  font-weight: bold;
  border-left: 4px solid gold;
}

.styled-dropdown option:hover, .choices__item--choice:hover {
  background: gold !important;
  color: #232946 !important;
  transition: background 0.2s, color 0.2s;
}

.choices__item--choice.is-highlighted {
  background: gold !important;
  color: #232946 !important;
  transition: background 0.2s, color 0.2s;
}

@media (max-width: 900px) {
  .clock-container {
    width: 100vw;
    height: calc(100vh - 80px);
    margin-top: 80px;
  }
  .clock {
    width: 220px;
    height: 220px;
  }
  .hour-circle { width: 110px; height: 110px; }
  .minute-circle { width: 170px; height: 170px; }
  .second-circle { width: 210px; height: 210px; }
  .planet { width: 20px; height: 20px; font-size: 9px; }
}
@media (max-width: 600px) {
  .navbar {
    padding: 0 10px 0 10px;
    gap: 8px;
  }
  .navbar-title {
    font-size: 1.2em;
    padding: 2px 8px;
  }
  .clock-container {
    width: 100vw;
    height: calc(100vh - 64px);
    margin-top: 64px;
  }
  .clock {
    width: 140px;
    height: 140px;
  }
  .hour-circle { width: 60px; height: 60px; }
  .minute-circle { width: 100px; height: 100px; }
  .second-circle { width: 130px; height: 130px; }
  .planet { width: 12px; height: 12px; font-size: 7px; }
  .navbar-title {
    font-size: 1.1em;
    padding: 2px 8px;
  }
}
