:root {
  --bg-color: #0b0f19;
  --card-bg: rgba(17, 24, 39, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --code-bg: #090d16;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Purple Glow Background Effect */
.ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(11, 15, 25, 0) 100%);
  z-index: -1;
  pointer-events: none;
}

.app-header {
  width: 100%;
  max-width: 1100px;
  padding: 30px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  background-color: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1100px;
  padding: 0 24px 60px 24px;
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 40px;
  align-items: start;
  z-index: 10;
}

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphic Portal Card */
.portal-card {
  background-color: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  position: relative;
}

.screen {
  display: none;
  opacity: 0;
  transform: translateY(15px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.screen.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 22px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #a5b4fc;
  margin-bottom: 8px;
}

input {
  width: 100%;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  color: #ffffff;
  font-family: inherit;
  transition: all 0.25s ease;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(30, 41, 59, 0.6);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
}

.btn-secondary:hover {
  color: #ffffff;
}

.text-btn {
  margin-top: 16px;
  padding: 8px 16px;
  font-size: 14px;
}

/* Spinner Loader */
.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

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

/* Dashboard Credentials Panel */
.success-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.success-icon {
  font-size: 28px;
}

.credentials-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.credential-item {
  display: flex;
  flex-direction: column;
}

.cred-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.copied-badge {
  display: none;
  color: var(--success);
  text-transform: none;
  font-size: 11px;
}

.cred-value-container {
  display: flex;
  gap: 10px;
  position: relative;
}

.cred-value-container input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: #090d16;
  border-color: rgba(255, 255, 255, 0.05);
}

.danger-glow input {
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.copy-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--primary-hover);
}

.warning-alert {
  background-color: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  font-size: 13px;
  line-height: 20px;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 30px;
}

/* Documentation Styling */
.docs-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.docs-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.docs-header p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.docs-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #ffffff;
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.code-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 10px;
  margin-top: 20px;
}

.code-header:first-of-type {
  margin-top: 0;
}

pre {
  background: var(--code-bg);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 20px;
  color: #e2e8f0;
}

/* Toast Messages */
.toast {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(239, 68, 68, 0.95);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success-toast {
  background-color: rgba(16, 185, 129, 0.95);
}

.app-footer {
  width: 100%;
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  z-index: 10;
}
