:root {
  --bg-color: #080c14;
  --card-bg: rgba(15, 23, 42, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-accent: #38bdf8;
  --primary-gradient: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  --google-btn-bg: #1e293b;
  --google-btn-hover: #334155;
  --success-color: #34d399;
  --shadow-glow: 0 0 40px rgba(56, 189, 248, 0.15);
}

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

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

/* Background Glowing Orbs */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.blob-1 {
  width: 450px;
  height: 450px;
  background: rgba(56, 189, 248, 0.18);
  top: -100px;
  left: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: rgba(192, 132, 252, 0.15);
  bottom: -150px;
  right: -100px;
}

/* Main Layout */
.app-container {
  width: 100%;
  max-width: 680px;
  padding: 24px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
}

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

.logo-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-text h1 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.domain-badge {
  font-family: monospace;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--primary-accent);
}

/* Glass Card */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 36px;
  box-shadow: var(--shadow-glow), 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: all 0.3s ease;
}

.card-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-header p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Auth Notice */
.auth-notice {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #e2e8f0;
}

.lock-icon {
  font-size: 18px;
}

/* Google Button */
.actions {
  display: flex;
  flex-direction: column;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--google-btn-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 16px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.google-btn:hover {
  background: var(--google-btn-hover);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.2);
}

.google-btn:active {
  transform: translateY(0);
}

.card-footer {
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

/* Authenticated Profile Header */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar-wrapper {
  position: relative;
}

.user-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--primary-accent);
  object-fit: cover;
}

.online-indicator {
  width: 14px;
  height: 14px;
  background: var(--success-color);
  border: 2px solid var(--bg-color);
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
}

.user-info {
  flex: 1;
}

.user-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.user-email {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.role-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success-color);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Section Divider */
.section-divider {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Ecosystem Apps Grid */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.25 ease;
  position: relative;
}

.app-card:hover {
  background: rgba(51, 65, 85, 0.6);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.app-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.05);
}

.app-details h3 {
  font-size: 14px;
  font-weight: 700;
}

.app-details p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-dot.online {
  width: 8px;
  height: 8px;
  background: var(--success-color);
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 8px var(--success-color);
}

/* JWT Inspector */
.jwt-inspector {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jwt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.copy-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--primary-accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(56, 189, 248, 0.3);
}

.jwt-code {
  width: 100%;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  color: #38bdf8;
  font-family: monospace;
  font-size: 11px;
  padding: 10px;
  resize: none;
  outline: none;
}

/* Footer */
.footer {
  text-align: center;
  font-size: 12px;
  color: #475569;
}

/* Animations */
.hidden {
  display: none !important;
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

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