/* ========== style.css - كأس العالم 2026 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(145deg, #0a1628 0%, #1a0a2e 50%, #0d1f3c 100%);
  font-family: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  padding: 20px;
  color: #f4f4f4;
  position: relative;
  overflow-x: hidden;
}

/* خلفية كأس العالم 2026 - أعلام الدول المستضيفة */
body::before {
  content: "🇲🇽🇨🇦🇺🇸🏆";
  position: fixed;
  top: 20px;
  right: 20px;
  font-size: 4rem;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  animation: floatBg 20s ease-in-out infinite;
}

@keyframes floatBg {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* تمائم كأس العالم 2026 العائمة */
.floating-mascots {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  font-size: 4rem;
  user-select: none;
}

.floating-mascot {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  font-size: 3.5rem;
  opacity: 0.12;
  animation: floatMascot 15s ease-in-out infinite;
  user-select: none;
  text-shadow: 0 0 30px rgba(255, 215, 0, 0.1);
}

.floating-mascot:nth-child(1) {
  top: 8%;
  left: 3%;
  animation-delay: 0s;
  font-size: 4rem;
  opacity: 0.10;
}

.floating-mascot:nth-child(2) {
  bottom: 12%;
  right: 2%;
  animation-delay: 5s;
  font-size: 3.8rem;
  opacity: 0.12;
}

.floating-mascot:nth-child(3) {
  top: 45%;
  left: 2%;
  animation-delay: 10s;
  font-size: 3.2rem;
  opacity: 0.10;
}

.floating-mascot:nth-child(4) {
  bottom: 30%;
  right: 3%;
  animation-delay: 3s;
  font-size: 2.8rem;
  opacity: 0.08;
}

.floating-mascot:nth-child(5) {
  top: 20%;
  right: 12%;
  animation-delay: 7s;
  font-size: 2.5rem;
  opacity: 0.07;
}

.floating-mascot:nth-child(6) {
  bottom: 40%;
  left: 8%;
  animation-delay: 12s;
  font-size: 2.2rem;
  opacity: 0.09;
}

@keyframes floatMascot {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-15px) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translateY(10px) rotate(-3deg) scale(0.95);
  }
  75% {
    transform: translateY(-8px) rotate(4deg) scale(1.02);
  }
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
}

/* تميمة خاصة تظهر وتختفي */
.floating-mascot.special {
  animation: specialFloat 20s ease-in-out infinite;
  font-size: 4.5rem;
  opacity: 0.06;
}

@keyframes specialFloat {
  0% {
    transform: translateY(0) scale(0.8) rotate(0deg);
    opacity: 0.04;
  }
  25% {
    transform: translateY(-30px) scale(1.1) rotate(10deg);
    opacity: 0.12;
  }
  50% {
    transform: translateY(20px) scale(0.9) rotate(-10deg);
    opacity: 0.06;
  }
  75% {
    transform: translateY(-15px) scale(1.05) rotate(5deg);
    opacity: 0.10;
  }
  100% {
    transform: translateY(0) scale(0.8) rotate(0deg);
    opacity: 0.04;
  }
}

/* تمائم صغيرة متحركة في الخلفية */
.mascot-sparkles {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  font-size: 1.2rem;
  animation: sparkleFloat 8s ease-in-out infinite;
}

.mascot-sparkles:nth-child(1) {
  top: 15%;
  left: 20%;
  animation-delay: 0s;
}
.mascot-sparkles:nth-child(2) {
  top: 60%;
  right: 15%;
  animation-delay: 3s;
}
.mascot-sparkles:nth-child(3) {
  bottom: 20%;
  left: 30%;
  animation-delay: 6s;
}
.mascot-sparkles:nth-child(4) {
  top: 35%;
  right: 25%;
  animation-delay: 2s;
}

@keyframes sparkleFloat {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.04; }
  50% { transform: translateY(-20px) rotate(180deg) scale(1.3); opacity: 0.12; }
  100% { transform: translateY(0) rotate(360deg) scale(1); opacity: 0.04; }
}

.game-container {
  max-width: 950px;
  margin: 0 auto;
  background: rgba(10, 18, 40, 0.85);
  backdrop-filter: blur(12px);
  border-radius: 48px;
  padding: 20px 20px 35px;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(255, 215, 0, 0.08),
    inset 0 1px 0 rgba(255, 215, 0, 0.15);
  border: 2px solid transparent;
  background-image: linear-gradient(rgba(10, 18, 40, 0.85), rgba(10, 18, 40, 0.85)), 
                    linear-gradient(135deg, #ff6b35, #ffd700, #ff6b35, #ffd700);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  position: relative;
  z-index: 1;
}

/* هيدر كأس العالم 2026 */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, #ff6b35, #ffd700, #ff6b35) 1;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-area h1 {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #ff6b35, #ffd700, #ff6b35);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
  font-weight: 900;
  letter-spacing: 1px;
}

.logo-area p {
  font-size: 0.8rem;
  color: #a8b5d9;
  font-weight: 500;
  background: rgba(255, 215, 0, 0.08);
  padding: 2px 15px;
  border-radius: 30px;
  display: inline-block;
}

/* تمائم كأس العالم 2026 في الهيدر */
.mascots {
  display: flex;
  gap: 6px;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(255, 215, 0, 0.15));
  padding: 5px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.1);
}

.mascots .mascot:nth-child(1) { animation-delay: 0s; }
.mascots .mascot:nth-child(2) { animation-delay: 0.5s; }
.mascots .mascot:nth-child(3) { animation-delay: 1s; }

.mascot {
  display: inline-block;
  transition: transform 0.3s;
  cursor: default;
}

.mascot:hover {
  transform: scale(1.4) rotate(15deg);
}

/* نظام القلوب بألوان جديدة */
.hearts-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 18, 40, 0.7);
  padding: 10px 22px;
  border-radius: 60px;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 215, 0, 0.15);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hearts {
  font-size: 1.8rem;
  letter-spacing: 3px;
  transition: all 0.3s;
}

.hearts .lost-heart {
  opacity: 0.2;
  filter: grayscale(1);
  transform: scale(0.7);
}

.questions-progress {
  font-weight: bold;
  font-size: 1.1rem;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 215, 0, 0.2));
  padding: 5px 22px;
  border-radius: 40px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.05);
}

/* شريط المستوى والخبرة */
.level-progress {
  background: rgba(10, 18, 40, 0.7);
  border-radius: 60px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 215, 0, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.level-badge {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 215, 0, 0.2));
  padding: 6px 18px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

.level-name {
  font-size: 1.1rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.xp-bar-container {
  flex: 2;
  min-width: 150px;
  background: rgba(20, 30, 60, 0.8);
  border-radius: 30px;
  height: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 215, 0, 0.08);
}

.xp-bar {
  background: linear-gradient(90deg, #ff6b35, #ffd700, #ff6b35);
  background-size: 200% 100%;
  width: 0%;
  height: 100%;
  border-radius: 30px;
  transition: width 0.6s ease;
  animation: shimmerXP 3s ease-in-out infinite;
}

@keyframes shimmerXP {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.xp-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.stats-compact {
  display: flex;
  gap: 18px;
  background: rgba(0, 0, 0, 0.4);
  padding: 5px 18px;
  border-radius: 40px;
  font-weight: bold;
  color: #a8b5d9;
  border: 1px solid rgba(255, 215, 0, 0.05);
}

.stats-compact span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* بطاقة السؤال */
.quiz-card {
  background: rgba(10, 18, 40, 0.6);
  border-radius: 38px;
  padding: 25px 20px;
  margin: 15px 0 20px;
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.05),
    0 12px 30px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.1);
  position: relative;
  backdrop-filter: blur(4px);
  z-index: 2;
}

/* علامة مستوى السؤال */
.difficulty-tag {
  display: inline-block;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 215, 0, 0.2));
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  margin-bottom: 20px;
  font-weight: bold;
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.1);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.03);
}

/* نص السؤال */
.question-text {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 30px;
  background: rgba(0, 0, 0, 0.4);
  padding: 22px 25px;
  border-radius: 48px;
  text-align: center;
  color: #ffffff;
  border: 1px solid rgba(255, 215, 0, 0.05);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* الخيارات - ألوان جديدة */
.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-btn {
  background: rgba(20, 35, 70, 0.7);
  border: 1px solid rgba(255, 215, 0, 0.1);
  padding: 14px 20px;
  border-radius: 60px;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: right;
  font-family: inherit;
  color: #e8ecf8;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.option-btn::before {
  content: '';
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.05), transparent);
  transition: right 0.5s ease;
}

.option-btn:hover:not(:disabled)::before {
  right: 100%;
}

.option-btn:hover:not(:disabled) {
  background: rgba(40, 60, 120, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 0 25px rgba(255, 215, 0, 0.05);
  border-color: rgba(255, 215, 0, 0.2);
}

.option-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.option-btn.correct-highlight {
  background: linear-gradient(135deg, #1a8a4a, #2ab86a);
  border-color: #ffd700;
  box-shadow: 0 0 30px rgba(42, 184, 106, 0.3), 0 4px 0 #0a5a2a;
  color: #fff;
}

.option-btn.wrong-highlight {
  background: linear-gradient(135deg, #8a1a1a, #cc2a2a);
  border-color: #ff6b35;
  box-shadow: 0 0 30px rgba(204, 42, 42, 0.3), 0 4px 0 #5a0a0a;
  color: #fff;
  text-decoration: line-through;
}

/* التغذية الراجعة */
.feedback {
  margin-top: 25px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 40px;
  text-align: center;
  font-weight: bold;
  font-size: 1rem;
  border: 1px solid rgba(255, 215, 0, 0.05);
  color: #e8ecf8;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* زر السؤال التالي */
.next-btn {
  background: linear-gradient(135deg, #ff6b35, #ff8a50);
  border: none;
  padding: 16px 30px;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: inherit;
  border-radius: 60px;
  width: 100%;
  color: #fff;
  margin-top: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 0 #b84a1a, 0 0 30px rgba(255, 107, 53, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 2;
}

.next-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #b84a1a, 0 0 40px rgba(255, 107, 53, 0.25);
  background: linear-gradient(135deg, #ff7a45, #ff9a60);
}

.next-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #b84a1a;
}

.next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 3px 0 #b84a1a;
}

/* نافذة الفوز والخسارة */
.game-over-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.game-over-overlay.hidden {
  display: none;
}

.game-over-card {
  background: linear-gradient(145deg, rgba(20, 35, 70, 0.95), rgba(10, 18, 40, 0.98));
  border: 2px solid transparent;
  background-image: linear-gradient(rgba(20, 35, 70, 0.95), rgba(10, 18, 40, 0.98)), 
                    linear-gradient(135deg, #ff6b35, #ffd700, #ff6b35);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  border-radius: 60px;
  padding: 45px 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 
    0 30px 80px rgba(0, 0, 0, 0.8),
    0 0 60px rgba(255, 215, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: popIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  z-index: 1001;
}

@keyframes popIn {
  0% {
    transform: scale(0.5) rotate(-5deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.game-over-card .win-icon {
  font-size: 5.5rem;
  display: block;
  margin-bottom: 15px;
  animation: bounceIcon 1s ease-in-out infinite;
}

@keyframes bounceIcon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1) rotate(5deg); }
}

.game-over-card .lose-icon {
  font-size: 4.5rem;
  display: block;
  margin-bottom: 15px;
}

.game-over-card h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.game-over-card p {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 25px;
  color: #c8d0e8;
}

.game-over-card .telegram-link {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b35, #ff8a50);
  color: #fff;
  padding: 16px 35px;
  border-radius: 60px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  box-shadow: 0 6px 0 #b84a1a, 0 0 30px rgba(255, 107, 53, 0.15);
}

.game-over-card .telegram-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #b84a1a, 0 0 40px rgba(255, 107, 53, 0.25);
}

.game-over-card .play-again-btn {
  background: transparent;
  border: 2px solid rgba(255, 215, 0, 0.3);
  color: #ffd700;
  padding: 13px 35px;
  border-radius: 60px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 18px;
  font-family: inherit;
}

.game-over-card .play-again-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: #ffd700;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.05);
}

/* تذييل الصفحة */
footer {
  text-align: center;
  font-size: 0.7rem;
  margin-top: 25px;
  opacity: 0.5;
  color: #a8b5d9;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

/* تصميم متجاوب */
@media (max-width: 600px) {
  .floating-mascot {
    font-size: 2.5rem !important;
    opacity: 0.06 !important;
  }
  
  .floating-mascot.special {
    font-size: 3rem !important;
  }
  
  .game-container {
    padding: 15px 12px 25px;
    border-radius: 30px;
  }
  
  .question-text {
    font-size: 1.15rem;
    padding: 16px 18px;
  }
  
  .option-btn {
    font-size: 0.85rem;
    padding: 12px 16px;
  }
  
  .level-progress {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hearts-container {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  
  .hearts {
    font-size: 1.5rem;
  }
  
  .game-over-card {
    padding: 30px 20px;
    border-radius: 40px;
  }
  
  .game-over-card h2 {
    font-size: 1.8rem;
  }
  
  .mascots {
    font-size: 1.3rem;
    padding: 3px 12px;
  }
  
  .logo-area h1 {
    font-size: 1.3rem;
  }
  
  .stats-compact {
    gap: 10px;
    padding: 4px 12px;
    font-size: 0.85rem;
  }
  
  .game-header {
    gap: 8px;
  }
  
  .next-btn {
    font-size: 1.1rem;
    padding: 14px 20px;
  }
  
  .mascot-sparkles {
    display: none;
  }
}

@media (max-width: 400px) {
  .floating-mascot {
    font-size: 1.8rem !important;
    opacity: 0.04 !important;
  }
  
  .mascots {
    font-size: 1rem;
    padding: 2px 8px;
  }
  
  .logo-area h1 {
    font-size: 1.1rem;
  }
  
  .question-text {
    font-size: 1rem;
    padding: 12px 14px;
  }
  
  .option-btn {
    font-size: 0.75rem;
    padding: 10px 12px;
  }
  
  .game-over-card h2 {
    font-size: 1.4rem;
  }
  
  .game-over-card p {
    font-size: 0.95rem;
  }
}

/* تخصيص شريط التمرير */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 18, 40, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ff6b35, #ffd700);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #ff8a50, #ffd700);
}