/* -------------------------------------------------------------------------- */
/* MYSTERY TOWN ( بلدة ميستري — VRP ) - ULTRA MOBILE OPTIMIZED PORTAL         */
/* Focus: Extreme Ergonomics, Fast Touch Response & Zero Clutter on Mobile    */
/* -------------------------------------------------------------------------- */

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

:root {
  --raw-obsidian: #050102;
  --raw-dark-crimson: #180306;
  --raw-crimson-bright: #e11d48;
  --raw-crimson-neon: #ff1244;
  --raw-gold: #d4af37;
  --raw-gold-bright: #fbbf24;

  --bg-app: var(--raw-obsidian);
  --bg-surface: rgba(18, 4, 8, 0.85);
  --bg-surface-active: rgba(35, 7, 14, 0.95);

  --accent-red: var(--raw-crimson-bright);
  --accent-red-glow: rgba(225, 29, 72, 0.4);
  --accent-gold: var(--raw-gold);

  --text-heading: #ffffff;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;

  --border-hud: rgba(225, 29, 72, 0.28);
  --border-hud-glow: rgba(255, 18, 68, 0.7);

  --font-heading: 'Outfit', 'Cairo', sans-serif;
  --font-body: 'Cairo', 'Tajawal', sans-serif;

  --radius-hud: 16px;
  --radius-pill: 9999px;
  --transition-hud: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-heading);
  direction: rtl;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  padding-bottom: 95px;
  background: 
    linear-gradient(180deg, rgba(6, 1, 3, 0.88) 0%, rgba(8, 2, 4, 0.95) 100%),
    url('assets/mystery_town_bg.jpg') center/cover no-repeat fixed;
}

/* Side Glow Vignettes */
body::before {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 60px;
  background: linear-gradient(90deg, rgba(225, 29, 72, 0.18) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 60px;
  background: linear-gradient(270deg, rgba(225, 29, 72, 0.18) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.laser-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--raw-crimson-neon), var(--raw-gold), transparent);
  z-index: 10;
  opacity: 0.85;
}

/* Main Container */
.portal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* User Discord Auth Bar */
.user-auth-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.discord-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: #5865F2;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
  transition: var(--transition-hud);
}

.discord-login-btn:hover {
  background: #4752C4;
  transform: translateY(-2px);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 8px;
  border-radius: var(--radius-pill);
  background: rgba(18, 4, 8, 0.85);
  border: 1px solid var(--border-hud-glow);
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--raw-crimson-bright);
}

.user-name-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: #ffffff;
}

.logout-sm-btn {
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #ff6b81;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.logout-sm-btn:hover {
  background: var(--raw-crimson-bright);
  color: #ffffff;
}
.portal-header {
  padding-top: 16px;
  margin-bottom: 20px;
  text-align: center;
}

.hero-banner-wrapper {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 16px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.5), rgba(212, 175, 55, 0.3));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.hero-banner-inner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0305;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  max-height: 180px; /* Reduced for mobile viewport ease */
  object-fit: cover;
  display: block;
}

@media (min-width: 640px) {
  .hero-banner-img {
    max-height: 300px;
  }
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 1, 2, 0.2) 0%, rgba(5, 1, 2, 0.85) 90%);
}

.server-logo-container {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.server-logo-frame {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #090204;
  padding: 2px;
  background: linear-gradient(135deg, var(--raw-gold), var(--raw-crimson-bright));
  box-shadow: 0 0 20px var(--accent-red-glow);
}

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

/* Header Titles */
.portal-title-block {
  margin-top: 26px;
}

.server-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff6b81;
  margin-bottom: 8px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.portal-main-heading {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 40%, var(--raw-gold-bright) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.portal-subheading {
  font-size: 0.88rem;
  color: var(--text-body);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
  font-weight: 600;
}

/* Mobile Quick Search Bar */
.search-box-wrapper {
  margin: 16px auto 12px;
  max-width: 600px;
}

.search-input-box {
  width: 100%;
  height: 48px;
  background: rgba(12, 2, 5, 0.9);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: var(--radius-pill);
  padding: 0 20px 0 45px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: var(--transition-hud);
}

.search-input-box:focus {
  border-color: var(--raw-crimson-neon);
  box-shadow: 0 0 15px rgba(255, 18, 68, 0.35);
}

/* Sticky Department Filters */
.nav-filter-wrapper {
  position: sticky;
  top: 10px;
  z-index: 90;
  margin: 0 auto 24px;
}

.nav-filter-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(12, 2, 5, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.75);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-filter-track::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex: 0 0 auto;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-hud);
  white-space: nowrap;
}

.tab-btn.active {
  background: linear-gradient(135deg, #7f0d23 0%, var(--raw-crimson-bright) 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 18px var(--accent-red-glow);
}

.tab-count {
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.75rem;
}

/* Mobile Friendly Job Cards Grid */
.jobs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .jobs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .jobs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Sleek Mobile Card */
.hud-card {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-hud);
  border-radius: var(--radius-hud);
  padding: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-hud);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.hud-card:active {
  transform: scale(0.98);
}

.hud-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.job-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(225, 29, 72, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--raw-crimson-neon);
}

.dept-badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  background: rgba(225, 29, 72, 0.15);
  color: #ff6b81;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

.dept-badge.gang {
  background: rgba(168, 85, 247, 0.15);
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

.dept-badge.justice {
  background: rgba(234, 179, 8, 0.15);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.4);
}

.dept-badge.media {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

.dept-badge.resignation {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.job-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.job-description {
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 16px;
}

.req-container {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.req-heading {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--raw-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.req-list-items {
  list-style: none;
}

.req-item-single {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 4px;
}

.bullet-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--raw-crimson-neon);
  margin-top: 6px;
  flex-shrink: 0;
}

/* Action Button - 54px Ergonomic Touch Target */
.hud-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #9f1239 0%, var(--raw-crimson-bright) 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--accent-red-glow);
  transition: var(--transition-hud);
}

.hud-btn:active {
  transform: scale(0.97);
}

/* Mobile Application Bottom Sheet Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 1, 2, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-hud);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  background: #0f0205;
  border: 1px solid var(--border-hud-glow);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  padding: 24px 20px 30px;
  box-shadow: 0 -15px 50px rgba(0, 0, 0, 0.95);
  transform: translateY(100%);
  transition: var(--transition-hud);
  position: relative;
}

@media (min-width: 640px) {
  .modal-box {
    border-radius: 20px;
    transform: scale(0.95);
  }
}

.modal-overlay.active .modal-box {
  transform: translateY(0) scale(1);
}

.close-btn {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--raw-gold);
  font-weight: 800;
}

.modal-main-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: #ffffff;
}

/* Forms */
.hud-form-group {
  margin-bottom: 18px;
}

.hud-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-body);
  margin-bottom: 6px;
}

.hud-label span.star {
  color: var(--raw-crimson-neon);
}

.hud-input, .hud-textarea {
  width: 100%;
  min-height: 52px; /* Touch target */
  background: rgba(6, 1, 3, 0.95);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-hud);
}

.hud-textarea {
  min-height: 95px;
  resize: vertical;
}

.hud-input:focus, .hud-textarea:focus {
  border-color: var(--raw-crimson-neon);
  box-shadow: 0 0 15px rgba(255, 18, 68, 0.4);
}

/* Realtime Discord Embed Preview */
.discord-preview-box {
  margin-top: 20px;
  background: #18191c;
  border-radius: 12px;
  border-right: 4px solid var(--raw-crimson-bright);
  padding: 14px;
  font-family: var(--font-body);
}

.discord-preview-title {
  font-size: 0.76rem;
  color: #b9bbbe;
  font-weight: 800;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.discord-preview-content {
  font-size: 0.85rem;
  color: #dcddde;
  line-height: 1.45;
}

/* Toast Message */
.toast-bar {
  position: fixed;
  bottom: 25px;
  right: 16px;
  left: 16px;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 20px;
  background: #150306;
  border: 1px solid var(--raw-crimson-neon);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  transform: translateY(120px);
  opacity: 0;
  transition: var(--transition-hud);
}

.toast-bar.active {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile Bottom Dock Bar */
.mobile-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 65px;
  background: rgba(8, 1, 3, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border-hud);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 99;
}

@media (min-width: 768px) {
  .mobile-dock {
    display: none;
  }
}

.dock-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-hud);
}

.dock-tab.active {
  color: var(--raw-crimson-bright);
}

.dock-tab svg {
  width: 20px;
  height: 20px;
}

/* Discord User Verification Card Components */
.discord-verify-section {
  margin-bottom: 22px;
}

.verify-card-box {
  background: rgba(18, 4, 8, 0.88);
  border: 1px solid rgba(225, 29, 72, 0.35);
  border-radius: 14px;
  padding: 16px;
}

.verify-card-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--raw-gold);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.verify-card-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.4;
}

.verify-input-group {
  display: flex;
  gap: 8px;
}

.verify-search-btn {
  padding: 0 20px;
  min-height: 52px;
  background: linear-gradient(135deg, #7f0d23 0%, var(--raw-crimson-bright) 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.verify-search-btn:hover {
  filter: brightness(1.15);
}

/* Verified Profile Card with Banner & Avatar */
.verified-profile-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #120306;
  border: 1px solid var(--border-hud-glow);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  margin-bottom: 15px;
}

.profile-banner-header {
  height: 90px;
  position: relative;
}

.profile-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 3, 6, 0.9) 100%);
}

.profile-avatar-wrapper {
  position: absolute;
  bottom: -22px;
  right: 16px;
  z-index: 2;
}

.profile-avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #120306;
  box-shadow: 0 0 15px var(--accent-red-glow);
}

.profile-card-body {
  padding: 26px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .profile-card-body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.profile-global-name {
  font-size: 1.1rem;
  font-weight: 900;
  color: #ffffff;
}

.profile-username {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.profile-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.change-user-link {
  background: none;
  border: none;
  color: #ff6b81;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  margin-right: 8px;
  text-decoration: underline;
}

.confirm-actions-row {
  margin-top: 10px;
  width: 100%;
}

.confirm-user-btn {
  width: 100%;
  min-height: 46px;
  background: #15803d;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(21, 128, 61, 0.4);
}

.confirm-user-btn:hover {
  background: #16a34a;
}

/* 2FA DM OTP Verification Box Component */
.otp-verification-box {
  margin-top: 15px;
  background: rgba(18, 3, 6, 0.95);
  border: 1px solid var(--raw-gold);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.otp-box-title {
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--raw-gold);
  margin-bottom: 6px;
}

.otp-box-sub {
  font-size: 0.8rem;
  color: var(--text-body);
  line-height: 1.45;
  margin-bottom: 14px;
}

.otp-input-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .otp-input-row {
    flex-direction: row;
  }
}

.otp-digit-input {
  letter-spacing: 4px;
  font-weight: 900;
  font-size: 1.2rem;
  text-align: center;
  border-color: var(--raw-gold);
}

.otp-submit-btn {
  padding: 0 20px;
  min-height: 52px;
  background: linear-gradient(135deg, #b45309 0%, var(--raw-gold) 100%);
  color: #000000;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.otp-submit-btn:hover {
  filter: brightness(1.15);
}
