/* 
 * style.css - P2P USDT Live Rate Comparison
 * Premium dark theme with glassmorphism and animations
 */

:root {
  --bg-primary: #121212;
  --bg-secondary: #1E1E1E;
  --bg-glass: rgba(30, 30, 30, 0.7);
  --accent: #FF7A00;
  --accent-glow: rgba(255, 122, 0, 0.4);
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --green: #00C853;
  --red: #FF1744;
  --blue-glow: rgba(0, 123, 255, 0.4);
  --card-radius: 16px;
  --transition-speed: 0.3s;
}

body.dark-theme {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 122, 0, 0.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 80%, rgba(255, 122, 0, 0.03) 0%, transparent 50%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #FF5722);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--card-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.glass-select,
.glass-input {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: var(--text-primary) !important;
  border-radius: 10px !important;
  padding: 0.6rem 1rem !important;
  transition: all var(--transition-speed) ease;
}

.glass-select:focus,
.glass-input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 122, 0, 0.25) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.glass-select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.form-label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.table {
  border-collapse: separate;
  border-spacing: 0 4px;
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
}

.table thead {
  background: linear-gradient(135deg, var(--accent), #FF5722);
  color: #000;
  font-weight: 600;
  border-radius: 12px;
}

.table thead th {
  background: transparent;
  border: none;
  padding: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  background: rgba(255, 255, 255, 0.03);
  transition: background var(--transition-speed) ease, transform 0.2s ease;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.table tbody tr:hover {
  background: rgba(255, 122, 0, 0.08);
  transform: scale(1.01);
}

.table td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border: none;
  font-size: 0.9rem;
}

.exchange-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: contain;
  background: rgba(255,255,255,0.1);
  padding: 2px;
}

.progress {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin-bottom: 0.2rem;
}

.progress-bar {
  border-radius: 10px;
  background: linear-gradient(90deg, #00C853, #00E676);
}

.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  height: 1rem;
  margin: 0.3rem 0;
}

.skeleton-text {
  width: 80%;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner-border {
  color: var(--accent) !important;
}

.animate-glow-green {
  animation: glow-green 2s ease-in-out infinite alternate;
  border: 1px solid var(--green) !important;
}

.animate-glow-blue {
  animation: glow-blue 2s ease-in-out infinite alternate;
  border: 1px solid #007BFF !important;
}

@keyframes glow-green {
  from { box-shadow: 0 0 8px rgba(0, 200, 83, 0.3); }
  to { box-shadow: 0 0 20px rgba(0, 200, 83, 0.7), 0 0 30px rgba(0, 200, 83, 0.4); }
}

@keyframes glow-blue {
  from { box-shadow: 0 0 8px rgba(0, 123, 255, 0.3); }
  to { box-shadow: 0 0 20px rgba(0, 123, 255, 0.7), 0 0 30px rgba(0, 123, 255, 0.4); }
}

.card-body i {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.card-body h4, .card-body h5 {
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.card-body small {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#lastRefreshTime {
  font-style: italic;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .glass-card {
    border-radius: 12px;
  }
  .table thead th {
    font-size: 0.7rem;
    padding: 0.6rem 0.3rem;
  }
  .table td {
    font-size: 0.75rem;
    padding: 0.6rem 0.3rem;
  }
  .exchange-logo {
    width: 18px;
    height: 18px;
  }
  h1 {
    font-size: 1.5rem;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #FF5722;
}