:root {
  --primary-color: #ff6d00;
  --primary-hover: #e65100;
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --card-bg: #1e1e1e;
  --input-bg: #2d2d2d;
  --border-color: #333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
  padding: 2rem 3rem;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 10px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 450px;
  border: 1px solid rgba(255, 109, 0, 0.3); /* Orange border */
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  margin: 0;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

header p {
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* --- TOGGLE SWITCH STYLES --- */
.toggle-wrapper {
  background: #252525;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8898aa;
  line-height: 1.2;
  width: 90px;
  transition: color 0.3s;
}

.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}

.toggle-label.active-label {
  color: var(--primary-color);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #444;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(30px);
  -ms-transform: translateX(30px);
  transform: translateX(30px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.mode-desc {
  text-align: center;
  margin-top: 10px;
  font-size: 0.75rem;
  color: #888;
  font-style: italic;
}
/* --- FIM TOGGLE --- */

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #ddd;
}

input:not([type="checkbox"]) {
  width: 100%;
  padding: 10px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: white;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 109, 0, 0.2);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 10px;
  color: #aaa;
  font-weight: 600;
}

.input-group input {
  padding-left: 25px;
}

button#submitBtn,
.primary-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button#submitBtn:hover,
.primary-btn:hover {
  background-color: var(--primary-hover);
}

.hidden {
  display: none;
}

/* Result Section */
#result {
  margin-top: 2rem;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.success-message h3 {
  color: #2e7d32;
  margin-top: 0;
}

.link-box {
  margin: 1.5rem 0;
  text-align: left;
}

.copy-wrapper {
  display: flex;
  gap: 10px;
}

.copy-wrapper input {
  background-color: var(--input-bg);
  color: #fff;
  border: 1px solid var(--border-color);
}

#copyBtn {
  padding: 0 20px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#copyBtn:hover {
  background-color: #555;
}

.secondary-btn {
  background: none;
  border: 1px solid #444;
  color: #aaa;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 10px;
}

.secondary-btn:hover {
  background-color: #333;
  color: #fff;
}

/* Loading Spinner */
#loading {
  text-align: center;
  padding: 2rem;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-out {
  animation: fadeOut 0.5s ease forwards;
}

/* --- DASHBOARD CLOSER STYLES --- */
.dashboard-panel {
  /* Box styles moved to container for unified look */
  color: white;
  padding: 0;
  margin-bottom: 2rem;
  text-align: center;
}

.dashboard-panel h2 {
  margin: 0 0 15px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: none;
}

.main-time-box {
  background: rgba(255, 109, 0, 0.05);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 109, 0, 0.2);
  backdrop-filter: blur(5px);
}

.time-display {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  margin: 5px 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  color: #fff;
}

.date-display {
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 500;
  color: #ccc;
}

.location-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.75;
  margin-top: 5px;
}

.countdown-box {
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid #333;
}

.countdown-timer {
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 4px;
  color: var(--primary-color);
  letter-spacing: 0.5px;
}

.us-times-section h4 {
  margin: 0 0 10px 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  color: #888;
}

.us-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  text-align: left;
}

.us-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  transition: background 0.2s;
  border: 1px solid transparent;
}

.us-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #444;
}

.us-state {
  font-weight: 500;
  opacity: 0.9;
  color: #ddd;
}

.us-time {
  font-weight: 700;
  color: var(--primary-color);
  font-variant-numeric: tabular-nums;
}
