@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-gradient-start: #0f172a;
  --bg-gradient-end: #1e1b4b;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --danger: #f43f5e;
  --danger-hover: #e11d48;
  --success: #10b981;
  --warning: #fbbf24;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --input-bg: rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 800px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.4);
}

.header-icon svg {
  width: 18px;
  height: 18px;
  fill: white;
}

.nav-tabs {
  display: flex;
  gap: 1rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.content {
  padding: 2.5rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.content.active {
  display: block;
}

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

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

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 12px;
  padding: 0.875rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.hint {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
}

button:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 16px rgba(129, 140, 248, 0.4);
}

.btn-danger {
  background: var(--danger);
  box-shadow: 0 4px 12px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--danger-hover);
  box-shadow: 0 6px 16px rgba(244, 63, 94, 0.4);
}

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

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

.profile-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
}

.profile-item .id {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.remove-profile-btn {
  background: transparent;
  color: var(--danger);
  padding: 0.5rem;
  border-radius: 6px;
  box-shadow: none;
}

.remove-profile-btn:hover {
  background: rgba(244, 63, 94, 0.1);
  box-shadow: none;
}

/* Terminal Log */
.terminal {
  background: #0f172a;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  margin-top: 2rem;
  max-height: 300px;
  overflow-y: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.log-entry {
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.log-time {
  color: #64748b;
  margin-right: 8px;
}

.log-success { color: var(--success); }
.log-error { color: var(--danger); }
.log-warning { color: var(--warning); }
.log-info { color: var(--primary); }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
