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

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0f1626;
  --bg-tertiary: #17223b;
  --bg-glass: rgba(15, 22, 38, 0.6);
  --border-glass: rgba(255, 255, 255, 0.06);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-glow: 0 0 20px rgba(79, 172, 254, 0.15);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* Background Gradients */
body::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-cyan);
}

/* Premium Layout Elements */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

header {
  border-bottom: 1px solid var(--border-glass);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.logo-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  stroke: var(--bg-primary);
  stroke-width: 2.5;
}

/* Navigation & Profile */
.user-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-badge {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.user-email {
  font-weight: 500;
  font-size: 0.875rem;
}

.user-instance {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Glass Cards */
.card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(79, 172, 254, 0.2);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45), var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-indigo));
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: var(--color-error);
  color: #fff;
}

.btn-icon {
  padding: 0.5rem;
  border-radius: 0.375rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

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

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 22, 38, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(79, 172, 254, 0.2);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Badges & Status */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.status-connecting {
  background: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulse 1.5s infinite ease-in-out;
}

.status-disconnected {
  background: rgba(100, 116, 139, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  max-width: 550px;
  width: 100%;
  z-index: 10;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Grid & Dashboard specific */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.accounts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.account-item {
  background: rgba(15, 22, 38, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: var(--transition);
}

.account-item:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(15, 22, 38, 0.7);
}

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.account-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.provider-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.account-details h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.account-details p {
  font-size: 0.85rem;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Info Panel */
.stats-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.75rem;
}

.stat-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.stat-value {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Landing page specific */
.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6rem 0;
  gap: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 40%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 800px;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 600px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 2.8rem;
  height: 1.6rem;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--border-glass);
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.1rem;
  width: 1.1rem;
  left: 3px;
  bottom: 2px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-indigo);
}

input:checked + .slider:before {
  transform: translateX(1.1rem);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.tab-btn.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}

.tab-content {
  display: none;
}

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

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-glass);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
