* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 40px;
  padding-top: 20px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.logo {
  font-size: 24px;
}

.brand-name {
  font-size: 22px;
  font-weight: 600;
  color: #cbd5e1;
}

.title {
  font-family: 'Poppins', sans-serif;
  font-size: 25px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 13px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ad-space {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: #64748b;
  margin-bottom: 30px;
  font-size: 13px;
}

.mode-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  background: rgba(30, 41, 59, 0.6);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.mode-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-btn.active {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

.mode-btn.mode-switched {
  animation: modeFlash 0.6s ease-out;
}

@keyframes modeFlash {
  0% {
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3), 0 0 0 0 rgba(79, 70, 229, 0.8);
  }
  50% {
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3), 0 0 20px 8px rgba(79, 70, 229, 0.4);
  }
  100% {
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3), 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

.mode-btn:hover:not(.active) {
  color: #cbd5e1;
  background: rgba(99, 102, 241, 0.1);
}

.main-content {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 32px;
  backdrop-filter: blur(10px);
}

.label {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f5f9;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.settings-grid.show {
  max-height: 500px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 500;
}

.setting-value {
  font-size: 20px;
  font-weight: 600;
  color: #4f46e5;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(99, 102, 241, 0.2);
  outline: none;
  accent-color: #4f46e5;
  cursor: pointer;
}

.time-format-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-switch {
  display: flex;
  background: rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 4px;
  width: 110px;
  cursor: pointer;
  border: 1px solid rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.toggle-switch.active {
  background: rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.6);
}

.toggle-option {
  flex: 1;
  padding: 6px 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  border-radius: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.toggle-option.active {
  background: #4f46e5;
  color: white;
}

.time-picker-container {
  position: relative;
  margin-bottom: 32px;
}

.time-picker-wrapper {
  position: relative;
  overflow: hidden;
}

.time-picker {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(51, 65, 85, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 14px;
  padding: 24px;
  touch-action: none;
  position: relative;
  min-height: 180px;
}

.time-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  flex: 0 0 auto;
  height: 180px;
  overflow: hidden;
  cursor: ns-resize;
}

.time-column-faded {
  font-size: 18px;
  color: rgba(148, 163, 184, 0.3);
  font-weight: 500;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-column-selected {
  font-size: 56px;
  font-weight: 700;
  color: #e0e7ff;
  text-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  font-family: 'Poppins', monospace;
  letter-spacing: 0.5px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-column-separator {
  font-size: 48px;
  font-weight: 700;
  color: #fbbf24;
  margin: 0 4px;
}

.time-column-highlight {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 64px;
  transform: translateY(-50%);
  border-top: 1px solid rgba(99, 102, 241, 0.5);
  border-bottom: 1px solid rgba(99, 102, 241, 0.5);
  pointer-events: none;
}

.owl-perch {
  position: absolute;
  top: -100px;
  right: -8px;
  font-size: 120px;
  z-index: 10;
  line-height: 1;
  transform: scaleX(-1);
}

.results {
  margin-top: 32px;
}

.results-label {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f5f9;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card {
  background: rgba(30, 41, 59, 0.6);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.result-card:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(51, 65, 85, 0.8);
}

.result-card.selected {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: #4f46e5;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.result-card.glow {
  animation: resultGlow 0.6s ease-out;
}

@keyframes resultGlow {
  0% {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4), 0 0 0 0 rgba(79, 70, 229, 0.8);
  }
  50% {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4), 0 0 30px 12px rgba(79, 70, 229, 0.4);
  }
  100% {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4), 0 0 0 0 rgba(79, 70, 229, 0);
  }
}

.result-card.best::before {
  content: '★ Best Option';
  display: block;
  font-size: 11px;
  color: #fbbf24;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.result-time {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Poppins', monospace;
  margin-bottom: 6px;
}

.result-card.selected .result-time {
  color: white;
}

.result-card:not(.selected) .result-time {
  color: #a5b4fc;
}

.result-window {
  font-size: 15px;
  color: #a5b4fc;
  margin-bottom: 8px;
  font-weight: 500;
}

.result-details {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
}

.result-detail {
  color: #94a3b8;
}

.result-card.selected .result-detail {
  color: rgba(255, 255, 255, 0.8);
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(99, 102, 241, 0.2);
}

.settings-toggle-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.settings-toggle-btn:hover {
  color: #cbd5e1;
}

.settings-toggle-btn::after {
  content: '⚙️';
  font-size: 18px;
}

.share-btn {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 16px;
  display: inline-block;
}

.share-btn:hover {
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  transform: translateY(-2px);
}

.share-btn:active {
  transform: translateY(0);
}

.info-toggle {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 0;
  padding: 16px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.info-toggle:first-of-type {
  margin-top: 32px;
  border-radius: 8px 8px 0 0;
}

.info-toggle:hover {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.05);
}

.info-toggle .info-arrow {
  transition: transform 0.3s ease;
  display: inline-block;
  font-size: 12px;
}

.info-toggle.expanded .info-arrow {
  transform: rotate(180deg);
}

.info-section {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-top: none;
  border-radius: 0;
  padding: 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #cbd5e1;
}

.info-section:last-of-type {
  border-radius: 0 0 8px 8px;
  margin-bottom: 24px;
}

.info-section p {
  margin-bottom: 14px;
}

.info-section p:last-child {
  margin-bottom: 0;
}

footer {
  text-align: center;
  margin-top: 60px;
  padding: 24px 20px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.8;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

footer .footer-copyright {
  margin-bottom: 8px;
}

footer .footer-disclaimer {
  font-size: 11px;
  color: #475569;
}

@media (max-width: 480px) {
  .title {
    font-size: 28px;
  }

  .main-content {
    padding: 20px;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .time-picker {
    padding: 20px 16px;
  }

  .time-column-selected {
    font-size: 48px;
  }

  .result-card {
    padding: 12px;
  }

  .result-time {
    font-size: 24px;
  }
}
