/* Global styles */
:root {
  --bg: radial-gradient(1250px circle at 10% 10%, #0f1031 0, #0b0c24 40%, #090a1a 100%);
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --text: #e9edf5;
  --muted: #aeb7c9;
  --primary: #6c9df8;
  --secondary: #9b6cf8;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji';
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
}

.app-header {
  text-align: center;
  padding: 32px 16px 12px;
}

.app-header h1 {
  font-weight: 600;
  letter-spacing: 0.3px;
  margin: 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.panel {
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  backdrop-filter: saturate(120%) blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  animation: slideUp 400ms ease-out both;
}
  /* Span full width inside the two-column container */
  .panel.wide { grid-column: 1 / -1; }

.panel h2 { margin: 4px 0 14px; font-weight: 500; }

.input {
  width: 100%;
  resize: vertical;
  background: rgba(0,0,0,0.25);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.input:focus {
  border-color: rgba(108, 157, 248, 0.7);
  box-shadow: 0 0 0 4px rgba(108, 157, 248, 0.2);
}

.btn {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 140ms ease, box-shadow 180ms ease, background 180ms ease;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(135deg, #6c9df8, #5b9cf4 45%, #4c86f1);
  box-shadow: 0 8px 20px rgba(108, 157, 248, 0.35);
}
.btn.secondary {
  background: linear-gradient(135deg, #9b6cf8, #945cf4 45%, #844cf1);
  box-shadow: 0 8px 20px rgba(155, 108, 248, 0.35);
}
.btn.ghost {
  margin-left: 10px;
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.2);
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { filter: grayscale(0.4); opacity: 0.7; cursor: not-allowed; }

.output-wrap { display: flex; align-items: center; margin-top: 12px; }
.output {
  flex: 1;
  min-height: 90px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.app-footer {
  text-align: center;
  padding: 22px 16px 36px;
  color: var(--muted);
}

/* A11y */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
  .container { grid-template-columns: 1fr; }
}
