:root {
  --bg-color: #0B1120;
  --card-bg: rgba(20, 25, 35, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --twitter: #1DA1F2;
  --twitter-hover: #1a8cd8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --error: #ef4444;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  top: -20%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(11,17,32,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.background-glow.secondary {
  top: 60%;
  left: 60%;
  background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, rgba(11,17,32,0) 70%);
}

.container {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  z-index: 1;
}

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

.back-link {
  position: fixed;
  top: 2rem;
  left: 2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
  z-index: 10;
}

.back-link:hover {
  color: var(--text-main);
}

.logo {
  width: 64px;
  height: 64px;
  margin-bottom: 1rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
}

h1 {
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.step {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.step.active {
  display: block;
}

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

.step-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.input-group {
  margin-bottom: 1.5rem;
}

input[type="text"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1rem;
  color: #fff;
  font-family: monospace;
  font-size: 1rem;
  outline: none;
  transition: all 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  font-family: var(--font-sans);
}

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

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn.primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

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

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

.btn.twitter {
  background: var(--text-main);
  color: #000;
  gap: 0.5rem;
}

.btn.twitter:hover {
  background: #e2e8f0;
  transform: translateY(-2px);
}

.twitter-icon {
  width: 20px;
  height: 20px;
}

.twitter-status {
  text-align: center;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.twitter-status.connected {
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.05);
}

.task-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.task-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(0,0,0,0.2);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid transparent;
}

.task-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 1rem;
  flex-shrink: 0;
}

.text-center {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  border: 2px solid var(--success);
}

.text-green {
  color: var(--success);
}

.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.alert.hidden {
  display: none;
}

.alert.error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.loader {
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin { 
  to { transform: rotate(360deg); } 
}
