/* ============================================================
   n0t.link — Premium Dark-Mode Design System
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-violet: #6366f1;
  --accent-cyan: #3b82f6;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;
  --gradient-primary: linear-gradient(135deg, #6366f1, #3b82f6);
  --gradient-warm: linear-gradient(135deg, #3b82f6, #6366f1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.08);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Pro Custom Themes --- */
body.theme-ocean {
  --bg-primary: #050b14;
  --bg-secondary: #0a111f;
  --bg-tertiary: #111a2b;
  --accent-violet: #0ea5e9;
  --accent-cyan: #38bdf8;
  --gradient-primary: linear-gradient(135deg, #0ea5e9, #38bdf8);
  --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.08);
}

body.theme-sunset {
  --bg-primary: #120505;
  --bg-secondary: #1a0a0a;
  --bg-tertiary: #2a1111;
  --accent-violet: #f43f5e;
  --accent-cyan: #f97316;
  --gradient-primary: linear-gradient(135deg, #f43f5e, #f97316);
  --shadow-glow: 0 0 30px rgba(244, 63, 94, 0.08);
}

body.theme-neon {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111;
  --bg-tertiary: #1a1a1a;
  --accent-violet: #22c55e;
  --accent-cyan: #10b981;
  --gradient-primary: linear-gradient(135deg, #22c55e, #a855f7);
  --shadow-glow: 0 0 30px rgba(34, 197, 94, 0.08);
}

/* --- Keyframe Animations --- */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-in-right {
  from {
    transform: translateX(120%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slide-out-right {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(120%);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
  }
  50% {
    box-shadow: 0 4px 30px rgba(124, 58, 237, 0.5), 0 0 60px rgba(124, 58, 237, 0.2);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes scale-in {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1 0 auto;
}

::selection {
  background: rgba(124, 58, 237, 0.4);
  color: #fff;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.navbar-scrolled {
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 72px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  letter-spacing: -0.5px;
}

.logo-accent {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: center;
}

.user-greeting,
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* --- Views --- */
.view {
  display: none;
}

.view.active {
  display: block;
  animation: scale-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding-top: 72px;
}

.global-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
}

.global-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.04) 0%,
    rgba(59, 130, 246, 0.03) 25%,
    rgba(99, 102, 241, 0.02) 50%,
    rgba(99, 102, 241, 0.04) 75%,
    rgba(59, 130, 246, 0.03) 100%);
  background-size: 200% 200%;
  animation: gradient-shift 20s ease infinite;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-badge .material-symbols-outlined {
  font-size: 18px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}

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

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Glass Card --- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-base);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* --- Auth Section --- */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 48px;
}

.auth-card {
  max-width: 440px;
  width: 100%;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.btn-google {
  width: 100%;
  padding: 14px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-google:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-md);
}

.btn-block {
  width: 100%;
}

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

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-red);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* --- Input Groups --- */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group input {
  width: 100%;
  padding: 14px 14px 14px 48px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: all var(--transition-fast);
  outline: none;
}

.input-group input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 20px;
  pointer-events: none;
  transition: color var(--transition-fast);
}

.input-group input:focus ~ .input-icon,
.input-group input:focus + .input-icon {
  color: var(--accent-violet);
}

/* Reverse order: icon before input needs adjacent sibling with reversed DOM,
   so also handle the case where icon precedes input */
.input-group:focus-within .input-icon {
  color: var(--accent-violet);
}

.input-group-lg input {
  height: 60px;
  padding: 0 18px 0 52px;
  font-size: 1.0625rem;
}

.input-group-lg .input-icon {
  left: 18px;
}

.input-group + .input-group {
  margin-top: 16px;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* --- Auth Switch --- */
.auth-switch {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-switch a {
  color: var(--accent-violet);
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* --- Dashboard --- */
.dashboard {
  max-width: 900px;
  margin: 0 auto;
  padding: 104px 24px 48px;
}

.create-card {
  margin-bottom: 32px;
}

.create-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.create-card h2 .material-symbols-outlined {
  color: var(--accent-cyan);
}

.create-form {
  display: flex;
  gap: 12px;
}

.create-form-stacked {
  display: flex;
  flex-direction: column;
}

.create-form .input-group {
  flex: 1;
}

.create-form .btn {
  flex-shrink: 0;
}

/* --- Links Section --- */
.links-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.links-header h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 600;
}

.links-header h3 .material-symbols-outlined {
  color: var(--accent-violet);
}

.link-count {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* --- Link Items --- */
.link-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-base);
}

.link-item:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.link-content {
  flex: 1;
  min-width: 0;
}

.link-url-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.link-url {
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.link-url:hover {
  text-decoration: underline;
}

.link-destination {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.link-destination .material-symbols-outlined {
  font-size: 14px;
}

.link-destination:hover {
  color: var(--text-secondary);
}

.link-meta {
  display: flex;
  gap: 20px;
  margin-top: 12px;
}

.link-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.link-stat .material-symbols-outlined {
  font-size: 16px;
  color: var(--text-muted);
}

.link-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* --- Empty State --- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.empty-state .material-symbols-outlined {
  font-size: 64px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.8;
  filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.4));
}

.empty-state p {
  font-size: 1.1rem;
  max-width: 300px;
  margin: 0;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

/* --- Toast Notifications --- */
#toast-container {
  position: fixed;
  top: 88px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  transform: translateX(120%);
  transition: transform var(--transition-base);
  white-space: nowrap;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-left: 3px solid var(--accent-emerald);
}

.toast-success .material-symbols-outlined {
  color: var(--accent-emerald);
}

.toast-error {
  border-left: 3px solid var(--accent-red);
}

.toast-error .material-symbols-outlined {
  color: var(--accent-red);
}

.toast-info {
  border-left: 3px solid var(--accent-cyan);
}

.toast-info .material-symbols-outlined {
  color: var(--accent-cyan);
}

/* --- Redirect Loader --- */
.redirect-loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.loader-content {
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-violet);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 24px;
}

.redirect-loader p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* --- Skeleton Loading --- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease infinite;
  height: 88px;
  border-radius: var(--radius-md);
  border: none;
}

/* --- Utility Classes --- */
.fade-in-up {
  animation: fade-in-up 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }

/* --- Google Icon in Button --- */
.google-icon {
  width: 20px;
  height: 20px;
  margin-right: 4px;
}

/* --- Responsive: Tablet & Below --- */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .create-form {
    flex-direction: column;
  }

  .link-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .link-actions {
    align-self: flex-end;
  }

  .navbar-inner {
    padding: 0 16px;
  }

  .dashboard {
    padding: 88px 16px 32px;
  }

  .auth-card {
    padding: 24px;
  }

  .link-meta {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
  }

  #toast-container {
    right: 12px;
    left: 12px;
  }

  .toast {
    white-space: normal;
  }
}

/* --- Navigation Links --- */
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* --- Page Layouts (Features / Pricing) --- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 64px;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 16px 0 24px;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon .material-symbols-outlined {
  font-size: 24px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Pricing Grid --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.pricing-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
}

.period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 40px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.pricing-features .check {
  color: var(--accent-emerald);
  font-size: 20px;
}

.pricing-features strong {
  color: var(--text-primary);
}

.pro-card {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  }

  .auth-card {
    padding: 24px;
  }

  .link-meta {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* --- Responsive: Mobile --- */
@media (max-width: 480px) {
  .hero-subtitle {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
  }

  #toast-container {
    right: 12px;
    left: 12px;
  }

  .toast {
    white-space: normal;
  }
}

/* --- Navigation Links --- */
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    margin-left: auto;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 12px;
  }
  
  .nav-link {
    display: block;
    padding: 12px;
    font-size: 1.1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
  }
  
  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .nav-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Page Layouts (Features / Pricing) --- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.page-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 64px;
}

.page-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin: 16px 0 24px;
}

.page-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 32px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.1);
  color: var(--accent-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.feature-icon .material-symbols-outlined {
  font-size: 24px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --- Pricing Grid --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-header {
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 32px;
}

.pricing-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 12px;
}

.period {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 40px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.pricing-features .check {
  color: var(--accent-emerald);
  font-size: 20px;
}

.pricing-features strong {
  color: var(--text-primary);
}

.pro-card {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .pro-card {
    transform: scale(1);
  }
}

.pro-card:hover {
  border-color: rgba(124, 58, 237, 0.6);
}

.pricing-btn-free {
  border-radius: 9999px;
  margin-top: auto;
}

.pro-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Dashboard Updates & Footer */
.dashboard-top-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.create-card, .pro-promo-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.pro-promo-card {
  background: linear-gradient(135deg, rgba(20, 20, 30, 0.8), rgba(40, 20, 60, 0.8));
  text-align: center;
  padding: 24px;
  border-color: rgba(124, 58, 237, 0.3);
}

.badge {
  background: rgba(124, 58, 237, 0.1);
  color: var(--primary);
  border: 1px solid rgba(124, 58, 237, 0.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.danger-card {
  background: rgba(255, 77, 79, 0.05);
  border: 1px solid rgba(255, 77, 79, 0.3);
}

.icon-large {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* Footer (Redesign) */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(15, 15, 20, 0.8);
  backdrop-filter: blur(12px);
  padding: 48px 24px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-left p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

/* Document Pages */
.document-page {
  max-width: 800px;
}

.document-content {
  padding: 40px;
  text-align: left;
  line-height: 1.8;
  font-size: 1.05rem;
}

.document-content h3 {
  color: var(--text-primary);
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 16px;
}

.document-content h3:first-child {
  margin-top: 0;
}

.document-content p, .document-content ul {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.document-content li {
  margin-bottom: 8px;
}

@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: var(--shadow-glow, 0 0 15px rgba(124, 58, 237, 0.4)); filter: brightness(1); }
  50% { transform: scale(1.05); box-shadow: var(--shadow-glow, 0 0 30px rgba(124, 58, 237, 0.8)); filter: brightness(1.2); }
  100% { transform: scale(1); box-shadow: var(--shadow-glow, 0 0 15px rgba(124, 58, 237, 0.4)); filter: brightness(1); }
}

.badge-pro-animated {
  animation: pulseGlow 2s infinite ease-in-out;
  text-shadow: 0 0 8px rgba(255,255,255,0.5);
  font-weight: 700;
  letter-spacing: 1px;
}
