@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 50%, #24243e 100%);
  color: #fff;
  min-height: 100vh;
  padding: 30px 20px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.main-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

h1::before {
  content: '✨ ';
  -webkit-text-fill-color: initial;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 320px;
  flex-shrink: 0;
  padding: 25px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.canvas-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: sticky;
  top: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input,
select {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

input:hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.4);
}

input:focus,
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

input[type='color'] {
  padding: 4px;
  width: 100%;
  height: 44px;
  cursor: pointer;
  border-radius: 12px;
}

input[type='color']::-webkit-color-swatch-wrapper {
  padding: 2px;
}

input[type='color']::-webkit-color-swatch {
  border-radius: 8px;
  border: none;
}

.color-row {
  display: flex;
  gap: 10px;
}

.color-row .control-group {
  flex: 1;
}

.buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-top: 10px;
}

.buttons button {
  width: 100%;
}

button {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

#celestial-map {
  background: radial-gradient(ellipse at center, #0a0a15 0%, #000 100%);
  border-radius: 20px;
  width: 500px !important;
  height: 500px !important;
  overflow: hidden !important;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow:
    0 0 60px rgba(102, 126, 234, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 100px rgba(102, 126, 234, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#celestial-map canvas {
  transform-origin: center center;
}

.info {
  text-align: center;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
}

.footer .heart {
  color: #e25555;
  display: inline-block;
  animation: heartbeat 1.2s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.3);
  }
  28% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(1);
  }
  100% {
    transform: scale(1);
  }
}

.footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.footer a:hover {
  color: #764ba2;
}

.city-wrapper {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(15, 15, 35, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.autocomplete-list.show {
  display: block;
}

.autocomplete-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background: rgba(102, 126, 234, 0.2);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item small {
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-top: 4px;
  font-size: 11px;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
}

.toggle {
  position: relative;
  width: 52px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: '';
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.toggle input:checked + .toggle-slider {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

/* Location info styling */
#location-info {
  padding: 10px 14px;
  background: rgba(102, 126, 234, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px !important;
  color: #667eea !important;
}
