:root {
  --bg: #050b18;
  --card: rgba(255, 255, 255, 0.07);
  --accent: #00d2ff;
  --accent-2: #92fe9d;
  --muted: #9aa4b2;
  --white: #ffffff;
  --glass-border: rgba(255, 255, 255, 0.12);
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial;
}

/* Full height */
html,
body {
  height: 100%;
}

/* Animated Mesh Background */
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background-image:
    radial-gradient(at 0% 0%, hsla(203, 83%, 15%, 1) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 80%, 12%, 1) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(180, 70%, 20%, 1) 0, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Floating Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

.card {
  width: min(820px, 96%);
  background: var(--card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--glass-border);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  animation: float 8s ease-in-out infinite;
  transition: 0.4s;
}

/* Header */
header {
  display: flex;
  gap: 14px;
  align-items: center;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.5);
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.4);
  }
  to {
    box-shadow: 0 0 24px rgba(0, 210, 255, 0.7);
  }
}

h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(to right, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.lead {
  margin: 6px 0 16px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  letter-spacing: 0.5px;
}

/* Panel & Fields */
.panel {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field .label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

textarea#inputText,
input[type="number"],
select {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  outline: none;
  resize: vertical;
  transition: 0.3s;
}

textarea#inputText:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 210, 255, 0.25);
  transform: scale(1.02);
}

/* Layout Helpers */
.row {
  display: flex;
  gap: 14px;
  align-items: end;
}

.row .small {
  flex: 1;
}

/* Buttons */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(45deg, var(--accent), #3a7bd5);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 5px 18px rgba(0, 210, 255, 0.35);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 210, 255, 0.55);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--white);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preview Section */
.preview-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.preview {
  width: 320px;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  transition: 0.3s;
}

.preview:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 35px rgba(0, 210, 255, 0.25);
}

.preview::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent), var(--accent-2));
}

.preview img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Utility */
.small {
  font-size: 13px;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 600px) {
  .card {
    padding: 20px;
  }
  .row {
    flex-direction: column;
    align-items: stretch;
  }
}
