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

:root {
  --font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  --bg-gradient: linear-gradient(135deg, #0d0f14 0%, #151922 100%);
  --glass-bg: rgba(22, 28, 41, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.35);
  --warning: #f59e0b;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --card-bg: rgba(30, 41, 59, 0.7);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  direction: rtl;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphic Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.app-title {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Tabs / Navigation */
.tabs-container {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tab-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(30, 41, 59, 0.4);
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Forms */
.form-group {
  margin-bottom: 16px;
  text-align: right;
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(17, 24, 39, 0.8);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > .form-group {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  color: #fff;
}

.btn-primary {
  background: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-success {
  background: var(--success);
  box-shadow: 0 4px 14px var(--success-glow);
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  box-shadow: 0 4px 14px var(--danger-glow);
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-secondary {
  background: rgba(75, 85, 99, 0.5);
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(75, 85, 99, 0.7);
}

/* Toggle Switch */
.switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.4);
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  margin-bottom: 12px;
}

.switch-label {
  font-size: 15px;
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--success);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--success);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* Badges & Statistics */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item {
  background: rgba(17, 24, 39, 0.5);
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--glass-border);
}

.stat-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
  margin-top: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Lists and Items */
.list-item {
  padding: 14px;
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-item-title {
  font-weight: 700;
  font-size: 15px;
}

.list-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}
