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

:root {
  --border-radius-sm: 0px;
  --border-radius-md: 0px;
  --border-radius-lg: 0px;
  --border-radius-xl: 0px;

  --bg-body: #020408;
  --bg-gradient: linear-gradient(180deg, #020408 0%, #040a12 60%, #020408 100%);
  --bg-card: rgba(4, 10, 20, 0.92);
  --bg-card-solid: #040a14;
  --bg-topbar: rgba(2, 4, 8, 0.97);
  --bg-input: rgba(2, 6, 14, 0.9);
  --bg-overlay: rgba(0, 0, 0, 0.93);

  --text-primary: #d8eeff;
  --text-secondary: #5a7a99;
  --text-muted: #2a4060;

  --border-light: rgba(0, 200, 255, 0.15);
  --border-medium: rgba(0, 200, 255, 0.35);
  --border-strong: rgba(0, 200, 255, 0.7);

  --accent-blue: #00c8ff;
  --accent-blue-soft: rgba(0, 200, 255, 0.08);
  --accent-blue-glow: rgba(0, 200, 255, 0.5);
  --accent-blue-text: #40d8ff;
  --accent-blue-gradient: linear-gradient(180deg, #00c8ff 0%, #0066cc 100%);

  --shadow-card: 0 0 0 1px rgba(0,200,255,0.2), 0 4px 30px rgba(0,0,0,0.8);
  --shadow-card-hover: 0 0 0 1px rgba(0,200,255,0.6), 0 0 20px rgba(0,200,255,0.25), 0 4px 40px rgba(0,0,0,0.9);
  --shadow-modal: 0 0 0 1px rgba(0,200,255,0.5), 0 0 40px rgba(0,200,255,0.15), 0 8px 60px rgba(0,0,0,0.95);
  --shadow-neon: 0 0 8px rgba(0,200,255,0.8), 0 0 20px rgba(0,200,255,0.4);

  --xp-bar-bg: rgba(0,200,255,0.08);
  --xp-fill-bg: linear-gradient(90deg, #00c8ff, #0088ff);
  --xp-text-color: #00c8ff;

  --nav-active-bg: rgba(0,200,255,0.1);
  --nav-active-color: #00c8ff;

  --toast-bg: #020a14;
  --blur-amount: 0px;
  --transition: 0.2s ease;
  --transition-fast: 0.12s ease;

  --font: 'Rajdhani', sans-serif;
  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'Rajdhani', monospace;

  --sl-corner-size: 14px;
  --sl-border-color: #00c8ff;

  --bg-sidebar: rgba(255, 255, 255, 0.02);
  --bg-sidebar-hover: rgba(0, 200, 255, 0.06);
  --text-on-accent: #ffffff;
  --accent-red: #ff4466;
  --accent-red-soft: rgba(255, 68, 102, 0.1);
  --accent-red-text: #ff7799;
  --accent-yellow: #ffcc00;
  --accent-yellow-soft: rgba(255, 204, 0, 0.1);
  --accent-yellow-text: #ffdd44;
  --accent-purple: #8866ff;
  --accent-purple-soft: rgba(136, 102, 255, 0.1);
  --accent-purple-text: #aa88ff;
  --accent-purple-gradient: linear-gradient(135deg, #8866ff, #6644dd);
  --accent-gold: #ffaa00;
  --accent-gold-soft: rgba(255, 170, 0, 0.15);
  --quote-ar-color: #00c8ff;
  --quote-en-color: #5a7a99;
  --toast-text: #d8eeff;
  --rank-glow: 0 0 20px rgba(0, 200, 255, 0.25);
  --scrollbar-track: rgba(0, 200, 255, 0.02);
  --scrollbar-thumb: rgba(0, 200, 255, 0.2);
  --danger-gradient: linear-gradient(135deg, #ff4466, #dd2244);
  --warning-bg: rgba(255, 204, 0, 0.06);
  --warning-border: rgba(255, 204, 0, 0.2);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 20px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,200,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,200,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.15) 2px,
    rgba(0,0,0,0.15) 3px
  );
  background-size: 100% 3px;
  pointer-events: none;
  z-index: 9999;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,200,255,0.5); }

::selection { background: var(--accent-blue-soft); color: var(--accent-blue); }

[dir="rtl"] .top-nav-left { flex-direction: row-reverse; }
[dir="rtl"] .top-nav-right { flex-direction: row-reverse; }
[dir="rtl"] .modal-header { flex-direction: row-reverse; }
[dir="rtl"] .section-actions { flex-direction: row-reverse; }
[dir="rtl"] .profile-card { text-align: right; }
[dir="rtl"] .side-menu {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid rgba(0,200,255,0.3);
  box-shadow: -2px 0 30px rgba(0,0,0,0.8), 0 0 20px rgba(0,200,255,0.08);
  transform: translateX(100%);
}
[dir="rtl"] .side-menu.open {
  transform: translateX(0);
}

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; }

/* ============================================================
   TOP NAVIGATION BAR
   ============================================================ */
.top-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: rgba(2, 4, 8, 0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(0,200,255,0.3);
  box-shadow: 0 0 30px rgba(0,200,255,0.08), 0 2px 0 rgba(0,200,255,0.15);
  gap: 10px;
  min-height: 60px;
}

.top-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.top-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-nav-tabs {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 2px;
  overflow-x: auto;
  flex: 1;
  justify-content: center;
  padding: 0 8px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.top-nav-tabs::-webkit-scrollbar { display: none; }

.app-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #00c8ff;
  text-shadow: 0 0 10px rgba(0,200,255,0.8), 0 0 30px rgba(0,200,255,0.4);
  -webkit-text-fill-color: unset;
  background: none;
  animation: none;
  white-space: nowrap;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  position: relative;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-btn:hover {
  border-color: rgba(0,200,255,0.3);
  color: #00c8ff;
  background: rgba(0,200,255,0.05);
  text-shadow: 0 0 8px rgba(0,200,255,0.6);
}
.nav-btn.active {
  border-color: rgba(0,200,255,0.5);
  border-bottom: 2px solid #00c8ff;
  color: #00c8ff;
  background: rgba(0,200,255,0.08);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(0,200,255,0.7);
  box-shadow: 0 0 15px rgba(0,200,255,0.1);
}
.nav-btn.active::after {
  display: none;
}

.nav-badge {
  margin-left: 4px;
  background: #00c8ff;
  color: #000;
  font-size: 0.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  min-width: 16px;
  height: 16px;
  padding: 1px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  line-height: 1;
  box-shadow: none;
}

/* ============================================================
   HAMBURGER & SIDE DRAWER (Mobile)
   ============================================================ */
.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0,200,255,0.3);
  border-radius: 0;
  background: transparent;
  color: #00c8ff;
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.hamburger-btn:hover {
  border-color: #00c8ff;
  box-shadow: 0 0 10px rgba(0,200,255,0.3);
  background: rgba(0,200,255,0.05);
}

.side-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.side-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 160;
  width: 280px;
  max-width: 85vw;
  background: rgba(2,4,8,0.98);
  border-right: 1px solid rgba(0,200,255,0.3);
  box-shadow: 2px 0 30px rgba(0,0,0,0.8), 0 0 20px rgba(0,200,255,0.08);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.side-menu.open {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(0,200,255,0.2);
  flex-shrink: 0;
}

.side-menu-title {
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: #00c8ff;
  text-shadow: 0 0 8px rgba(0,200,255,0.6);
  text-transform: uppercase;
}

.side-menu-body {
  display: flex;
  flex-direction: column;
  padding: 10px 8px;
  gap: 4px;
  flex: 1;
}

.side-menu-body .nav-btn {
  padding: 12px 14px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  width: 100%;
  text-align: left;
  gap: 10px;
  border-color: transparent;
}
.side-menu-body .nav-btn:hover {
  border-color: rgba(0,200,255,0.3);
}
.side-menu-body .nav-btn.active {
  border-color: rgba(0,200,255,0.5);
  border-left: 2px solid #00c8ff;
  border-bottom: none;
  box-shadow: inset 0 0 15px rgba(0,200,255,0.05);
}

.side-menu-body .nav-btn .nav-badge {
  margin-left: auto;
}

.btn {
  display: inline-flex;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  border: 1px solid rgba(0,200,255,0.4);
  border-radius: 0;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  position: relative;
  overflow: visible;
}

.btn::before {
  display: none;
}

.btn-primary {
  background: rgba(0,200,255,0.12);
  color: #00c8ff;
  border-color: #00c8ff;
  text-shadow: 0 0 8px rgba(0,200,255,0.6);
  box-shadow: 0 0 10px rgba(0,200,255,0.2), inset 0 0 10px rgba(0,200,255,0.05);
}
.btn-primary:hover {
  background: rgba(0,200,255,0.22);
  box-shadow: 0 0 20px rgba(0,200,255,0.5), inset 0 0 15px rgba(0,200,255,0.1);
  border-color: #00c8ff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(0,200,255,0.3);
}
.btn-secondary:hover {
  border-color: rgba(0,200,255,0.6);
  color: #00c8ff;
  box-shadow: 0 0 10px rgba(0,200,255,0.2);
  background: transparent;
}

.btn-success {
  background: var(--accent-purple-gradient);
  color: white;
  border-color: rgba(136, 102, 255, 0.3);
  box-shadow: 0 0 12px rgba(136, 102, 255, 0.2);
}
.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(136, 102, 255, 0.35);
}

.btn-danger {
  background: transparent;
  color: #ff3050;
  border-color: rgba(255,50,80,0.5);
  box-shadow: 0 0 10px rgba(255,50,80,0.15);
}
.btn-danger:hover {
  border-color: #ff3050;
  box-shadow: 0 0 20px rgba(255,50,80,0.4);
  background: transparent;
  transform: none;
}

.btn-filter {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 22px;
  font-size: 0.72rem;
  border: 1px solid rgba(0,200,255,0.2);
  border-radius: 0;
  font-family: var(--font);
  text-transform: none;
  letter-spacing: normal;
}
.btn-filter.active {
  background: transparent;
  color: #00c8ff;
  border-color: #00c8ff;
  box-shadow: 0 0 10px rgba(0,200,255,0.3);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.72rem;
  margin-top: 10px;
  margin-right: 8px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0,200,255,0.15);
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-icon:hover {
  border-color: rgba(0,200,255,0.5);
  color: #00c8ff;
  box-shadow: 0 0 10px rgba(0,200,255,0.2);
  background: transparent;
}

.content {
  margin: 0 auto;
  padding: 20px 28px 90px;
  max-width: 1120px;
  margin-top: 70px;
  position: relative;
  z-index: 2;
}

/* ============================================================
   TAB CONTENT - CENTER ALIGNMENT (except Inventory)
   ============================================================ */
.tab-content {
  display: none;
  animation: fadeSlideIn 0.4s var(--transition);
}
.tab-content.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#tab-inventory.active {
  display: block;
  text-align: left;
}

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

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  border-bottom: 1px solid rgba(0,200,255,0.15);
  padding-bottom: 12px;
}
.section-header h2 {
  font-size: 1.2rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #e8f4ff;
  text-shadow: 0 0 8px rgba(0,200,255,0.3);
}
.section-header h2 i {
  color: #00c8ff;
  text-shadow: 0 0 10px rgba(0,200,255,0.8);
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-mono);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
  width: 100%;
  border: 1px dashed rgba(0,200,255,0.15);
  border-radius: 0;
  background: rgba(0,200,255,0.02);
}
.empty-state p {
  margin-bottom: 14px;
  font-size: 0.65rem;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.warning-banner {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--accent-yellow-text);
  padding: 12px 18px;
  border-radius: 0;
  margin-bottom: 18px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: none;
  width: 100%;
  max-width: 700px;
}

/* ============================================================
   PROFILE CARD (STATUS panel)
   ============================================================ */
.profile-card {
  display: flex;
  align-items: center;
  gap: 26px;
  background: rgba(4,10,20,0.95);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 26px 32px;
  margin-bottom: 28px;
  box-shadow: 0 0 0 1px rgba(0,200,255,0.1), 0 0 40px rgba(0,0,0,0.9);
  border: 1px solid rgba(0,200,255,0.3);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 800px;
  animation: borderGlowPulse 3s ease-in-out infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), linear-gradient(180deg, #020408 0%, #040a12 60%, #020408 100%);
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

.profile-card::before {
  content: '[ STATUS ]';
  position: absolute;
  top: -10px; left: 16px;
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: #00c8ff;
  background: #020408;
  padding: 0 8px;
  text-shadow: 0 0 10px rgba(0,200,255,0.8);
  z-index: 2;
}

.profile-card:hover {
  box-shadow: 0 0 0 1px rgba(0,200,255,0.3), 0 0 40px rgba(0,0,0,0.9);
  border-color: rgba(0,200,255,0.5);
}

.profile-avatar {
  position: relative;
  width: 85px;
  height: 85px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: var(--bg-card-solid);
  border: 1px solid rgba(0,200,255,0.4);
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 20px rgba(0,200,255,0.2), inset 0 0 20px rgba(0,200,255,0.05);
}

.profile-avatar::after {
  display: none;
}

.profile-info { flex: 1; min-width: 0; }

#profile-name {
  font-family: var(--font-display);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #e8f4ff;
  text-shadow: 0 0 8px rgba(0,200,255,0.4);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.profile-rank {
  font-size: 0.6rem;
  color: #00c8ff;
  font-weight: 500;
  margin-bottom: 6px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-shadow: 0 0 10px rgba(0,200,255,0.7);
}

.profile-stats {
  display: flex;
  gap: 30px;
  margin: 10px 0;
}

.stat { display: flex; flex-direction: column; }

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-family: var(--font-display);
  color: #00c8ff;
  text-shadow: 0 0 10px rgba(0,200,255,0.8);
}

.stat-label {
  font-size: 0.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 500;
  font-family: var(--font-display);
}

.xp-bar-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.xp-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,200,255,0.06);
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(0,200,255,0.2);
  box-shadow: none;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #0044aa, #00c8ff);
  border-radius: 0;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  box-shadow: 0 0 10px rgba(0,200,255,0.8), 0 0 20px rgba(0,200,255,0.4);
}
.xp-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: xpShimmer 2s ease-in-out infinite;
}

@keyframes xpShimmer {
  0% { opacity: 0; transform: translateX(-10px); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateX(10px); }
}

.xp-text {
  font-size: 0.55rem;
  color: #00c8ff;
  white-space: nowrap;
  font-weight: 600;
  font-family: var(--font-display);
  text-shadow: 0 0 6px rgba(0,200,255,0.7);
  letter-spacing: 0.1em;
}

/* ============================================================
   TASK LIST
   ============================================================ */
.task-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 700px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(4,10,20,0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 16px 22px;
  box-shadow: none;
  border: 1px solid rgba(0,200,255,0.15);
  transition: all 0.12s ease;
  position: relative;
  text-align: left;
}
.task-item:hover {
  box-shadow: 0 0 15px rgba(0,200,255,0.08);
  border-color: rgba(0,200,255,0.4);
  transform: none;
}
.task-item.completed {
  opacity: 0.5;
  border-color: rgba(0,200,255,0.08);
}
.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-item.penalty {
  border-left: 3px solid var(--accent-red);
}

.task-checkbox {
  width: 30px;
  height: 30px;
  border-radius: 0;
  border: 1px solid rgba(0,200,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  background: transparent;
  font-size: 0.7rem;
  color: transparent;
  font-weight: 700;
}
.task-checkbox:hover {
  border-color: #00c8ff;
  background: var(--accent-blue-soft);
  transform: scale(1.08);
  box-shadow: 0 0 8px rgba(0,200,255,0.6);
}
.task-checkbox.checked {
  background: #00c8ff;
  border-color: #00c8ff;
  color: white;
  box-shadow: 0 0 8px rgba(0,200,255,0.6);
}

.task-text {
  flex: 1;
  font-size: 0.92rem;
  font-weight: 500;
}

.task-points {
  font-size: 0.78rem;
  color: var(--accent-blue-text);
  font-weight: 600;
  white-space: nowrap;
  background: rgba(0,200,255,0.08);
  padding: 4px 12px;
  border-radius: 0;
  font-family: var(--font-mono);
}

.task-delete {
  background: none;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.task-delete:hover {
  background: var(--accent-red-soft);
  color: var(--accent-red);
  border-color: rgba(255, 68, 102, 0.2);
}

.task-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.03);
  padding: 3px 12px;
  border-radius: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.task-item.overdue {
  border-left: 3px solid var(--accent-red);
  background: rgba(255, 68, 102, 0.05);
}
.task-item.overdue .task-date {
  color: var(--accent-red-text);
  background: var(--accent-red-soft);
}

.section-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 700px;
  justify-content: center;
}

/* ============================================================
   GOALS & ACHIEVEMENTS GRIDS
   ============================================================ */
.goals-grid,
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  width: 100%;
}

.goal-card,
.achievement-card {
  background: rgba(4,10,20,0.92);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 22px 24px;
  box-shadow: none;
  border: 1px solid rgba(0,200,255,0.2);
  transition: all 0.15s ease;
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E");
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}
.goal-card:hover,
.achievement-card:hover {
  box-shadow: 0 0 20px rgba(0,200,255,0.2), 0 0 0 1px rgba(0,200,255,0.3);
  transform: none;
  border-color: rgba(0,200,255,0.6);
}
.goal-card.completed {
  border-color: rgba(0,200,255,0.5);
  background: rgba(0,200,255,0.06);
  box-shadow: 0 0 15px rgba(0,200,255,0.15);
}
.achievement-card.unlocked {
  border-color: rgba(0,200,255,0.5);
  background: rgba(0,200,255,0.06);
  box-shadow: 0 0 15px rgba(0,200,255,0.15);
}
.achievement-card:not(.unlocked) {
  border-color: rgba(255,255,255,0.06);
  opacity: 0.5;
  filter: grayscale(0.6);
}

.goal-card h4,
.achievement-card h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.goal-card p,
.achievement-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.goal-meta,
.achievement-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  font-family: var(--font-mono);
}

/* ============================================================
   CHARTS
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  width: 100%;
}

.chart-card {
  background: rgba(4,10,20,0.95);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 24px;
  box-shadow: none;
  border: 1px solid rgba(0,200,255,0.2);
  position: relative;
}
.chart-card:hover {
  border-color: rgba(0,200,255,0.4);
}
.chart-card canvas { width: 100% !important; max-height: 320px; }

.chart-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: rgba(2,6,14,0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(0,200,255,0.15), 0 0 60px rgba(0,200,255,0.1), 0 0 100px rgba(0,0,0,0.95);
  border: 1px solid rgba(0,200,255,0.45);
  animation: slideUp 0.35s var(--transition);
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%2300c8ff' stroke-width='2'/%3E%3C/svg%3E");
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

.modal-card::before {
  display: none;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 30px 0;
  border-bottom: 1px solid rgba(0,200,255,0.2);
  padding-bottom: 12px;
}

#modal-title {
  font-size: 0.9rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #e8f4ff;
  text-shadow: 0 0 8px rgba(0,200,255,0.4);
  font-weight: 700;
  line-height: 1.25;
}

.modal-body { padding: 20px 30px; }

.modal-footer {
  padding: 0 30px 26px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 1px solid rgba(0,200,255,0.1);
  padding-top: 12px;
}

/* ============================================================
   WELCOME MODAL (Notification panel style)
   ============================================================ */
#welcome-modal .modal-card {
  text-align: center;
  max-width: 380px;
  border: 2px solid rgba(0,200,255,0.6);
  box-shadow: 0 0 0 1px rgba(0,200,255,0.2), 0 0 60px rgba(0,200,255,0.2);
}
#welcome-modal .modal-header {
  flex-direction: column;
  gap: 14px;
  padding-top: 36px;
  border-bottom: none;
}
#welcome-modal .modal-header::before {
  content: '◈ SYSTEM NOTIFICATION ◈';
  display: block;
  font-family: var(--font-display);
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  color: #00c8ff;
  text-shadow: 0 0 10px rgba(0,200,255,0.8);
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0,200,255,0.2);
}

#welcome-title {
  font-family: var(--font-display);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(0,200,255,0.7);
  color: #00c8ff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}
#welcome-modal .avatar-placeholder.large {
  font-size: 3.6rem;
  width: 96px;
  height: 96px;
  border-radius: 0;
  background: var(--accent-blue-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(0,200,255,0.5);
  box-shadow: 0 0 20px rgba(0,200,255,0.3);
}
#welcome-modal h2 {
  font-size: 1.5rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#user-name-input {
  border-radius: 0;
  border: 1px solid rgba(0,200,255,0.3);
  background: rgba(0,200,255,0.04);
  color: #e8f4ff;
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  caret-color: #00c8ff;
  width: 100%;
  padding: 12px 18px;
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}
#user-name-input:focus {
  border-color: #00c8ff;
  box-shadow: 0 0 15px rgba(0,200,255,0.25), 0 0 0 0;
  outline: none;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.form-input,
.form-select {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid var(--border-medium);
  border-radius: 0;
  font-family: var(--font);
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 15px rgba(0,200,255,0.25), 0 0 0 0;
  background: rgba(2, 6, 14, 0.9);
}

/* ============================================================
   TOAST
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(2,6,14,0.98);
  color: var(--toast-text);
  padding: 14px 24px;
  border-radius: 0;
  box-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 10px rgba(0,200,255,0.1);
  border: 1px solid rgba(0,200,255,0.3);
  border-left: 3px solid #00c8ff;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  animation: toastIn 0.35s var(--transition), toastOut 0.3s ease 2.7s forwards;
  min-width: 260px;
  max-width: 420px;
}

.toast.success { border-left-color: #00ff88; }
.toast.error { border-left-color: #ff3050; }
.toast.warning { border-left-color: #ffaa00; }
.toast.info { border-left-color: #00c8ff; }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px); }
}

.toast.loot {
  border-left-color: var(--accent-gold);
  background: linear-gradient(135deg, #020a14, rgba(255, 170, 0, 0.08));
  box-shadow: 0 0 20px rgba(0,0,0,0.8), 0 0 24px rgba(255, 170, 0, 0.12);
  animation: toastIn 0.35s var(--transition), toastOut 0.3s ease 3.7s forwards;
}
.toast.loot .icon {
  color: var(--accent-gold);
  filter: drop-shadow(0 0 6px rgba(255, 170, 0, 0.4));
}

/* ============================================================
   QUOTE BAR
   ============================================================ */
.quote-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  background: rgba(2,4,8,0.98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid rgba(0,200,255,0.2);
  transition: all var(--transition);
  z-index: 40;
  box-shadow: 0 -5px 30px rgba(0,0,0,0.5);
}

.quote-content {
  flex: 1;
  text-align: center;
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.quote-ar {
  font-size: 0.85rem;
  font-weight: 600;
  color: #00c8ff;
  line-height: 1.45;
  direction: rtl;
  font-family: 'Rajdhani', sans-serif;
  text-shadow: 0 0 8px rgba(0,200,255,0.4);
}

.quote-en {
  font-size: 0.6rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  line-height: 1.35;
}

.quote-nav {
  background: none;
  border: 1px solid rgba(0,200,255,0.2);
  color: rgba(0,200,255,0.5);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 0;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.quote-nav:hover {
  border-color: rgba(0,200,255,0.6);
  color: #00c8ff;
  box-shadow: 0 0 10px rgba(0,200,255,0.2);
  background: transparent;
}

/* ============================================================
   GLOW & UTILITY ANIMATIONS
   ============================================================ */
.level-up-flash {
  animation: flashGlow 0.6s ease;
}
@keyframes flashGlow {
  0%, 100% { box-shadow: var(--rank-glow); }
  50% { box-shadow: 0 0 40px rgba(0,200,255,0.3), 0 0 80px rgba(0,200,255,0.15); }
}

.icon {
  color: var(--accent-blue);
  filter: drop-shadow(0 0 4px rgba(0,200,255,0.25));
}

.btn-icon .icon {
  font-size: 1.2rem;
}

.nav-btn .icon {
  width: 1.1em;
  text-align: center;
  font-size: 0.9rem;
}

.section-header h2 .icon {
  margin-right: 6px;
}

[dir="rtl"] .section-header h2 .icon {
  margin-right: 0;
  margin-left: 6px;
}

.task-checkbox .fa-check {
  color: white;
  filter: none;
}

.task-delete .icon {
  font-size: 0.85rem;
}

.btn-danger .icon,
.btn-success .icon,
.btn-primary .icon {
  color: white;
  filter: none;
}

.quote-nav .icon {
  font-size: 0.7rem;
}

/* ============================================================
   INVENTORY SYSTEM
   ============================================================ */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
}

.inventory-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: rgba(0,200,255,0.04);
  border: 1px solid rgba(0,200,255,0.25);
  border-radius: 0;
  padding: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
  overflow: visible;
}

.inventory-slot::before {
  display: none;
}

.inventory-slot:hover {
  border-color: #00c8ff;
  background: rgba(0,200,255,0.1);
  box-shadow: 0 0 15px rgba(0,200,255,0.3), inset 0 0 10px rgba(0,200,255,0.05);
  transform: none;
}

.inventory-slot[data-tier="common"] { border-color: rgba(90, 106, 122, 0.5); }
.inventory-slot[data-tier="common"]:hover { border-color: #5a6a7a; box-shadow: 0 0 12px rgba(90, 106, 122, 0.2); }

.inventory-slot[data-tier="uncommon"] { border-color: rgba(26, 171, 250, 0.5); }
.inventory-slot[data-tier="uncommon"]:hover { border-color: #1aabfa; box-shadow: 0 0 12px rgba(26, 171, 250, 0.25); }

.inventory-slot[data-tier="rare"] { border-color: rgba(136, 102, 255, 0.5); }
.inventory-slot[data-tier="rare"]:hover { border-color: #8866ff; box-shadow: 0 0 14px rgba(136, 102, 255, 0.3); }

.inventory-slot[data-tier="epic"] { border-color: rgba(255, 170, 0, 0.5); }
.inventory-slot[data-tier="epic"]:hover { border-color: #ffaa00; box-shadow: 0 0 18px rgba(255, 170, 0, 0.3); }

.inventory-slot[data-tier="legendary"] { border-color: rgba(255, 68, 102, 0.5); animation: borderGlowPulse 2s infinite; }
.inventory-slot[data-tier="legendary"]:hover { border-color: #ff4466; box-shadow: 0 0 24px rgba(255, 68, 102, 0.35); }

.inventory-slot[data-tier="special"] { border-color: rgba(0,200,255,0.6); animation: borderGlowPulse 1.5s infinite; }
.inventory-slot[data-tier="special"]:hover { border-color: #00c8ff; box-shadow: 0 0 24px rgba(0,200,255,0.35); }

.inv-icon {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 2px;
  filter: drop-shadow(0 0 4px rgba(0,200,255,0.2));
}

.inv-name {
  font-size: 0.55rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.inv-level {
  font-size: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.inv-qty-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: #00c8ff;
  color: #000;
  border-radius: 0;
  line-height: 1;
  z-index: 2;
  box-shadow: none;
}

/* ============================================================
   INVENTORY TOOLTIP
   ============================================================ */
.inv-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(2, 4, 8, 0.96);
  border: 1px solid var(--accent-blue);
  border-radius: 0;
  padding: 12px 16px;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
  backdrop-filter: none;
  box-shadow: 0 0 24px rgba(0,200,255,0.2);
  text-align: left;
}
.inventory-slot:hover .inv-tooltip {
  opacity: 1;
  pointer-events: auto;
}

.tooltip-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tooltip-level {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.tooltip-tier {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.tooltip-tier[data-rarity="common"] { color: #5a6a7a; }
.tooltip-tier[data-rarity="uncommon"] { color: #1aabfa; }
.tooltip-tier[data-rarity="rare"] { color: #8866ff; }
.tooltip-tier[data-rarity="epic"] { color: #ffaa00; }
.tooltip-tier[data-rarity="legendary"] { color: #ff4466; text-shadow: 0 0 8px rgba(255, 68, 102, 0.5); }
.tooltip-tier[data-rarity="special"] { color: #00c8ff; text-shadow: 0 0 8px rgba(0,200,255,0.5); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }

  .top-nav {
    flex-wrap: nowrap;
    padding: 6px 12px;
    min-height: 50px;
  }

  .top-nav-tabs {
    display: none;
  }

  .nav-btn {
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .nav-btn.active::after {
    display: none;
  }

  .top-nav-left,
  .top-nav-right {
    flex: 0 0 auto;
  }

  .content {
    margin-top: 108px;
    padding: 16px 14px 85px;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  .profile-stats { justify-content: center; }
  .xp-bar-container { flex-direction: column; align-items: stretch; }

  .goals-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }

  .task-list { max-width: 100%; }
  .section-actions { flex-direction: column; align-items: center; }
  .section-actions .btn { width: 100%; max-width: 300px; }
  .warning-banner { max-width: 100%; }
  .profile-card { max-width: 100%; }

  .quote-bar { padding: 8px 12px; }
  .quote-ar { font-size: 0.75rem; }
  .quote-en { font-size: 0.65rem; }
  #toast-container {
    bottom: 80px;
    right: 12px;
    left: 12px;
  }
  .toast { min-width: unset; max-width: unset; }
}

@media (max-width: 480px) {
  .top-nav { padding: 4px 8px; }
  .app-title { font-size: 0.82rem; }
  .btn-icon { width: 38px; height: 38px; }
  .content { margin-top: 100px; }
  .modal-card { border-radius: 0; }
  .modal-body, .modal-header, .modal-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
  .profile-avatar { width: 68px; height: 68px; font-size: 1.8rem; }
  .profile-card { padding: 16px; }
  .stat-value { font-size: 1.2rem; }

  .raids-grid { grid-template-columns: 1fr; }
  .raid-card-header { flex-wrap: wrap; }
  .raid-rank-badge { margin-left: 0; }
  .gate-modal-card { margin: 10px; }
}

/* ============================================================
   RAIDS SYSTEM
   ============================================================ */
#tab-raids.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.raids-subsection {
  width: 100%;
  max-width: 900px;
  margin-bottom: 24px;
}

.raids-subtitle {
  width: 100%;
  text-align: left;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.raids-subtitle.timed { color: var(--accent-red-text); }
.raids-subtitle.permanent { color: var(--accent-blue-text); }

.raids-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
}

.raid-card {
  position: relative;
  background: rgba(4,10,20,0.92);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  padding: 20px 22px;
  box-shadow: none;
  border: 1px solid rgba(0,200,255,0.2);
  transition: all 0.15s ease;
  text-align: left;
  overflow: hidden;
}

.raid-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-blue);
  opacity: 0.5;
}

.raid-card:hover {
  transform: none;
  border-color: rgba(0,200,255,0.6);
  box-shadow: 0 0 20px rgba(0,200,255,0.2), 0 0 0 1px rgba(0,200,255,0.3);
}

.raid-card[data-rank="E"] { border-color: #00c8ff; box-shadow: 0 0 12px rgba(0,200,255,0.15); }
.raid-card[data-rank="E"]::before { background: #00c8ff; box-shadow: 0 0 10px #00c8ff; }

.raid-card[data-rank="D"] { border-color: #4a9aff; box-shadow: 0 0 12px rgba(74, 154, 255, 0.15); }
.raid-card[data-rank="D"]::before { background: #4a9aff; box-shadow: 0 0 10px #4a9aff; }

.raid-card[data-rank="C"] { border-color: #66ddaa; box-shadow: 0 0 12px rgba(102, 221, 170, 0.15); }
.raid-card[data-rank="C"]::before { background: #66ddaa; box-shadow: 0 0 10px #66ddaa; }

.raid-card[data-rank="B"] { border-color: #aa66ff; box-shadow: 0 0 12px rgba(170, 102, 255, 0.15); }
.raid-card[data-rank="B"]::before { background: #aa66ff; box-shadow: 0 0 10px #aa66ff; }

.raid-card[data-rank="A"] { border-color: #ff8844; box-shadow: 0 0 12px rgba(255, 136, 68, 0.15); }
.raid-card[data-rank="A"]::before { background: #ff8844; box-shadow: 0 0 10px #ff8844; }

.raid-card[data-rank="S"] { border-color: #ff4466; box-shadow: 0 0 16px rgba(255, 68, 102, 0.2); animation: raidPulse 2s infinite; }
.raid-card[data-rank="S"]::before { background: #ff4466; box-shadow: 0 0 15px #ff4466; }

.raid-card[data-rank="SS"] { border-color: #ffaa00; box-shadow: 0 0 16px rgba(255, 170, 0, 0.2); animation: raidPulse 1.5s infinite; }
.raid-card[data-rank="SS"]::before { background: #ffaa00; box-shadow: 0 0 15px #ffaa00; }

@keyframes raidPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 68, 102, 0.15); }
  50% { box-shadow: 0 0 24px rgba(255, 68, 102, 0.3); }
}

.raid-card.completed {
  opacity: 0.5;
  filter: grayscale(0.4);
  pointer-events: none;
}
.raid-card.completed::before {
  background: #5a6a7a !important;
  box-shadow: none !important;
}

.raid-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.raid-icon {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
}

.raid-name {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.raid-rank-badge {
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 10px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-left: auto;
  border: 1px solid currentColor;
  opacity: 0.8;
}

.raid-task-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
  padding-left: 4px;
}

.raid-rewards {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
}

.raid-reward-points { color: var(--accent-blue-text); font-weight: 600; }
.raid-reward-xp { color: var(--accent-purple-text); font-weight: 600; }
.raid-reward-loot { color: var(--accent-gold); font-weight: 600; }

.raid-completed-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--accent-blue-text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.raid-card.timed-urgent {
  border-color: var(--accent-red) !important;
  animation: raidPulse 1s infinite !important;
  background: rgba(255, 68, 102, 0.04);
}

/* ============================================================
   GATE MODAL (Urgent Raid Notification)
   ============================================================ */
#gate-modal .gate-modal-card {
  background: rgba(2,4,8,0.99);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 0 1px rgba(255,180,0,0.2), 0 0 60px rgba(255,100,0,0.15), 0 0 100px rgba(0,0,0,0.95);
  border: 2px solid rgba(255,180,0,0.6);
  animation: gateSlideIn 0.5s var(--transition);
  position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%23ffaa00' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%23ffaa00' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0,14 L0,0 L14,0' fill='none' stroke='%23ffaa00' stroke-width='2'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M14,0 L14,14 L0,14' fill='none' stroke='%23ffaa00' stroke-width='2'/%3E%3C/svg%3E");
  background-position: top left, top right, bottom left, bottom right;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}

#gate-modal .gate-modal-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,200,255,0.4), transparent);
  animation: scanSweep 3s linear infinite;
  pointer-events: none;
  z-index: 10;
  top: auto;
  bottom: auto;
}

@keyframes gateSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-modal-header {
  text-align: center;
  padding: 32px 30px 0;
  border-bottom: 1px solid rgba(255,180,0,0.2);
  padding-bottom: 12px;
}

.gate-warning-pulse {
  font-size: 2rem;
  margin-bottom: 10px;
  animation: warnEmoji 1s ease-in-out infinite;
}

@keyframes warnEmoji {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(255,150,0,0.5)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 15px rgba(255,150,0,1)); }
}

.gate-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.2rem;
  letter-spacing: 0.25em;
  color: #ffaa00;
  text-shadow: 0 0 15px rgba(255,150,0,0.8), 0 0 30px rgba(255,100,0,0.4);
  animation: warningPulse 1.5s ease-in-out infinite;
  margin-bottom: 4px;
  -webkit-text-fill-color: unset;
  background: none;
}

@keyframes warningPulse {
  0%, 100% { text-shadow: 0 0 10px rgba(255,150,0,0.6); }
  50% { text-shadow: 0 0 25px rgba(255,150,0,1), 0 0 50px rgba(255,100,0,0.5); }
}

.gate-modal-body {
  padding: 20px 30px;
  text-align: center;
}

.gate-rank-display {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: #ffaa00;
  text-shadow: 0 0 15px rgba(255,150,0,0.8);
  border: 1px solid rgba(255,180,0,0.4);
  padding: 8px 20px;
  text-align: center;
  background: rgba(255,150,0,0.06);
}

.gate-description {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.gate-details {
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  padding: 10px;
  background: rgba(0,200,255,0.05);
  border-radius: 0;
  border: 1px solid var(--border-light);
}

.gate-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.2);
  border-radius: 0;
  margin-bottom: 4px;
}

.gate-timer-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.gate-timer-value {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #ff4040;
  text-shadow: 0 0 15px rgba(255,50,50,0.8);
  letter-spacing: 0.1em;
  min-width: 80px;
  text-align: center;
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { text-shadow: 0 0 10px rgba(255,50,50,0.6); }
  50% { text-shadow: 0 0 25px rgba(255,50,50,1); }
}

.gate-timer-value.urgent {
  animation: timerBlink 0.5s infinite;
}

@keyframes timerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.gate-modal-footer {
  padding: 0 30px 26px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

#gate-accept-btn {
  background: rgba(255,50,80,0.12);
  color: #ff3050;
  border-color: rgba(255,50,80,0.5);
  box-shadow: 0 0 16px rgba(255,50,80,0.25);
  font-weight: 700;
  padding: 12px 30px;
  font-size: 0.85rem;
  border-radius: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
#gate-accept-btn:hover {
  border-color: #ff3050;
  box-shadow: 0 0 24px rgba(255,50,80,0.4);
  background: rgba(255,50,80,0.22);
  transform: none;
}

#gate-decline-btn {
  border-radius: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
}
#gate-decline-btn:hover {
  background: rgba(255, 68, 102, 0.1);
  border-color: rgba(255, 68, 102, 0.3);
  color: var(--accent-red-text);
}

/* ============================================================
   HABITS SYSTEM
   ============================================================ */
#tab-habits.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.habits-form-card {
  width: 100%;
  max-width: 700px;
  background: rgba(4,10,20,0.92);
  backdrop-filter: none;
  border-radius: 0;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(0,200,255,0.2);
  box-shadow: none;
}

.habits-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.habits-form-row .form-input {
  flex: 1;
  min-width: 120px;
}

.habit-points-input {
  max-width: 90px;
  text-align: center;
}

.habits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 700px;
}

.habit-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(4,10,20,0.92);
  backdrop-filter: none;
  border-radius: 0;
  padding: 14px 20px;
  box-shadow: none;
  border: 1px solid rgba(0,200,255,0.2);
  transition: all 0.15s ease;
  text-align: left;
  position: relative;
}

.habit-card:hover {
  box-shadow: 0 0 20px rgba(0,200,255,0.2), 0 0 0 1px rgba(0,200,255,0.3);
  border-color: rgba(0,200,255,0.6);
  transform: none;
}

.habit-card.completed {
  opacity: 0.5;
  border-color: rgba(0,200,255,0.08);
}

.habit-card.completed .habit-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.habit-info {
  flex: 1;
  min-width: 0;
}

.habit-name {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.habit-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.habit-points {
  font-size: 0.78rem;
  color: var(--accent-blue-text);
  font-weight: 600;
  white-space: nowrap;
  background: rgba(0,200,255,0.08);
  padding: 4px 12px;
  border-radius: 0;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.habit-complete-btn,
.habit-delete-btn {
  flex-shrink: 0;
}

/* ============================================================
   WEEKLY SCHEDULE
   ============================================================ */
#tab-schedule.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
}

@media (min-width: 769px) {
  .schedule-grid {
    width: calc(100vw - 200px);
    max-width: 1440px;
  }
}

.schedule-day-col {
  background: rgba(4,10,20,0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  border: 1px solid rgba(0,200,255,0.15);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  min-width: 0;
  overflow: hidden;
  transition: all var(--transition-fast);
}
.schedule-day-col::-webkit-scrollbar { width: 3px; }
.schedule-day-col::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 0; }
.schedule-day-col.today {
  border-color: rgba(0,200,255,0.5);
  box-shadow: 0 0 15px rgba(0,200,255,0.1);
  background: rgba(0,200,255,0.04);
}

.schedule-day-header {
  text-align: center;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(0,200,255,0.1);
  margin-bottom: 4px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(4,10,20,0.9);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.6rem;
}
.schedule-day-header.active-day {
  background: var(--accent-blue-soft);
  border-radius: 0;
  border-bottom-color: var(--accent-blue);
}

.schedule-day-name {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-display);
  color: var(--text-secondary);
}
.schedule-day-header.active-day .schedule-day-name {
  color: var(--accent-blue);
}

.schedule-day-habits {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.schedule-habit {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 5px;
  border-radius: 0;
  background: rgba(0,200,255,0.03);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}
.schedule-habit:hover {
  border-color: var(--border-light);
}
.schedule-habit.completed {
  opacity: 0.45;
}
.schedule-habit.completed .schedule-habit-text {
  text-decoration: line-through;
  color: var(--text-muted);
}
.schedule-habit.disabled {
  opacity: 0.35;
}

.schedule-check-btn {
  width: 18px;
  height: 18px;
  border-radius: 0;
  border: 1.5px solid rgba(0,200,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  background: transparent;
  font-size: 0.45rem;
  color: transparent;
  font-weight: 700;
}
.schedule-check-btn:hover:not([disabled]):not(.locked) {
  border-color: var(--accent-blue);
  background: var(--accent-blue-soft);
}
.schedule-check-btn.checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}
.schedule-check-btn.locked,
.schedule-check-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.3;
}

.schedule-habit-text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 0.6rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.schedule-habit-points {
  font-size: 0.5rem;
  color: var(--accent-blue-text);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--font-mono);
  padding: 1px 4px;
  background: rgba(0,200,255,0.08);
  border-radius: 0;
}

.schedule-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.6rem;
  padding: 2px;
  border-radius: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.schedule-delete-btn:hover {
  background: var(--accent-red-soft);
  color: var(--accent-red);
}

.schedule-add-habit-btn {
  width: 100%;
  margin-top: auto;
  font-size: 0.6rem !important;
  padding: 4px 8px !important;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes borderGlowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0,200,255,0.2), 0 0 0 1px rgba(0,200,255,0.2); }
  50% { box-shadow: 0 0 20px rgba(0,200,255,0.4), 0 0 0 1px rgba(0,200,255,0.4); }
}

@keyframes scanSweep {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@media (max-width: 768px) {
  .schedule-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .schedule-day-col {
    max-height: 260px;
    overflow-y: auto;
    min-height: 100px;
  }
  .schedule-day-col::-webkit-scrollbar { width: 3px; }
  .schedule-day-col::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 0; }
  .schedule-day-header { padding: 4px 2px; }
  .schedule-day-name { font-size: 0.65rem; }
  .schedule-habit { padding: 3px 4px; gap: 2px; }
  .schedule-habit-text { font-size: 0.55rem; }
  .schedule-habit-points { font-size: 0.45rem; padding: 1px 3px; }
  .schedule-check-btn { width: 16px; height: 16px; }
}
