/* ============================
   OMARS.BIO — Main Stylesheet
   Dark Glassmorphism Design
   ============================ */

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

:root {
  --color-bg: #050811;
  --color-surface: rgba(255, 255, 255, 0.04);
  --color-surface-hover: rgba(255, 255, 255, 0.08);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.18);
  --color-text: #f0f4ff;
  --color-text-muted: rgba(240, 244, 255, 0.5);
  --color-accent: #7c6cfc;
  --color-accent-2: #e040fb;
  --color-accent-3: #40c8e0;
  --color-featured: linear-gradient(135deg, #7c6cfc, #e040fb);
  --font-arabic: 'Tajawal', sans-serif;
  --font-latin: 'Inter', sans-serif;
  --radius-card: 24px;
  --radius-btn: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.05) inset;
  --shadow-btn: 0 4px 16px rgba(0,0,0,0.3);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-arabic);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Animated Background --- */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, #0d0a1a 0%, #050811 70%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: orbFloat 12s ease-in-out infinite alternate;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #7c6cfc, transparent 70%);
  top: -150px;
  right: -100px;
  animation-duration: 14s;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #e040fb, transparent 70%);
  bottom: -100px;
  left: -80px;
  animation-duration: 10s;
  animation-delay: -3s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #40c8e0, transparent 70%);
  top: 40%;
  left: 40%;
  animation-duration: 16s;
  animation-delay: -6s;
  opacity: 0.2;
}

.orb-4 {
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, #ff6b6b, transparent 70%);
  top: 10%;
  left: 20%;
  animation-duration: 18s;
  animation-delay: -9s;
  opacity: 0.15;
}

@keyframes orbFloat {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.05); }
  100% { transform: translateY(20px) scale(0.95); }
}

/* Grid overlay */
.bg-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- Main Container --- */
.container {
  position: relative;
  z-index: 10;
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Glass Card Base --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--color-border-hover);
}

/* --- Profile Card --- */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px 32px;
  animation: slideUp 0.6s ease both;
}

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

/* Avatar */
.avatar-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.avatar-ring {
  position: absolute;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #7c6cfc, #e040fb, #40c8e0, #7c6cfc);
  animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.avatar {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1040, #0d0a1a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-latin);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  border: 3px solid rgba(255,255,255,0.08);
  z-index: 1;
  cursor: default;
  transition: transform var(--transition);
  user-select: none;
}

.avatar:hover {
  transform: scale(1.05);
}

.status-dot {
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  background: #22c55e;
  border-radius: 50%;
  border: 3px solid var(--color-bg);
  z-index: 2;
  animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

/* Profile Text */
.name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.username {
  font-family: var(--font-latin);
  font-size: 14px;
  color: var(--color-accent);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.bio {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tag {
  background: rgba(124, 108, 252, 0.12);
  border: 1px solid rgba(124, 108, 252, 0.25);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 50px;
  transition: all var(--transition);
  cursor: default;
}

.tag:hover {
  background: rgba(124, 108, 252, 0.25);
  border-color: rgba(124, 108, 252, 0.5);
  transform: translateY(-2px);
}

/* --- Stats Row --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  animation: slideUp 0.6s ease 0.1s both;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 18px 12px;
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}

.stat-card:hover {
  border-color: rgba(124, 108, 252, 0.3);
  background: rgba(124, 108, 252, 0.06);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(124, 108, 252, 0.15);
}

.stat-number {
  display: block;
  font-family: var(--font-latin);
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c6cfc, #e040fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Links Section --- */
.links-section {
  animation: slideUp 0.6s ease 0.2s both;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding-right: 4px;
}

/* Link Buttons */
.link-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-decoration: none;
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-arabic);
  margin-bottom: 10px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
}

.link-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,108,252,0.08), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.link-btn:hover {
  border-color: rgba(124, 108, 252, 0.4);
  transform: translateX(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(124,108,252,0.2);
}

.link-btn:hover::before {
  opacity: 1;
}

.link-btn:active {
  transform: translateX(-2px) scale(0.99);
}

.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 18px;
  transition: all var(--transition);
}

.link-icon svg {
  width: 20px;
  height: 20px;
}

.link-btn:hover .link-icon {
  background: rgba(124, 108, 252, 0.2);
  transform: scale(1.1);
}

.link-text {
  flex: 1;
}

.link-arrow {
  color: var(--color-text-muted);
  font-size: 18px;
  transition: all var(--transition);
  flex-shrink: 0;
}

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

/* Featured Link */
.link-featured {
  background: linear-gradient(135deg, rgba(124,108,252,0.15), rgba(224,64,251,0.1));
  border-color: rgba(124, 108, 252, 0.3);
  position: relative;
}

.link-featured::after {
  content: 'NEW';
  position: absolute;
  top: -1px;
  left: -1px;
  background: var(--color-featured);
  color: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 16px 0 8px 0;
  font-family: var(--font-latin);
}

.link-featured:hover {
  border-color: rgba(224, 64, 251, 0.5);
  box-shadow: 0 8px 32px rgba(224,64,251,0.2), 0 0 0 1px rgba(224,64,251,0.3);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding-top: 8px;
  animation: slideUp 0.6s ease 0.3s both;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-border);
  border-radius: 50px;
  padding: 6px 16px;
  font-family: var(--font-latin);
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.footer-dot {
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: statusPulse 2.5s ease-in-out infinite;
}

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.25);
}

/* --- Particle Canvas --- */
#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(124,108,252,0.4);
  border-radius: 4px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
  .container {
    padding: 20px 14px 50px;
  }
  
  .name {
    font-size: 24px;
  }
  
  .profile-card {
    padding: 30px 20px 24px;
  }

  .stat-number {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .orb, .avatar-ring, .status-dot, .footer-dot {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
