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

/* Core Variables & Tokens */
:root {
  --bg-dark: #080512;
  --bg-card: rgba(22, 15, 38, 0.65);
  --bg-input: rgba(13, 8, 26, 0.8);
  --border-light: rgba(168, 85, 247, 0.15);
  --border-focus: rgba(232, 121, 249, 0.6);
  --color-primary: #a855f7;
  --color-primary-hover: #b55fe6;
  --color-accent: #e879f9;
  --color-cyan: #38bdf8;
  --color-text-main: #f3e8ff;
  --color-text-muted: #a78bfa;
  --color-success: #34d399;
  --color-danger: #f87171;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-glow: 0 0 25px rgba(168, 85, 247, 0.35);
  --shadow-neon: 0 0 35px rgba(232, 121, 249, 0.45);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--color-text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Orbs */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
  mix-blend-mode: screen;
  animation: floatOrb 25s infinite alternate ease-in-out;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(0, 0, 0, 0) 70%);
  top: -10%;
  left: -10%;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
  bottom: -15%;
  right: -10%;
  animation-duration: 35s;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-duration: 20s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(5vw, 8vh) scale(1.1);
  }
  100% {
    transform: translate(-5vw, -5vh) scale(0.9);
  }
}

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

/* Under Construction Page */
.construction-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  position: relative;
}

.logo-icon-wrapper {
  position: relative;
  margin-bottom: 2rem;
  animation: pulseLogo 3s infinite ease-in-out;
}

.podcast-mic {
  width: 80px;
  height: 80px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  filter: drop-shadow(0 0 15px rgba(232, 121, 249, 0.8));
}

@keyframes pulseLogo {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.4));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 25px rgba(232, 121, 249, 0.8));
  }
}

.construction-tag {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: var(--color-accent);
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
  display: inline-block;
}

.gradient-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #fff 10%, #e879f9 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 800px;
}

@media(min-width: 768px) {
  .gradient-title {
    font-size: 5rem;
  }
}

.construction-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: 3rem;
  font-weight: 400;
}

/* Glassmorphic Form Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  border-color: rgba(232, 121, 249, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(168, 85, 247, 0.15);
}

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

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--color-text-muted);
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 15px rgba(232, 121, 249, 0.25);
  background: rgba(13, 8, 26, 0.9);
}

/* Custom Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

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

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--color-text-main);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.btn-danger {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--color-danger);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.25);
  border-color: var(--color-danger);
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.2);
}

/* Footer / Admin Access */
.footer-text {
  margin-top: 4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.admin-link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
  border-bottom: 1px dashed rgba(167, 139, 250, 0.4);
}

.admin-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-shadow: 0 0 10px rgba(232, 121, 249, 0.5);
}

/* Admin Panel Page */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2.5rem;
}

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

.logout-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--color-text-muted);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.logout-btn:hover {
  color: var(--color-danger);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.05);
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.stat-value.accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Dashboard Forms and Split Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

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

.dashboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 1.75rem;
  height: fit-content;
}

.dashboard-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #fff;
  border-left: 3px solid var(--color-primary);
  padding-left: 0.75rem;
}

/* Tables in Dashboard */
.table-container {
  overflow-x: auto;
}

.links-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.links-table th {
  padding: 1rem;
  border-bottom: 2px solid var(--border-light);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.links-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  vertical-align: middle;
}

.links-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.url-cell {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.short-url-link {
  color: var(--color-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.short-url-link:hover {
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.clicks-badge {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--color-cyan);
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.8rem;
  display: inline-block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.toast {
  background: rgba(22, 15, 38, 0.95);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--color-primary);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  color: var(--color-text-main);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-size: 0.9rem;
  min-width: 280px;
  max-width: 400px;
}

.toast.success {
  border-left-color: var(--color-success);
}

.toast.error {
  border-left-color: var(--color-danger);
}

@keyframes slideIn {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Clipboard utility action */
.copy-btn {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-light);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
}

.copy-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* 404 Page Styling */
.notfound-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
}

.notfound-code {
  font-family: var(--font-heading);
  font-size: 8rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  animation: pulseGlow 4s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% {
    text-shadow: 0 0 10px rgba(232, 121, 249, 0.1);
  }
  100% {
    text-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
  }
}

/* Hide elements dynamically */
.hidden {
  display: none !important;
}

/* Loading overlays / spinners */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border-left-color: var(--color-accent);
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
