@font-face {
  font-family: "Noto Sans Siddham";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./assets/fonts/noto-sans-siddham-400-normal.woff2") format("woff2");
  unicode-range: U+11580-115FF;
}

:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #020403;
  color: #e9fff0;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #000;
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

#rainCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

.control-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  width: min(420px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(92, 255, 150, 0.26);
  border-radius: 8px;
  background: rgba(2, 9, 6, 0.78);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(16px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.config-hidden .control-panel {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.kicker {
  margin: 0 0 4px;
  color: #81f9aa;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(129, 249, 170, 0.4);
  border-radius: 8px;
  background: rgba(12, 33, 20, 0.74);
  color: #eaffef;
  font-size: 22px;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: rgba(233, 255, 240, 0.86);
  font-size: 13px;
}

.field > span:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.field-value {
  flex: 0 0 auto;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid rgba(129, 249, 170, 0.22);
  border-radius: 6px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.34);
  color: #d7ffe1;
  font: 11px/1.25 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

textarea,
input[type="range"],
input[type="text"] {
  width: 100%;
}

textarea {
  min-height: 92px;
  resize: vertical;
  border: 1px solid rgba(129, 249, 170, 0.22);
  border-radius: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.42);
  color: #eaffef;
  font: 14px/1.45 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

input[type="text"] {
  min-height: 38px;
  border: 1px solid rgba(129, 249, 170, 0.22);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.42);
  color: #eaffef;
  font: inherit;
}

input[type="range"] {
  accent-color: #00ff66;
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.color-row,
.export-row,
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.color-field {
  flex: 1 1 100px;
}

input[type="color"] {
  width: 100%;
  height: 38px;
  border: 1px solid rgba(129, 249, 170, 0.24);
  border-radius: 8px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.42);
}

select,
.action-button {
  min-height: 38px;
  border: 1px solid rgba(129, 249, 170, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: #eaffef;
  font: inherit;
}

select {
  width: 100%;
  padding: 0 8px;
}

.small-field {
  flex: 0 1 92px;
}

.preset-name-field {
  flex-basis: 132px;
}

.action-button {
  flex: 1 1 82px;
  padding: 0 12px;
  cursor: pointer;
}

.file-input {
  display: none;
}

.status {
  min-height: 18px;
  margin: 8px 0 0;
  color: #81f9aa;
  font-size: 12px;
}

.toggle-row {
  margin-top: 4px;
  color: rgba(233, 255, 240, 0.86);
  font-size: 13px;
}

.toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #00ff66;
}

@media (max-width: 760px) {
  .control-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 52vh;
    padding: 14px;
  }

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

  h1 {
    font-size: 18px;
  }
}
