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

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #121829;
  --bg-card: rgba(18, 24, 41, 0.75);
  --bg-card-hover: rgba(28, 36, 61, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-accent: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --secondary-gradient: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --glass-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(14, 165, 233, 0.08) 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Glassmorphism Classes */
.glass-nav {
  background: rgba(10, 14, 26, 0.82) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.glass-pill {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  color: var(--text-muted);
}

/* Brand & Typography */
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-logo {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.brand-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Buttons */
.btn-gradient {
  background: var(--primary-gradient);
  border: none;
  color: #ffffff !important;
  font-weight: 600;
  border-radius: 0.65rem;
  padding: 0.6rem 1.35rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  color: #ffffff !important;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-subtle);
  color: var(--text-main) !important;
  font-weight: 500;
  border-radius: 0.65rem;
  padding: 0.55rem 1.15rem;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-action-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: scale(1.08);
}

.btn-action-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

/* Link Cards & Items */
.link-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

.link-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateX(4px);
}

.link-title {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.link-url {
  color: #64748b;
  font-size: 0.78rem;
  word-break: break-all;
}

.link-inactive {
  opacity: 0.55;
  border-style: dashed;
}

/* Form Styling */
.modern-input {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid var(--border-subtle) !important;
  color: #ffffff !important;
  border-radius: 0.65rem !important;
  padding: 0.75rem 1rem !important;
  transition: all 0.2s ease !important;
}

.modern-input:focus {
  border-color: var(--primary-accent) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
  background: rgba(15, 23, 42, 0.95) !important;
}

.form-check-input:checked {
  background-color: var(--primary-accent);
  border-color: var(--primary-accent);
}

/* Hero & Bento Sections */
.nodes-masonry-grid {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 768px) {
  .nodes-masonry-grid {
    column-count: 2;
  }
}

@media (min-width: 1200px) {
  .nodes-masonry-grid {
    column-count: 3;
  }
}

@media (min-width: 1600px) {
  .nodes-masonry-grid {
    column-count: 4;
  }
}

.node-card-wrapper {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

/* Public Profile View */
.profile-avatar-box {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.profile-link-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 0.85rem;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-link-btn:hover {
  background: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* Flash alerts */
.alert-glass {
  background: rgba(18, 24, 41, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 14, 26, 0.95);
}
