:root {
  --bg-dark: #09090b;
  --card-bg: rgba(24, 24, 27, 0.65);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  --primary-accent: #8b5cf6;
  --primary-hover: #7c3aed;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --input-bg: rgba(9, 9, 11, 0.5);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.1), transparent 25%);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

h1 {
  margin-top: 0;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

p.description {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

.input-group {
  text-align: left;
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #d4d4d8;
}

input[type="password"],
input[type="text"],
select {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.checkbox-group input {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: var(--primary-accent);
  cursor: pointer;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: 500;
  cursor: pointer;
}

.optional-text {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 6px;
}

button {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-hover));
  color: white;
  border: none;
  padding: 14px 24px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

button:active {
  transform: translateY(0);
}

.preview-container {
  margin-top: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.preview-label {
  font-size: 11px;
  color: var(--primary-accent);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.test-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.test-controls label {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--input-bg);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  cursor: pointer;
}

.test-controls label:hover {
  border-color: var(--primary-accent);
  color: var(--text-main);
}

.test-controls input {
  margin-right: 6px;
}

.stream-box {
  background: rgba(30, 30, 36, 0.8);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-accent);
  border-radius: 8px;
  padding: 12px 16px;
  text-align: left;
  transition: transform 0.3s ease;
}

.stream-title {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.stream-desc {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

#result-container {
  display: none;
  margin-top: 24px;
  animation: fadeUp 0.4s ease;
}

.code-box {
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border-radius: 8px;
  word-break: break-all;
  font-family: 'Fira Code', monospace;
  font-size: 12px;
  color: var(--success-color);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
}
