/* ==========================================
   iOS LIGHT THEME & DESIGN SYSTEM
   ========================================== */
:root {
  --bg: #f2f2f7;                  /* iOS Light System Background */
  --card-bg: rgba(255, 255, 255, 0.85); /* Translucent Glass */
  --border: rgba(226, 232, 240, 0.8);
  --border-hover: rgba(0, 122, 255, 0.3);
  
  --text-main: #000000;
  --text-muted: #666666;
  --text-light: #8e8e93;
  
  --system-blue: #007aff;
  --system-blue-hover: #0056b3;
  --system-blue-light: rgba(0, 122, 255, 0.08);
  --system-red: #ff3b30;
  --system-green: #34c759;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 30px rgba(0, 122, 255, 0.12);
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Light Blobs */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 680px;
  width: 100%;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: var(--system-blue-light);
  color: var(--system-blue);
  border: 1px solid rgba(0, 122, 255, 0.2);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
}

/* Main Card */
.main-card {
  background: var(--card-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  background: rgba(242, 242, 247, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff9500; /* Orange while loading */
}

.status-dot.ready {
  background: var(--system-green);
  box-shadow: 0 0 10px rgba(52, 199, 89, 0.4);
}

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.8rem;
}

.control-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  accent-color: var(--system-blue);
  background: #e5e5ea;
  cursor: pointer;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.btn {
  flex: 1;
  padding: 0.95rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background: var(--system-blue);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 122, 255, 0.25);
}

.btn-primary:hover:not(:disabled) {
  background: var(--system-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 122, 255, 0.35);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.output-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

textarea {
  width: 100%;
  height: 140px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  color: var(--system-blue);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

textarea:focus {
  outline: none;
  border-color: var(--system-blue);
}

.footer {
  text-align: center;
  margin-top: 2.5rem;
  color: var(--text-light);
  font-size: 0.88rem;
}

.footer strong {
  color: var(--text-main);
}