/* ============================================
   كونتينر 111 - Connect Page Styles
   Modern Design: Black, White & Turquoise
   ============================================ */

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

/* === CSS Variables (Default Dark) === */
:root {
  --accent: #00e5c7;
  --accent-dark: #00b89e;
  --accent-glow: rgba(0, 229, 199, 0.5);
  --accent-glow-soft: rgba(0, 229, 199, 0.15);
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text-primary: #ffffff;
  --text-secondary: #999999;
  --text-muted: #555555;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 229, 199, 0.2);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-accent: 0 0 20px var(--accent-glow-soft);
}

/* === Light Theme Variables === */
[data-theme="light"] {
  --accent: #00bfa6;
  --accent-dark: #009d87;
  --accent-glow: rgba(0, 191, 166, 0.4);
  --accent-glow-soft: rgba(0, 191, 166, 0.1);
  --bg-primary: #f5f6f8;
  --bg-secondary: #edeef1;
  --bg-card: #ffffff;
  --bg-card-hover: #fafbfc;
  --text-primary: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-accent: rgba(0, 191, 166, 0.3);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-accent: 0 4px 24px rgba(0, 191, 166, 0.15);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Cairo', 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  position: relative;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* === Animated Background === */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
  opacity: 0.08;
}

.bg-orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -10%;
  left: -10%;
  animation-delay: -7s;
  opacity: 0.06;
}

.bg-orb:nth-child(3) {
  width: 300px;
  height: 300px;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
  opacity: 0.02;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -40px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(40px, 30px) scale(1.02); }
}

/* === Grid Pattern Overlay === */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* === Main Container === */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === Floating Theme Toggle Button === */
.theme-toggle-btn {
  position: fixed;
  top: 22px;
  left: 22px;
  z-index: 1000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), 0 0 15px var(--accent-glow-soft);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  outline: none;
}

.theme-toggle-btn:hover {
  transform: rotate(25deg) scale(1.12);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3), 0 0 25px var(--accent-glow);
  color: #ffffff;
  background: var(--accent);
}

[data-theme="light"] .theme-toggle-btn {
  box-shadow: var(--shadow-card), var(--shadow-accent);
}

[data-theme="light"] .theme-toggle-btn:hover {
  color: #ffffff;
}

/* Light Theme Overrides */
[data-theme="light"] .grid-overlay {
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
}

[data-theme="light"] .bg-orb:nth-child(3) {
  background: #b8e6e0;
  opacity: 0.08;
}

[data-theme="light"] .social-link {
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .social-link:hover {
  box-shadow: var(--shadow-card), var(--shadow-accent);
}

[data-theme="light"] .social-icon-tiktok {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .qr-container {
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .logo-container.has-image .logo-inner {
  background: #ffffff;
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-card), var(--shadow-accent);
}

[data-theme="light"] .contact-card {
  box-shadow: var(--shadow-card);
}

/* === Top Glow Line === */
.top-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  z-index: 10;
}

.top-glow::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 40px;
  background: var(--accent);
  filter: blur(30px);
  opacity: 0.3;
}

/* === Logo Section === */
.logo-section {
  text-align: center;
  margin-bottom: 10px;
  animation: fadeInDown 0.8s ease-out;
}

.logo-container {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
}

.logo-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
  animation: pulse-ring 3s ease-in-out infinite;
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 199, 0.1);
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
}

.logo-inner {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 900;
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.logo-inner .logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -1px;
}

/* === Logo with Image Badge === */
.logo-container.has-image {
  width: 170px;
  height: 125px;
}

.logo-container.has-image .logo-ring {
  border-radius: 26px;
}

.logo-container.has-image .logo-ring::before {
  border-radius: 28px;
}

.logo-container.has-image .logo-inner {
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 25px var(--accent-glow-soft);
  padding: 6px;
}

.logo-container.has-image .logo-inner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  transition: transform 0.4s ease;
}

.logo-container.has-image:hover .logo-inner img {
  transform: scale(1.04);
}

/* === Brand Info === */
.brand-name {
  font-size: 32px;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.brand-name span {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.brand-tagline {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 8px;
  line-height: 1.6;
}

.brand-description {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 360px;
  margin: 0 auto;
}

/* === Divider === */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 28px auto;
  border-radius: 2px;
  animation: fadeIn 1s ease-out 0.3s both;
}

/* === Section Title === */
.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 20px;
  animation: fadeIn 1s ease-out 0.4s both;
}

/* === Social Links === */
.social-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  animation: fadeInUp 0.6s ease-out both;
}

.social-link:nth-child(1) { animation-delay: 0.1s; }
.social-link:nth-child(2) { animation-delay: 0.2s; }
.social-link:nth-child(3) { animation-delay: 0.3s; }
.social-link:nth-child(4) { animation-delay: 0.4s; }
.social-link:nth-child(5) { animation-delay: 0.5s; }

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(0, 229, 199, 0.05));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.social-link:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--border-accent);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.3),
    0 0 20px var(--accent-glow-soft);
}

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

.social-link:active {
  transform: translateY(-1px) scale(0.99);
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
  transition: all 0.4s ease;
}

.social-link:hover .social-icon {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* === TikTok Branding === */
.social-icon-tiktok {
  background: #010101 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.social-icon-tiktok i,
.social-icon .fa-tiktok {
  color: #ffffff !important;
  text-shadow: -1.8px -1.2px 0 #25f4ee, 1.8px 1.2px 0 #fe2c55;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.5));
}

.social-link:hover .social-icon-tiktok {
  box-shadow: -3px 0 16px rgba(37, 244, 238, 0.45), 3px 0 16px rgba(254, 44, 85, 0.45);
  border-color: rgba(255, 255, 255, 0.25);
}

.social-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.social-link:hover .social-name {
  color: var(--accent);
}

.social-handle {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
}

.social-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.4s ease;
  direction: ltr;
}

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

/* === Contact Section === */
.contact-section {
  width: 100%;
  display: flex;
  gap: 12px;
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease-out 0.6s both;
}

.contact-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: var(--border-accent);
  color: var(--accent);
  background: rgba(0, 229, 199, 0.05);
}

.contact-card i {
  font-size: 16px;
  color: var(--accent);
}

/* === QR Code Section === */
.qr-section {
  text-align: center;
  animation: fadeInUp 0.6s ease-out 0.7s both;
  width: 100%;
}

.qr-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.qr-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.qr-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.qr-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.qr-code-wrapper {
  display: inline-block;
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  position: relative;
  box-shadow: 0 0 40px var(--accent-glow-soft);
}

.qr-code-wrapper canvas,
.qr-code-wrapper img {
  display: block;
  border-radius: 4px;
}

.qr-url {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
  font-family: 'Inter', monospace;
  letter-spacing: 0.5px;
}

/* === Footer === */
.footer {
  margin-top: 40px;
  text-align: center;
  animation: fadeIn 1s ease-out 0.8s both;
}

.footer-text {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer-text .heart {
  color: var(--accent);
  display: inline-block;
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* === Animations === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .main-container {
    padding: 30px 16px 40px;
  }

  .brand-name {
    font-size: 26px;
  }

  .brand-tagline {
    font-size: 14px;
  }

  .social-link {
    padding: 14px 16px;
  }

  .social-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 12px;
  }

  .logo-container {
    width: 100px;
    height: 100px;
  }

  .contact-section {
    flex-direction: column;
  }
}

/* === Particles === */
.particle {
  position: fixed;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1);
  }
}
