/* متغیرهای تم - دارک مود پیش‌فرض */
:root, [data-theme="dark"] {
  --bg-base: #030303;
  --bg-color: #0f172a;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-main: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --text-color: #ffffff;
  --accent-color: #3b82f6;
  --border-color: rgba(255, 255, 255, 0.1);
}

/* لایت مود */
[data-theme="light"] {
  --bg-base: #f1f1f1;
  --bg-color: #818181;
  --card-bg: rgba(0, 0, 0, 0.04);
  --text-main: #1e293b;
  --text-dim: #64748b;
  --text-muted: #94a3b8;
  --text-color: #1e293b;
  --border-color: rgba(0, 0, 0, 0.548);
}

[data-theme="light"] body {
  background-color: var(--bg-base);
  background-image: 
    radial-gradient(at 0% 0%, rgba(148, 163, 184, 0.15) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(100, 116, 139, 0.1) 0px, transparent 50%);
}

[data-theme="light"] body::before {
  backdrop-filter: blur(60px);
  background: rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .blob {
  opacity: 0.15;
}

[data-theme="light"] .blob-1 { background: #cbd5e1; }
[data-theme="light"] .blob-2 { background: #e2e8f0; }
[data-theme="light"] .blob-3 { background: #f1f5f9; }
[data-theme="light"] .sidebar,
[data-theme="light"] .sidebar .sidebar-title,
[data-theme="light"] .sidebar .sidebar-nav h3,
[data-theme="light"] .sidebar-link { color: var(--text-main); }
[data-theme="light"] #content { color: var(--text-main); }
[data-theme="light"] .live-status-bar,
[data-theme="light"] .live-version-bar { color: var(--text-dim); }
[data-theme="light"] .setting-item { border-color: var(--border-color); }

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', 'Vazirmatn', system-ui, -apple-system, sans-serif;
  text-decoration: none;
  list-style-type: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-base, #030303);
  color: var(--text-main);
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background-image: 
    radial-gradient(at 0% 0%, rgba(20, 30, 48, 0.4) 0px, transparent 50%),
    radial-gradient(at 50% 0%, rgba(10, 20, 40, 0.3) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(30, 10, 50, 0.2) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(15, 15, 25, 0.4) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(20, 20, 35, 0.3) 0px, transparent 50%);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ------------------ PreLoader-------------------- */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  transition: opacity 0.2s ease;
}

.loader-glass {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.wifi-icon span {
  display: block;
  border: 3px solid #3b82f6;
  border-radius: 50%;
  border-color: #3b82f6 transparent transparent transparent;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 1.5s infinite;
}

.wifi-icon span:nth-child(1) { width: 40px; height: 40px; animation-delay: 0s; }
.wifi-icon span:nth-child(2) { width: 25px; height: 25px; animation-delay: 0.2s; }
.wifi-icon span:nth-child(3) { width: 10px; height: 10px; background: #3b82f6; border-color: #3b82f6; animation-delay: 0.4s; }

@keyframes pulse {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

#preloader p {
  margin-top: 20px;
  color: white;
  font-family: sans-serif;
  letter-spacing: 2px;
  opacity: 0.6;
}

/* -------------------- Glass Effect ----------------- */
.glass {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) padding-box;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    z-index: 0;
    text-align: left;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px; 
    background: linear-gradient(180deg, rgba(255,255,255,0.45), rgba(255,255,255,0.08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude; 
    pointer-events: none;
}

.glass::before {
    content: "";
    position: absolute;
    inset: -2px; 
    border-radius: inherit;
    background:
        radial-gradient(260px 200px at var(--mx, -100px) var(--my, -100px), rgba(255,255,255,0.40), rgba(255,255,255,0.10) 40%, rgba(255,255,255,0.0) 65%),
        conic-gradient(from 180deg at 50% 50%, rgba(255,255,255,0.10), rgba(255,255,255,0) 25%, rgba(255,255,255,0) 75%, rgba(255,255,255,0.10));
    filter: blur(18px) saturate(150%);
    opacity: .85;
    transition: opacity .25s ease;
    pointer-events: none;
}
    
/* ---------------------- Sidebar Menu --------------- */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    border-radius:0px 8px 0px 0px;
    box-shadow: 0 0 40px rgba(27, 27, 27, 0.8);
    transform: translateX(-80%);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 0px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    width: 100%;
    height: 100px;
    gap: 8px;
    display: flex;
    align-items: center;
    padding: 15px 0px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.452);
        
  }

  .sidebar-header img{
    width: 65px;
    height: 65px;
    margin-left: 0px;
  }
  
  .sidebar-title {
    font-size: 1.5rem;
  
    color: #f5f5f5;
    font-weight: 700;
    text-shadow: 0 0 10PX #7e7e7e,
    0 0 20PX #1e1b4b ;
  }    

  .toggle-btn {
    margin-left: 105px;
    z-index: 1100;
    color: #f5f5f5;
    border: 0;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .toggle-btn:hover {
    background: #1b1f2b;
    transform: translateY(-1px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  }

  .sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.062);
    padding: 30px 0;
  }

  .sidebar-nav h3 {
    font-size: 1rem;
    color: rgba(250, 250, 250, 0.986);
    margin-bottom: 8px;
    padding-left: 10px;
    text-transform: uppercase;
  }
  
  .sidebar-nav li {
    position: relative;
  }
  
  .sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 10px;
    color: rgba(245, 245, 245, 0.85);
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.2s ease, transform 0.15s ease,
    border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  }
  
  .sidebar-link span.label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
  }

  .badge {
    font-size: 0.7rem;
    width: 30px;
    height: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    color: #ffffff;
    border: 1px solid var(--accent-color);
  }

  .sidebar-link:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) padding-box;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(243, 243, 243, 0.4);
  }

  .sidebar-link.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)) padding-box;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(243, 243, 243, 0.4);
  }

  .sidebar-link .close-bar {
    font-size: 18px;
  }

   /* ---------------- Mobile Button Sidebar Menu -----------------  */
  .mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 16px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease;
  }
  .mobile-menu-btn:hover {
    transform: scale(1.05);
  }
    
 /* -------------------- Live Status Bar ----------------------- */
  
  .live-status-bar {
    position: fixed;
    top: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 999;
    font-family: 'Outfit', 'Vazirmatn', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
  }

  .status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981; 
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: blink 2s infinite;
    margin: 0 5px;
  }

  .separator {
    width: 1px;
    height: 15px;
    background: rgba(255, 255, 255, 0.2);
  }

  /*---------------------- Version Bar ---------------------- */
  
  .version-bar {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 999;
    font-family: 'Outfit', 'Vazirmatn', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
  }
  
  .version-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #b91010; 
    border-radius: 50%;
    box-shadow: 0 0 10px #b91010;
    animation: blink 2s infinite;
    margin: 0 5px;
  }
  
  /* ---------------- 3 Blobs For Background ----------------- */
  .blobe {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -2;
    opacity: 0.25;
    animation: moveBlobs 25s infinite alternate;
  }

  .blobe-1 { background: #1a2a44; top: -100px; right: 300px; }
  .blobe-2 { background: #0f172a; bottom: -150px; right: -50px; animation-delay: -5s; }
  .blobe-3 { background: #1e1b4b; top: 40%; left: 30%; animation-duration: 30s; }

  @keyframes moveBlobs {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(100px, 50px) scale(1.1); }
    100% { transform: translate(-50px, 150px) scale(0.9); }
  }

  /* --------------------- Curser -------------------- */
  html, body {
    cursor: none !important;
  }

  .cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #fff;
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none; 
    z-index: 9999;
  }

  .cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s, border-color 0.3s;
  }

  .cursor-active {
    width: 60px;
    height: 60px;
    border-color: #3b82f6; 
    background-color: rgba(59, 130, 246, 0.1);
  }

  a, button, .clickable {
    cursor: none;
  }
  
  /* ----------------------- Render Pages ----------------------- */
  
  #content {
    display: flex;
    justify-content: center;
    transition: opacity 0.25s ease;
    align-items: center;
    flex-direction: column;
    color: white;
    width: 100% ;
    transition: margin-left 0.35s cubic-bezier(0.22,0.61,0.36,1);
    font-size: 20px;
  }

  .content-shift {
    margin-left: 280px;
  }

  @media (min-width: 900px) {
    .content {
      padding: 60px 60px;
    }
  }
  
  @keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
  }


/* ---------------------- Responsive ------------------- */

/* ----------- Mobaile & Tablet -------- */
@media (max-width: 1024px) {
  .mobile-menu-btn {
    display: flex;
  }
  .content-shift,
  .content-unshift {
    margin-left: 0;
  }
  .sidebar {
    width: 280px;
    max-width: 85vw;
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5);
  }
  .sidebar {
    z-index: 2000;
  }
  .live-status-bar {
    top: 12px;
    padding: 8px 14px;
    font-size: 11px;
    gap: 10px;
    max-width: calc(100vw - 100px);
  }
  .live-status-bar .divider {
    height: 12px;
  }
  .live-status-bar .status-item {
    white-space: nowrap;
  }
  .live-status-bar .status-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
  }
  .live-version-bar {
    bottom: 16px;
    padding: 8px 14px;
    font-size: 10px;
  }
  #content {
    font-size: 16px;
    padding: 0 16px;
  }
}

/* ------------ Mobile -------------*/
@media (max-width: 768px) {
  .toggle-btn {
    margin-left: 0;
  }
  .sidebar-header {
    height: 80px;
    padding: 12px 0;
  }
  .sidebar-header img {
    width: 50px;
    height: 50px;
  }
  .sidebar-title {
    font-size: 0.95rem;
  }
  .sidebar-nav {
    padding: 20px 0;
  }
  .sidebar-nav h3 {
    font-size: 0.85rem;
  }
  .sidebar-link {
    padding: 10px 8px;
    font-size: 0.85rem;
  }
  .sidebar-link span.label {
    font-size: 14px;
  }
  .live-status-bar {
    flex-wrap: nowrap;
    padding: 8px 12px;
    font-size: 10px;
    gap: 8px;
    max-width: calc(100vw - 90px);
  }
  .live-status-bar .status-item:nth-child(5) {
    display: none; 
  }
  .live-status-bar .status-item span {
    max-width: 60px;
  }
  .live-status-bar .divider {
    height: 10px;
  }
  .counter-card {
    padding: 20px 30px;
    min-width: 140px;
  }
  .counter {
    font-size: 2.2rem;
  }

  html, body {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }
  a, button, .clickable {
    cursor: pointer;
  }
}

@media (max-width: 480px) {
  .live-status-bar {
    padding: 6px 10px;
    font-size: 9px;
    gap: 6px;
  }
  .live-status-bar .status-item span {
    max-width: 50px;
  }
  .status-dot, .version-dot {
    width: 6px;
    height: 6px;
  }
  .live-version-bar {
    padding: 6px 10px;
    font-size: 9px;
  }
  .counter-container {
    gap: 16px;
  }
  .counter-card {
    min-width: 100%;
  }
}


