/* max/base.css - The Clean Base (Restored) */

/* =========================================================
1. Imports & Fonts
========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Creepster&family=Lalezar&family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --header-bg-color: #050000;
  --gold-color: #ffc107;
  --red-horror: #e31c25;
}

html { font-size: 85%; scroll-behavior: smooth; }

/* ملحوظة: شلنا أي تغيير في الاتجاهات هنا عشان الموقع يرجع لطبيعته */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Tajawal', sans-serif; }

body {
  background-color: #050000;
  color: #f5f5f5;
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  width: 100%;
}

a { color: #ff4b4b; text-decoration: none; transition: color 0.3s; }
a:hover { color: #ff0000; }

/* =========================================================
2. Hero Section
========================================================= */
.hero-with-bg {
  position: relative; width: 100%; min-height: 600px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding-top: 80px; background-color: #000;
  text-align: center; color: white; overflow: hidden;
  border-bottom: 3px solid #300; box-shadow: 0 10px 50px #000;
}

.hero-with-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.8) 100%);
  z-index: 1;
}

.hero-content {
  z-index: 2; position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 15px;
}

.hero-main-title {
  display: block !important; font-family: 'Lalezar', cursive;
  font-size: 4.5rem; color: #fff;
  text-shadow: 0 4px 15px rgba(255, 0, 0, 0.8); margin-bottom: 10px;
}

.rec-container {
  display: flex; align-items: center; gap: 8px;
  font-weight: bold; color: #ff3333;
  letter-spacing: 2px; font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.6); padding: 5px 15px; border-radius: 4px;
}

.rec-dot {
  width: 10px; height: 10px; background-color: #ff0000;
  border-radius: 50%; box-shadow: 0 0 8px #ff0000;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.legacy-subtitle {
  font-size: 1.2rem; color: #ddd; max-width: 600px; line-height: 1.6;
  text-shadow: 0 2px 4px #000;
}

.legacy-btn {
  margin-top: 20px; background: transparent; color: #fff;
  border: 1px solid var(--red-horror);
  padding: 10px 35px; border-radius: 50px;
  font-weight: bold; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  transition: all 0.3s ease; box-shadow: 0 0 10px rgba(227, 28, 37, 0.2);
}
.legacy-btn:hover {
  background: var(--red-horror);
  box-shadow: 0 0 20px rgba(227, 28, 37, 0.6); transform: translateY(-3px);
}

/* =========================================================
3. Layout Helpers
========================================================= */
.horror18-section {
  width: 100%; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px; padding: 40px 20px;
  background: #050000; justify-items: center;
}

.section-visitor {
  position: relative; width: 100%; margin-top: 80px;
  padding: 60px 20px;
  background: radial-gradient(circle at top, #1a0808, #050000);
  box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.9);
  display: flex; flex-direction: column; align-items: center;
}
.section-visitor::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 0%, #ff0000 50%, transparent 100%);
  box-shadow: 0 0 15px 1px rgba(255, 0, 0, 0.8); opacity: 0.8;
}

.contact-form {
  width: 100%; max-width: 700px;
  display: flex; flex-direction: column; gap: 15px;
}
.contact-form input, .contact-form textarea {
  width: 100%; padding: 15px; border-radius: 8px;
  border: 1px solid #333; background: #0d0f12;
  color: #eee; font-size: 1rem; transition: border 0.3s;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--red-horror); outline: none;
  box-shadow: 0 0 10px rgba(227, 28, 37, 0.2);
}

/* =========================================================
4. Chat Modal
========================================================= */
.chat-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 2147483646;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: 0.3s ease;
}
.chat-modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }

.chat-modal-box {
  width: 90%; max-width: 450px; height: 600px;
  background: #0a0a0a; border: 1px solid var(--red-horror);
  border-radius: 15px; display: flex; flex-direction: column;
  box-shadow: 0 0 30px rgba(227, 28, 37, 0.3);
  overflow: hidden;
  transform: scale(0.9); transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-modal-overlay.active .chat-modal-box { transform: scale(1); }

.chat-header {
  padding: 15px 20px; background: linear-gradient(90deg, #1a0000, #000);
  border-bottom: 1px solid #333;
  display: flex; justify-content: space-between; align-items: center; color: #fff;
}
.chat-header h3 { margin: 0; font-size: 1.1rem; color: var(--gold-color); display: flex; gap: 10px; align-items: center; }
.close-btn { background: none; border: none; color: #888; font-size: 1.2rem; cursor: pointer; transition: 0.3s; }
.close-btn:hover { color: var(--red-horror); transform: rotate(90deg); }

.chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-welcome { text-align: center; color: #555; margin-top: 50px; }
.chat-welcome i { font-size: 3rem; margin-bottom: 10px; opacity: 0.5; }

.chat-footer { padding: 15px; background: #111; border-top: 1px solid #333; display: flex; gap: 10px; }
#chatInput {
  flex: 1; padding: 10px 15px; background: #000;
  border: 1px solid #333; border-radius: 20px;
  color: #fff; outline: none; transition: 0.3s;
}
#chatInput:focus { border-color: var(--red-horror); box-shadow: 0 0 10px rgba(227, 28, 37, 0.2); }
#sendMessageBtn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--red-horror); border: none; color: #fff;
  cursor: pointer; transition: 0.3s;
  display: flex; align-items: center; justify-content: center;
}
#sendMessageBtn:hover { transform: scale(1.1); background: #ff0000; }

/* =========================================================
5. Header Bar Override (الشريط الأسود - بدون عكس اتجاهات)
========================================================= */
#floating-action-bar {
  width: 100% !important;
  height: 70px !important;
  background-color: #000000 !important;
  border-bottom: 1px solid #1a1a1a !important;
  top: 0 !important;
  left: 0 !important;
  border-radius: 0 !important;
  padding: 0 30px !important;
  box-shadow: 0 5px 30px rgba(0,0,0,0.9) !important;
  z-index: 1000 !important;
  /* هام: بنسيب ترتيب العناصر زي ما هو في الكود، مش بنجبره يتعكس */
}

/* =========================================================
6. SweetAlert & Profile Fixes (الجوكر)
* الكود ده بيصلح ظهور البروفايل فوق الشريط، وبيظبط الكلام عربي
========================================================= */
div:where(.swal2-container) {
  z-index: 2147483647 !important; /* فوق كل حاجة في الكون */
}

div:where(.swal2-popup) {
  direction: rtl !important;      /* يخلي الكلام من اليمين للشمال */
  text-align: right !important;   /* يحاذي النص يمين */
  font-family: 'Tajawal', sans-serif !important;
}

div:where(.swal2-html-container) {
  text-align: right !important;
}
