:root {
  --bg-main: #000000;
  --bg-glass: rgba(255, 255, 255, 0.05);
  --bg-glass-card: rgba(22, 27, 38, 0.65);
  --bg-glass-btn: rgba(255, 255, 255, 0.08);
  --bg-glass-btn-hover: rgba(255, 255, 255, 0.16);
  --border-glass: rgba(255, 255, 255, 0.14);
  --border-glass-highlight: rgba(255, 255, 255, 0.28);
  --border-glass-card: rgba(255, 255, 255, 0.10);
  
  --ios-blue: #007aff;
  --ios-blue-glass: rgba(0, 122, 255, 0.85);
  --ios-blue-glow: rgba(0, 122, 255, 0.4);
  --ios-cyan: #30d158;
  --ios-purple: #af52de;
  --ios-orange: #ff9500;
  --ios-red: #ff3b30;
  --ios-teal: #5ac8fa;
  
  --text-primary: #ffffff;
  --text-secondary: rgba(235, 235, 245, 0.65);
  --text-tertiary: rgba(235, 235, 245, 0.40);
  
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Vazirmatn", "Segoe UI", Roboto, sans-serif;
  --radius-ios-pill: 9999px;
  --radius-ios-card: 26px;
  --radius-ios-btn: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
  position: relative;
}

/* Ambient iOS Gradient Orbs in Background */
body::before, body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

body::before {
  width: 500px;
  height: 500px;
  top: -100px;
  right: -50px;
  background: radial-gradient(circle, #007aff 0%, #5856d6 100%);
}

body::after {
  width: 450px;
  height: 450px;
  bottom: 50px;
  left: -50px;
  background: radial-gradient(circle, #af52de 0%, #ff2d55 100%);
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header - Frosted Glass Nav */
header {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-glass-card);
  backdrop-filter: blur(25px) saturate(190%);
  -webkit-backdrop-filter: blur(25px) saturate(190%);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.75);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.9), rgba(90, 200, 250, 0.9));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 8px 24px var(--ios-blue-glow);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.brand-badge {
  font-size: 11px;
  background: rgba(48, 209, 88, 0.16);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.35);
  padding: 3px 10px;
  border-radius: var(--radius-ios-pill);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* iOS Glass Buttons */
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-ios-pill);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.btn-nav:active {
  transform: scale(0.96);
}

.btn-tg {
  background: linear-gradient(180deg, rgba(34, 158, 217, 0.85) 0%, rgba(20, 120, 175, 0.95) 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(34, 158, 217, 0.4);
}
.btn-tg:hover {
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 8px 26px rgba(34, 158, 217, 0.6);
  transform: translateY(-1px);
}

.btn-github {
  background: var(--bg-glass-btn);
  color: var(--text-primary);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}
.btn-github:hover {
  background: var(--bg-glass-btn-hover);
  border-color: var(--border-glass-highlight);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 60px 0 35px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #5ac8fa;
  padding: 6px 18px;
  border-radius: var(--radius-ios-pill);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 18px;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  font-weight: 400;
}

/* Stats Widgets (iOS Control Center Style) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 45px;
}

.stat-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass-card);
  border-radius: 22px;
  padding: 22px 18px;
  text-align: center;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glass-highlight);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 20px 40px rgba(0, 122, 255, 0.15);
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Section Title */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.3px;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  background: linear-gradient(180deg, var(--ios-blue), #5856d6);
  border-radius: var(--radius-ios-pill);
}

/* Subscriptions Grid (Frosted iOS Cards) */
.subs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 55px;
}

.sub-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass-card);
  border-radius: var(--radius-ios-card);
  padding: 26px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 15px 35px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.sub-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glass-highlight);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 25px 50px rgba(0, 0, 0, 0.6);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.card-protocol {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.protocol-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-vless { background: var(--ios-blue); box-shadow: 0 0 12px var(--ios-blue); }
.dot-vmess { background: var(--ios-orange); box-shadow: 0 0 12px var(--ios-orange); }
.dot-trojan { background: var(--ios-red); box-shadow: 0 0 12px var(--ios-red); }
.dot-ss { background: var(--ios-purple); box-shadow: 0 0 12px var(--ios-purple); }
.dot-all { background: #5ac8fa; box-shadow: 0 0 12px #5ac8fa; }
.dot-ultra { background: #30d158; box-shadow: 0 0 12px #30d158; }

.card-count {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-ios-pill);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 600;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 22px;
  min-height: 40px;
  line-height: 1.6;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Authentic iPhone Glass Action Buttons */
.btn-action {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-ios-pill);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.88) 0%, rgba(0, 95, 215, 0.95) 100%);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 8px 22px var(--ios-blue-glow);
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-action:hover {
  background: linear-gradient(180deg, rgba(15, 135, 255, 0.95) 0%, rgba(0, 110, 235, 1) 100%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 10px 28px rgba(0, 122, 255, 0.6);
  transform: translateY(-1px);
}

.btn-action:active {
  transform: scale(0.96);
}

.btn-secondary {
  background: var(--bg-glass-btn);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.16);
}

.btn-secondary:hover {
  background: var(--bg-glass-btn-hover);
  border-color: var(--border-glass-highlight);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

.btn-secondary:active {
  transform: scale(0.96);
}

/* Telegram Glass Card */
.tg-banner {
  background: linear-gradient(135deg, rgba(34, 158, 217, 0.18), rgba(175, 82, 222, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-ios-card);
  padding: 30px;
  margin-bottom: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 20px 40px rgba(0, 0, 0, 0.5);
}

.tg-info h3 {
  font-size: 21px;
  margin-bottom: 6px;
  font-weight: 700;
}
.tg-info p {
  color: var(--text-secondary);
  font-size: 14px;
}

.tg-btn-large {
  padding: 13px 26px;
  background: linear-gradient(180deg, #229ed9 0%, #1585ba 100%);
  color: #fff;
  border-radius: var(--radius-ios-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), 0 8px 25px rgba(34, 158, 217, 0.5);
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
}
.tg-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 12px 32px rgba(34, 158, 217, 0.7);
}
.tg-btn-large:active {
  transform: scale(0.96);
}

/* Search & Filter Controls (iOS Style) */
.samples-header-row {
  margin-bottom: 18px;
}

.search-filter-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 270px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  right: 14px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0.6;
}

.search-input {
  width: 100%;
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass-card);
  border-radius: var(--radius-ios-pill);
  padding: 11px 40px 11px 36px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.14);
  transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  outline: none;
}

.search-input:focus {
  border-color: var(--ios-blue);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), 0 0 0 3px rgba(0, 122, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.search-clear {
  position: absolute;
  left: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-clear:hover {
  background: rgba(255, 255, 255, 0.3);
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  background: var(--bg-glass-btn);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-ios-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.filter-pill:hover {
  color: #fff;
  border-color: var(--border-glass-highlight);
  background: var(--bg-glass-btn-hover);
  transform: translateY(-1px);
}

.filter-pill.active {
  background: linear-gradient(180deg, var(--ios-blue) 0%, #0062cc 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 4px 15px rgba(0, 122, 255, 0.45);
}

.filter-pill:active {
  transform: scale(0.95);
}

/* Sample Configs Glass Table */
.samples-wrapper {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass-card);
  border-radius: var(--radius-ios-card);
  padding: 24px;
  margin-bottom: 55px;
  overflow-x: auto;
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.16);
}

.sample-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 14px;
}

.sample-table th, .sample-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sample-table th {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

.badge-proto {
  padding: 4px 10px;
  border-radius: var(--radius-ios-pill);
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}
.badge-vless { background: rgba(0, 122, 255, 0.22); color: #5ac8fa; }
.badge-vmess { background: rgba(255, 149, 0, 0.22); color: #ff9500; }
.badge-trojan { background: rgba(255, 59, 48, 0.22); color: #ff3b30; }
.badge-ss { background: rgba(175, 82, 222, 0.22); color: #af52de; }

.btn-copy-small {
  background: var(--bg-glass-btn);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: var(--radius-ios-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}
.btn-copy-small:hover {
  background: rgba(0, 122, 255, 0.85);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}
.btn-copy-small:active {
  transform: scale(0.95);
}

/* iOS Glass Toast Notification */
.toast {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(48, 209, 88, 0.88);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-ios-pill);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-glass-card);
  padding: 35px 0;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  backdrop-filter: blur(15px);
}
footer a {
  color: #5ac8fa;
  text-decoration: none;
}

/* iOS Modal Sheet */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: rgba(28, 28, 30, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 32px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 25px 60px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.qr-box {
  background: #fff;
  padding: 16px;
  border-radius: 20px;
  margin: 22px auto;
  display: inline-block;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
