/**
 * Telegram Web App Modern Professional Theme
 * طراحی حرفه‌ای به سبک وب‌اپ‌های تلگرام - نسخه صرافی ارز دیجیتال
 */

/* Persian Font Support - Vazir font from official CDN */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

:root {
  /* Modern Light Theme Colors - Crypto Exchange Palette */
  --tg-primary: #667eea;
  --tg-primary-dark: #5568d3;
  --tg-primary-light: #7c8ef0;
  --tg-secondary: #764ba2;
  --tg-success: #4caf50;
  --tg-danger: #ef5350;
  --tg-warning: #ffa726;
  --tg-info: #29b6f6;
  
  --tg-bg-color: #f5f7fa;
  --tg-bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --tg-secondary-bg-color: #ffffff;
  --tg-card-bg: rgba(255, 255, 255, 0.98);
  --tg-text-color: #2c3e50;
  --tg-text-secondary: #7f8c8d;
  --tg-hint-color: #95a5a6;
  --tg-link-color: #667eea;
  --tg-button-color: #667eea;
  --tg-button-text-color: #ffffff;
  --tg-section-bg-color: #ffffff;
  --tg-separator-color: #e8ecef;
  --tg-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --tg-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --tg-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
  --tg-shadow-hover: 0 12px 40px rgba(102, 126, 234, 0.25);
  
  /* Font Variables */
  --tg-font-family: "Vazir", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  
  /* Border Radius */
  --tg-radius-sm: 8px;
  --tg-radius-md: 12px;
  --tg-radius-lg: 16px;
  --tg-radius-xl: 24px;
  
  /* Transitions */
  --tg-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --tg-transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --tg-transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Crypto Exchange Specific */
  --exchange-green: #4caf50;
  --exchange-red: #ef5350;
  --exchange-blue: #667eea;
  --exchange-purple: #764ba2;
}

/* Dark theme support - Crypto Exchange Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --tg-primary: #7c8ef0;
    --tg-primary-dark: #667eea;
    --tg-primary-light: #8c9df4;
    --tg-secondary: #8b5fb8;
    --tg-bg-color: #0d0d1a;
    --tg-bg-gradient: linear-gradient(135deg, #2d3561 0%, #3d2456 100%);
    --tg-secondary-bg-color: #1a1a2e;
    --tg-card-bg: rgba(26, 26, 46, 0.98);
    --tg-text-color: #e8eaed;
    --tg-text-secondary: #9aa0a6;
    --tg-hint-color: #6b7280;
    --tg-link-color: #7c8ef0;
    --tg-button-color: #7c8ef0;
    --tg-button-text-color: #ffffff;
    --tg-section-bg-color: #1a1a2e;
    --tg-separator-color: #2d3748;
    --tg-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --tg-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
    --tg-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
    --tg-shadow-hover: 0 12px 40px rgba(124, 142, 240, 0.3);
    
    /* Dark mode specific */
    --exchange-green: #66bb6a;
    --exchange-red: #e57373;
    --exchange-blue: #7c8ef0;
    --exchange-purple: #8b5fb8;
  }
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

.telegram-webapp {
  background: var(--tg-bg-color);
  color: var(--tg-text-color);
  font-family: var(--tg-font-family);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Add subtle background pattern for crypto feel */
.telegram-webapp::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.telegram-webapp * {
  font-family: var(--tg-font-family);
}

/* Typography */
.telegram-webapp h1,
.telegram-webapp h2,
.telegram-webapp h3,
.telegram-webapp h4,
.telegram-webapp h5,
.telegram-webapp h6 {
  font-family: var(--tg-font-family);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5em;
  color: var(--tg-text-color);
}

.telegram-webapp h1 { font-size: 2rem; }
.telegram-webapp h2 { font-size: 1.75rem; }
.telegram-webapp h3 { font-size: 1.5rem; }
.telegram-webapp h4 { font-size: 1.25rem; }

.telegram-webapp p {
  margin-bottom: 1rem;
  color: var(--tg-text-secondary);
}

/* Header */
.telegram-webapp .header {
  background: linear-gradient(135deg, var(--tg-primary) 0%, var(--tg-primary-dark) 100%);
  padding: 24px 0;
  box-shadow: var(--tg-shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.telegram-webapp .header h1 {
  margin: 0;
  color: white;
  font-size: 1.75rem;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Container */
.telegram-webapp .container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Main Content */
.telegram-webapp .main-content {
  background: var(--tg-card-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--tg-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--tg-shadow-md);
  border: 1px solid var(--tg-separator-color);
  animation: slideUp var(--tg-transition-normal);
}

/* Cards */
.telegram-webapp .balance-card {
  background: linear-gradient(135deg, var(--tg-primary) 0%, var(--tg-primary-light) 100%);
  border-radius: var(--tg-radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
  box-shadow: var(--tg-shadow-lg);
  position: relative;
  overflow: hidden;
  transition: transform var(--tg-transition-normal);
}

.telegram-webapp .balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

.telegram-webapp .balance-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow-hover);
}

.telegram-webapp .balance-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 12px 0;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.telegram-webapp .balance-label {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.telegram-webapp .user-info {
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--tg-shadow-sm);
  border: 1px solid var(--tg-separator-color);
}

.telegram-webapp .user-info h3 {
  color: var(--tg-primary);
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.telegram-webapp .user-info p {
  color: var(--tg-hint-color);
  font-size: 0.9rem;
  margin: 0;
}

/* Buttons */
.telegram-webapp .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  background: var(--tg-button-color);
  color: var(--tg-button-text-color);
  text-decoration: none;
  border-radius: var(--tg-radius-lg);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--tg-transition-fast);
  box-shadow: var(--tg-shadow-sm);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.telegram-webapp .btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.telegram-webapp .btn:hover::before {
  width: 300px;
  height: 300px;
}

.telegram-webapp .btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--tg-shadow-hover);
}

.telegram-webapp .btn:active {
  transform: translateY(0) scale(0.98);
}

/* Add bounce effect on button press */
@keyframes btnPress {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.telegram-webapp .btn:active {
  animation: btnPress 0.2s ease;
}

.telegram-webapp .btn-success {
  background: linear-gradient(135deg, var(--tg-success) 0%, #66bb6a 100%);
}

.telegram-webapp .btn-danger {
  background: linear-gradient(135deg, var(--tg-danger) 0%, #e57373 100%);
}

.telegram-webapp .btn-primary {
  background: linear-gradient(135deg, var(--tg-primary) 0%, var(--tg-primary-light) 100%);
}

.telegram-webapp .btn-secondary {
  background: linear-gradient(135deg, #78909c 0%, #90a4ae 100%);
}

.telegram-webapp .action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 32px 0;
  flex-wrap: wrap;
}

/* Currency Cards */
.telegram-webapp .currency-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.telegram-webapp .currency-card {
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--tg-transition-normal);
  border: 1px solid var(--tg-separator-color);
  box-shadow: var(--tg-shadow-sm);
  position: relative;
  overflow: hidden;
}

.telegram-webapp .currency-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--tg-primary);
  transform: scaleY(0);
  transition: transform var(--tg-transition-normal);
}

.telegram-webapp .currency-card:hover::before {
  transform: scaleY(1);
}

.telegram-webapp .currency-card:hover {
  transform: translateX(-4px);
  box-shadow: var(--tg-shadow-md);
  border-color: var(--tg-primary);
}

.telegram-webapp .clickable-card {
  cursor: pointer;
}

.telegram-webapp .clickable-card:active {
  transform: translateX(-2px) scale(0.98);
}

.telegram-webapp .currency-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--tg-primary-light) 0%, var(--tg-primary) 100%);
  border-radius: 50%;
  margin-left: 16px;
  flex-shrink: 0;
  box-shadow: var(--tg-shadow-sm);
  transition: transform var(--tg-transition-fast);
}

.telegram-webapp .currency-card:hover .currency-icon {
  transform: scale(1.1) rotate(5deg);
}

.telegram-webapp .currency-icon img {
  width: 36px !important;
  height: 36px !important;
  object-fit: contain;
}

.telegram-webapp .currency-content {
  flex: 1;
}

.telegram-webapp .currency-name {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--tg-text-color);
}

.telegram-webapp .currency-code {
  color: var(--tg-hint-color);
  font-size: 0.85rem;
  margin-bottom: 2px;
  font-weight: 500;
}

.telegram-webapp .currency-network {
  color: var(--tg-hint-color);
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.telegram-webapp .currency-price {
  color: var(--tg-primary);
  font-weight: 700;
  font-size: 1rem;
}

/* Info Box */
.telegram-webapp .info-box {
  background: linear-gradient(135deg, rgba(41, 182, 246, 0.1) 0%, rgba(66, 165, 245, 0.05) 100%);
  border-right: 4px solid var(--tg-info);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.telegram-webapp .info-box h4 {
  color: var(--tg-info);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.telegram-webapp .info-box p {
  color: var(--tg-text-secondary);
  margin: 8px 0;
  padding-right: 12px;
}

/* Warning Box */
.telegram-webapp .warning {
  background: linear-gradient(135deg, rgba(255, 167, 38, 0.1) 0%, rgba(255, 152, 0, 0.05) 100%);
  border-right: 4px solid var(--tg-warning);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  margin: 24px 0;
}

.telegram-webapp .warning strong {
  color: var(--tg-warning);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 12px;
}

.telegram-webapp .warning ul {
  list-style: none;
  padding: 0;
}

.telegram-webapp .warning li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--tg-text-secondary);
}

.telegram-webapp .warning li::before {
  content: '⚠';
  position: absolute;
  right: 0;
  color: var(--tg-warning);
}

/* Wallet Section */
.telegram-webapp .wallet-section {
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  padding: 28px;
  margin: 32px 0;
  box-shadow: var(--tg-shadow-md);
  border: 1px solid var(--tg-separator-color);
}

.telegram-webapp .wallet-address {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(102, 187, 106, 0.05) 100%);
  color: var(--tg-success);
  border: 2px solid var(--tg-success);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
  word-break: break-all;
  margin: 20px 0;
  text-align: center;
  box-shadow: var(--tg-shadow-sm);
}

/* Amount Section */
.telegram-webapp .amount-section {
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  padding: 28px;
  margin-top: 24px;
  box-shadow: var(--tg-shadow-md);
  border: 1px solid var(--tg-separator-color);
  animation: slideUp var(--tg-transition-normal);
}

.telegram-webapp .selected-currency-info {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.05) 0%, rgba(0, 136, 204, 0.02) 100%);
  border-radius: var(--tg-radius-md);
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--tg-separator-color);
}

.telegram-webapp .amount-input-container {
  margin-bottom: 24px;
}

.telegram-webapp .amount-input-container label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--tg-text-color);
  font-size: 1rem;
}

.telegram-webapp .amount-input-container input {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  border: 2px solid var(--tg-separator-color);
  border-radius: var(--tg-radius-md);
  background: var(--tg-secondary-bg-color);
  color: var(--tg-text-color);
  font-family: var(--tg-font-family);
  font-weight: 600;
  transition: all var(--tg-transition-fast);
}

.telegram-webapp .amount-input-container input:focus {
  outline: none;
  border-color: var(--tg-primary);
  box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.1);
  transform: translateY(-2px);
}

.telegram-webapp .amount-info {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.05) 0%, rgba(0, 136, 204, 0.02) 100%);
  border-radius: var(--tg-radius-md);
  border-right: 3px solid var(--tg-primary);
}

.telegram-webapp .amount-info p {
  margin: 6px 0;
  font-size: 0.9rem;
  color: var(--tg-text-secondary);
}

/* Transactions */
.telegram-webapp .transactions-section {
  margin-top: 24px;
}

.telegram-webapp .transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin: 12px 0;
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  border: 1px solid var(--tg-separator-color);
  box-shadow: var(--tg-shadow-sm);
  transition: all var(--tg-transition-fast);
}

.telegram-webapp .transaction-item:hover {
  transform: translateX(-4px);
  box-shadow: var(--tg-shadow-md);
}

.telegram-webapp .transaction-type {
  font-weight: 700;
  color: var(--tg-primary);
  font-size: 1rem;
}

.telegram-webapp .transaction-status {
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.telegram-webapp .status-completed {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(102, 187, 106, 0.1) 100%);
  color: var(--tg-success);
}

.telegram-webapp .status-pending {
  background: linear-gradient(135deg, rgba(255, 167, 38, 0.2) 0%, rgba(255, 152, 0, 0.1) 100%);
  color: var(--tg-warning);
}

/* Footer */
.telegram-webapp .footer {
  text-align: center;
  color: var(--tg-hint-color);
  margin-top: 48px;
  padding: 24px;
  border-top: 1px solid var(--tg-separator-color);
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md) var(--tg-radius-md) 0 0;
}

.telegram-webapp .footer p {
  margin: 8px 0;
  font-size: 0.9rem;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.05) rotate(180deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Loading States */
.telegram-webapp .tg-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.telegram-webapp .tg-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid var(--tg-separator-color);
  border-top-color: var(--tg-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Voucher Display */
.telegram-webapp .success-message {
  text-align: center;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(102, 187, 106, 0.1) 100%);
  border: 2px solid var(--tg-success);
  border-radius: var(--tg-radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--tg-shadow-md);
  animation: slideUp var(--tg-transition-normal);
}

.telegram-webapp .success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: pulse 2s ease-in-out infinite;
}

.telegram-webapp .voucher-code-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.telegram-webapp .voucher-code-input {
  flex: 1;
  padding: 14px;
  border: 2px solid var(--tg-primary);
  border-radius: var(--tg-radius-md);
  background: var(--tg-secondary-bg-color);
  color: var(--tg-text-color);
  font-family: "Courier New", monospace;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  transition: all var(--tg-transition-fast);
}

.telegram-webapp .voucher-code-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .telegram-webapp .container {
    padding: 16px;
  }
  
  .telegram-webapp .main-content {
    padding: 20px;
  }
  
  .telegram-webapp .balance-amount {
    font-size: 2rem;
  }
  
  .telegram-webapp .action-buttons {
    flex-direction: column;
  }
  
  .telegram-webapp .action-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .telegram-webapp .header h1 {
    font-size: 1.5rem;
  }
  
  .telegram-webapp .currency-card {
    padding: 16px;
  }
  
  .telegram-webapp .currency-icon {
    width: 48px;
    height: 48px;
  }
  
  .telegram-webapp .currency-icon img {
    width: 32px !important;
    height: 32px !important;
  }
}

/* Section Title */
.telegram-webapp .section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--tg-text-color);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--tg-primary);
  display: inline-block;
}

/* Instructions */
.telegram-webapp .instructions {
  background: var(--tg-card-bg);
  backdrop-filter: blur(10px);
  border-radius: var(--tg-radius-md);
  padding: 24px;
  margin: 24px 0;
  box-shadow: var(--tg-shadow-sm);
  border: 1px solid var(--tg-separator-color);
}

.telegram-webapp .instructions h3 {
  color: var(--tg-primary);
  margin-bottom: 16px;
}

.telegram-webapp .instructions ol {
  padding-right: 24px;
  color: var(--tg-text-secondary);
}

.telegram-webapp .instructions li {
  margin: 10px 0;
  line-height: 1.6;
}

/* Glass Morphism Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--tg-bg-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Utility Classes for Crypto Exchange */
.text-success {
  color: var(--tg-success) !important;
}

.text-danger {
  color: var(--tg-danger) !important;
}

.text-warning {
  color: var(--tg-warning) !important;
}

.bg-success-light {
  background: rgba(76, 175, 80, 0.1);
}

.bg-danger-light {
  background: rgba(239, 83, 80, 0.1);
}

/* Loading Shimmer Effect */
.shimmer {
  background: linear-gradient(
    90deg,
    var(--tg-separator-color) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    var(--tg-separator-color) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.telegram-webapp ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.telegram-webapp ::-webkit-scrollbar-track {
  background: var(--tg-separator-color);
  border-radius: 4px;
}

.telegram-webapp ::-webkit-scrollbar-thumb {
  background: var(--tg-primary);
  border-radius: 4px;
}

.telegram-webapp ::-webkit-scrollbar-thumb:hover {
  background: var(--tg-primary-dark);
}

/* Hide scrollbar for cleaner mobile look */
@media (max-width: 768px) {
  .telegram-webapp ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

/* Accessibility */
.telegram-webapp *:focus-visible {
  outline: 2px solid var(--tg-primary);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .telegram-webapp .header,
  .telegram-webapp .footer,
  .telegram-webapp .btn {
    display: none;
  }
}
