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

:root {
  --bg-primary: #07090e;
  --bg-card: rgba(18, 24, 38, 0.65);
  --bg-card-hover: rgba(28, 38, 60, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.35);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #00b4d8;
  --accent-green: #25d366;
  --accent-pink: #e1306c;
  --accent-purple: #7f00ff;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  
  --shadow-glow: 0 10px 30px -10px rgba(0, 242, 254, 0.35);
  --shadow-card: 0 12px 32px 0 rgba(0, 0, 0, 0.45);
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  position: relative;
  padding: 20px 16px 40px;
}

/* Dynamic Interactive Tech Background Canvas */
#bg-tech-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

/* Background Animated Gradient Mesh */
.bg-glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  transition: background 0.5s ease;
  animation: floatOrb 12s infinite alternate ease-in-out;
}

.bg-orb-1 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, rgba(7, 9, 14, 0.9) 70%);
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
}

.bg-orb-2 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--accent-blue) 0%, rgba(7, 9, 14, 0.95) 75%);
  bottom: 10%;
  right: -50px;
  animation-delay: -6s;
}

@keyframes floatOrb {
  0% { transform: translate(-50%, 0) scale(1); }
  100% { transform: translate(-50%, 30px) scale(1.15); }
}

/* Container */
.card-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  z-index: 1;
}

/* Glass Card Shell */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
}

/* Header Profile Section */
.profile-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 10px;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 18px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 25px var(--border-glow);
  background-color: #1e293b;
}

.avatar-glow-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  z-index: -1;
  opacity: 0.8;
  filter: blur(6px);
  animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.5; filter: blur(4px); }
  100% { opacity: 0.9; filter: blur(8px); }
}

.profile-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #ffffff 40%, var(--text-sub));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-cyan);
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto 20px;
}

/* Quick Action Buttons (Save VCF & QR Share) */
.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.btn-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-primary-action {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #050b14;
  box-shadow: var(--shadow-glow);
}

.btn-primary-action:hover, .btn-primary-action:active {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary-action {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-secondary-action:hover, .btn-secondary-action:active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Link Cards List */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.link-card:hover, .link-card:active {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 24px var(--border-glow);
}

.link-icon-box {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

/* Icon specific theme styling */
.icon-whatsapp { background: rgba(37, 211, 102, 0.15); color: #25d366; }
.icon-instagram { background: rgba(225, 48, 108, 0.15); color: #f093fb; }
.icon-facebook { background: rgba(24, 119, 242, 0.15); color: #1877f2; }
.icon-website { background: rgba(255, 255, 255, 0.1); color: var(--accent-cyan); }
.icon-phone { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.icon-email { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.icon-telegram { background: rgba(42, 171, 238, 0.15); color: #38bdf8; }
.icon-tiktok { background: rgba(255, 0, 80, 0.15); color: #ff0050; }
.icon-linkedin { background: rgba(10, 102, 194, 0.15); color: #38bdf8; }
.icon-custom { background: rgba(168, 85, 247, 0.15); color: #c084fc; }

.link-card:hover .link-icon-box {
  transform: scale(1.1);
}

.link-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.link-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.link-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-arrow {
  color: var(--text-muted);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
}

.link-card:hover .link-arrow {
  color: var(--accent-cyan);
  transform: translateX(4px);
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0d1322;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-main);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 16px 0;
  box-shadow: 0 0 20px var(--border-glow);
}

.qr-box svg, .qr-box img {
  width: 220px;
  height: 220px;
  display: block;
}

/* Footer */
footer {
  margin-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.7;
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-cyan);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: toastIn 0.3s ease-out;
}

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

/* Color Swatches Grid in Admin */
.color-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-swatch:hover, .color-swatch.active {
  transform: scale(1.18);
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.color-picker-custom {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}
