/* =============================================
   IRAQ LOVE CHAT - Special Entry Effects CSS
   effects.css - Visual effects for admin/owner/moderator entry
   ============================================= */

/* ══════════════════════════════════════════
   ENTRY ANNOUNCEMENT BOX
══════════════════════════════════════════ */

.entry-announcement {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: none;
}

.entry-announcement.show {
  animation: entryBoxAppear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}

.entry-announcement.hide {
  animation: entryBoxDisappear 0.5s ease forwards;
}

@keyframes entryBoxAppear {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes entryBoxDisappear {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) translateY(-20px); }
}

.entry-box {
  position: relative;
  min-width: 340px;
  max-width: 480px;
  padding: 28px 36px;
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 60px rgba(0,0,0,0.8),
    inset 0 0 60px rgba(255,255,255,0.03);
}

.entry-username {
  font-size: 28px;
  font-weight: 900;
  font-family: 'Tajawal', sans-serif;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 2;
  display: block;
}

.entry-subtitle {
  font-size: 14px;
  font-weight: 500;
  font-family: 'Tajawal', sans-serif;
  opacity: 0.75;
  margin-top: 6px;
  position: relative;
  z-index: 2;
  display: block;
  direction: rtl;
}

.entry-role-icon {
  font-size: 42px;
  display: block;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

/* ══════════════════════════════════════════
   1. OWNER ENTRY — LIGHTNING / THUNDER EFFECT
══════════════════════════════════════════ */

.entry-box.owner-entry {
  background: rgba(8, 15, 30, 0.92);
  border: 2px solid rgba(0, 188, 255, 0.8);
  box-shadow:
    0 0 80px rgba(0, 188, 255, 0.5),
    0 0 150px rgba(0, 119, 255, 0.25),
    inset 0 0 40px rgba(0, 188, 255, 0.1),
    0 0 60px rgba(0,0,0,0.8);
}

.entry-box.owner-entry .entry-username {
  background: linear-gradient(90deg, #00bcff, #00f0ff, #0077ff, #3b82f6, #00bcff);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: ownerNameShimmer 0.8s linear infinite;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(0, 188, 255, 0.9));
}

@keyframes ownerNameShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 400% center; }
}

.entry-box.owner-entry .entry-subtitle { color: #00f0ff; }

/* Lightning bolt canvas overlay */
.owner-entry-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Screen flash effect for owner */
.screen-flash {
  position: fixed;
  inset: 0;
  background: rgba(255, 200, 50, 0.15);
  z-index: 8999;
  pointer-events: none;
  animation: screenFlashAnim 0.15s ease forwards;
}
@keyframes screenFlashAnim {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* Screen shake for owner */
.shake-active {
  animation: screenShake 0.4s cubic-bezier(0.36,0.07,0.19,0.97) forwards !important;
}
@keyframes screenShake {
  0%,100% { transform: translateX(0); }
  10%      { transform: translateX(-6px) rotate(-0.5deg); }
  20%      { transform: translateX(6px) rotate(0.5deg); }
  30%      { transform: translateX(-5px); }
  40%      { transform: translateX(5px); }
  50%      { transform: translateX(-3px); }
  60%      { transform: translateX(3px); }
  70%      { transform: translateX(-2px); }
  80%      { transform: translateX(2px); }
}

/* ══════════════════════════════════════════
   2. ADMIN ENTRY — SMOKE EFFECT
══════════════════════════════════════════ */

.entry-box.admin-entry {
  background: rgba(10, 8, 25, 0.90);
  border: 2px solid rgba(245, 158, 11, 0.7);
  box-shadow:
    0 0 60px rgba(245, 158, 11, 0.4),
    0 0 120px rgba(245, 158, 11, 0.15),
    inset 0 0 40px rgba(245, 158, 11, 0.08),
    0 0 60px rgba(0,0,0,0.8);
}

.entry-box.admin-entry .entry-username {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: adminNameShimmer 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(245,158,11,0.8));
}
@keyframes adminNameShimmer {
  0%,100% { background-position: 0% center; filter: drop-shadow(0 0 14px rgba(245,158,11,0.8)); }
  50%      { background-position: 200% center; filter: drop-shadow(0 0 24px rgba(251,191,36,1)); }
}
.entry-box.admin-entry .entry-subtitle { color: #fcd34d; }

/* Smoke particles */
.smoke-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(180,180,200,0.35) 0%, rgba(100,100,130,0.15) 40%, transparent 70%);
  animation: smokeRise var(--dur, 2.5s) ease-out var(--delay, 0s) infinite;
  pointer-events: none;
  z-index: 1;
  transform-origin: center bottom;
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translate(var(--tx, 0px), 20px) scale(0.3);
  }
  15% {
    opacity: 0.7;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--tx, 0px) * 1.8), -120px) scale(2.5) rotate(var(--rot, 30deg));
  }
}

/* ══════════════════════════════════════════
   3. MODERATOR ENTRY — ELECTRIC SPARKS
══════════════════════════════════════════ */

.entry-box.mod-entry {
  background: rgba(5, 15, 20, 0.90);
  border: 2px solid rgba(16, 185, 129, 0.7);
  box-shadow:
    0 0 60px rgba(16, 185, 129, 0.4),
    0 0 120px rgba(16, 185, 129, 0.15),
    inset 0 0 40px rgba(16, 185, 129, 0.08),
    0 0 60px rgba(0,0,0,0.8);
}

.entry-box.mod-entry .entry-username {
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7, #34d399, #10b981);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: modNameShimmer 1.5s linear infinite;
  filter: drop-shadow(0 0 12px rgba(16,185,129,0.9));
}
@keyframes modNameShimmer {
  0%   { background-position: 0% center; }
  100% { background-position: 300% center; }
}
.entry-box.mod-entry .entry-subtitle { color: #6ee7b7; }

/* Spark particles */
.spark-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #7fffd4;
  box-shadow: 0 0 6px #10b981, 0 0 12px #10b981;
  animation: sparkFly var(--dur, 0.8s) ease-out var(--delay, 0s) infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes sparkFly {
  0% {
    opacity: 1;
    transform: translate(0,0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 30px), var(--dy, -40px)) scale(0.2);
  }
}

/* Electric arc lines */
.electric-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, #10b981, #7fffd4, #10b981, transparent);
  opacity: 0;
  animation: electricFlicker 0.3s ease var(--delay, 0s) infinite;
  pointer-events: none;
  z-index: 2;
  border-radius: 2px;
  box-shadow: 0 0 8px #10b981;
}
@keyframes electricFlicker {
  0%,100% { opacity: 0; }
  50%      { opacity: 0.9; }
}

/* ══════════════════════════════════════════
   MOVING BLUE COLOR (Owner Name in chat)
══════════════════════════════════════════ */

.moving-blue-text {
  background: linear-gradient(90deg,
    #00bcff, #0077ff, #00f0ff, #0077ff, #00bcff, #3b82f6, #00bcff);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: movingBlue 3s linear infinite;
  font-weight: 900 !important;
  filter: drop-shadow(0 0 8px rgba(0, 188, 255, 0.6));
}
@keyframes movingBlue {
  0%   { background-position: 0% center; }
  100% { background-position: 400% center; }
}

/* Owner name glow pulse */
.owner-name-glow {
  animation: ownerGlow 2s ease-in-out infinite;
}
@keyframes ownerGlow {
  0%,100% { filter: drop-shadow(0 0 4px rgba(0, 188, 255, 0.4)); }
  50%      { filter: drop-shadow(0 0 14px rgba(0, 188, 255, 0.9)) drop-shadow(0 0 28px rgba(0, 240, 255, 0.5)); }
}

/* Admin name gold shimmer */
.admin-name-gold {
  color: #f59e0b !important;
  text-shadow: 0 0 10px rgba(245,158,11,0.6), 0 0 20px rgba(245,158,11,0.3);
  animation: adminGold 2.5s ease-in-out infinite;
  font-weight: 800 !important;
}
@keyframes adminGold {
  0%,100% { text-shadow: 0 0 10px rgba(245,158,11,0.6); }
  50%      { text-shadow: 0 0 20px rgba(245,158,11,0.9), 0 0 35px rgba(245,158,11,0.5); }
}

/* Moderator name emerald */
.mod-name-emerald {
  color: #10b981 !important;
  text-shadow: 0 0 8px rgba(16,185,129,0.5);
  animation: modEmerald 2s ease-in-out infinite;
  font-weight: 800 !important;
}
@keyframes modEmerald {
  0%,100% { text-shadow: 0 0 8px rgba(16,185,129,0.5); }
  50%      { text-shadow: 0 0 18px rgba(16,185,129,0.9), 0 0 30px rgba(16,185,129,0.4); }
}

/* ══════════════════════════════════════════
   PARTICLE CANVAS (Full screen background)
══════════════════════════════════════════ */
#effects-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8998;
  opacity: 0;
  transition: opacity 0.3s;
}
#effects-canvas.active { opacity: 1; }

/* ── Loading Spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════
   3D GIFT THEMES & PARTICLE BURST EFFECTS
══════════════════════════════════════════ */

.gift-particle {
  position: absolute;
  font-size: 18px;
  pointer-events: none;
  z-index: 5;
  animation: floatParticle var(--dur) ease-in-out var(--delay) infinite;
  transform-style: preserve-3d;
  opacity: 0;
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

@keyframes floatParticle {
  0% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--tx), var(--ty), var(--tz)) scale(1.2) rotate(360deg);
    opacity: 0;
  }
}

/* Polar Bear Themed 3D Card */
.gift-card-polar_bear {
  background: linear-gradient(135deg, rgba(173, 216, 230, 0.15), rgba(240, 248, 255, 0.25)) !important;
  border: 2px solid rgba(224, 243, 255, 0.8) !important;
  box-shadow: 
    0 0 40px rgba(0, 240, 255, 0.4),
    inset 0 0 25px rgba(255, 255, 255, 0.3) !important;
  backdrop-filter: blur(15px);
}

/* One-eyed Tiger Themed 3D Card */
.gift-card-one_eyed_tiger {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.15), rgba(0, 0, 0, 0.5)) !important;
  border: 2px solid rgba(255, 140, 0, 0.8) !important;
  box-shadow: 
    0 0 45px rgba(255, 69, 0, 0.5),
    inset 0 0 20px rgba(255, 140, 0, 0.25) !important;
}

/* Glowing Chinese Dragon Themed 3D Card */
.gift-card-glowing_dragon {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 0, 85, 0.25)) !important;
  border: 2.5px solid rgba(255, 215, 0, 0.9) !important;
  box-shadow: 
    0 0 60px rgba(255, 215, 0, 0.7),
    0 0 120px rgba(255, 0, 85, 0.4),
    inset 0 0 30px rgba(255, 255, 255, 0.4) !important;
  animation: rotate3dGift 5s cubic-bezier(0.2, 0.8, 0.2, 1) infinite, dragonGlowPulse 1.5s infinite alternate !important;
}

@keyframes dragonGlowPulse {
  0% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), 0 0 80px rgba(255, 0, 85, 0.3), inset 0 0 20px rgba(255,255,255,0.3); }
  100% { box-shadow: 0 0 75px rgba(255, 215, 0, 0.8), 0 0 140px rgba(255, 0, 85, 0.6), inset 0 0 40px rgba(255,255,255,0.5); }
}

/* Standard Dragon Themed 3D Card */
.gift-card-dragon {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(15, 10, 10, 0.7)) !important;
  border: 2px solid rgba(220, 38, 38, 0.8) !important;
  box-shadow: 
    0 0 50px rgba(220, 38, 38, 0.6),
    inset 0 0 20px rgba(220, 38, 38, 0.3) !important;
}

/* Galaxy Themed 3D Card */
.gift-card-galaxy {
  background: radial-gradient(circle, rgba(126, 34, 206, 0.3) 0%, rgba(15, 15, 35, 0.85) 100%) !important;
  border: 2px solid rgba(192, 132, 252, 0.8) !important;
  box-shadow: 
    0 0 55px rgba(126, 34, 206, 0.6),
    0 0 100px rgba(0, 240, 255, 0.3),
    inset 0 0 25px rgba(192, 132, 252, 0.3) !important;
}

/* Diamond Themed 3D Card */
.gift-card-diamond {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(255, 255, 255, 0.2)) !important;
  border: 2px solid rgba(56, 189, 248, 0.8) !important;
  box-shadow: 
    0 0 45px rgba(56, 189, 248, 0.5),
    inset 0 0 25px rgba(255, 255, 255, 0.35) !important;
}

/* Red Rose Themed 3D Card */
.gift-card-rose {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(251, 113, 133, 0.2)) !important;
  border: 2px solid rgba(236, 72, 153, 0.8) !important;
  box-shadow: 
    0 0 35px rgba(236, 72, 153, 0.4),
    inset 0 0 15px rgba(236, 72, 153, 0.2) !important;
}
