:root {
  --font-family: 'Vazirmatn', sans-serif;
  --bg-gradient: radial-gradient(circle at top right, #1a1b2f 0%, #0d0e15 100%);
  --panel-bg: rgba(22, 24, 38, 0.65);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --color-success: #10b981;
  --color-danger: #ef4444;
  --color-primary: #3b82f6;
  --color-primary-glow: rgba(59, 130, 246, 0.35);
  --glow-success: 0 0 20px rgba(16, 185, 129, 0.2);
  --glow-danger: 0 0 20px rgba(239, 68, 68, 0.2);
  --glow-primary: 0 0 20px rgba(59, 130, 246, 0.2);
  --border-radius: 16px;
  --transition-speed: 0.3s;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-tap-highlight-color: transparent;
}

select, input, button, textarea, option {
  font-family: var(--font-family) !important;
}

body {
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
  font-size: 14px;
}

/* Glassmorphic card styling */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Animated buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 14px;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: var(--glow-primary);
}
.btn-primary:hover {
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
  transform: scale(1.02);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  box-shadow: var(--glow-success);
}
.btn-success:hover {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.5);
  transform: scale(1.02);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: var(--glow-danger);
}
.btn-danger:hover {
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
  transform: scale(1.02);
}

/* Bottom Nav bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 14, 21, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--panel-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-speed) ease;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-speed) ease;
}

.nav-item:hover svg {
  transform: translateY(-2px);
}

/* Page transitions / layouts */
.container {
  padding: 16px;
  padding-bottom: 90px;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeIn var(--transition-speed) ease-in-out;
}

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

/* Inputs and Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Custom glow borders/badges */
.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.15);
  color: var(--color-primary);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
