/* ==============================================
   QUICKWINS CSS - Global UI Improvements
   Le Martal - Modern Dark Mode Exchange Style
   ============================================== */

/* =====================
   1. COLOR PALETTE
   ===================== */
:root {
  /* Backgrounds - Depth hierarchy */
  --qw-bg-page: #0b0e11;
  --qw-bg-card: #1e2329;
  --qw-bg-card-hover: #262d34;
  --qw-bg-input: #2b3139;
  --qw-bg-elevated: #272c33;

  /* Text */
  --qw-text-primary: #eaecef;
  --qw-text-secondary: #4b5563;
  --qw-text-muted: #374151;

  /* Borders */
  --qw-border: #2f3336;
  --qw-border-light: #3d4450;

  /* Accent Colors */
  --qw-accent-gold: #f0b90b;
  --qw-accent-purple: #8b5cf6;
  --qw-accent-success: #0ecb81;
  --qw-accent-danger: #f6465d;
  --qw-accent-info: #3b82f6;
  --qw-accent-warning: #f59e0b;

  /* Shadows */
  --qw-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --qw-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --qw-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* =====================
   2. GLOBAL RESETS
   ===================== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================
   3. TYPOGRAPHY
   ===================== */
/* Monospace for numbers/prices */
.font-mono,
.price,
.amount,
.balance,
[data-type="number"],
.countdown,
.wallet-address {
  font-family: 'JetBrains Mono', 'Roboto Mono', 'SF Mono', monospace !important;
  font-variant-numeric: tabular-nums;
}

/* =====================
   4. CARDS - Disabled (using original styles)
   ===================== */
/* Card styles removed - keeping original CSS */

/* =====================
   5. BUTTONS - Modern
   ===================== */
.btn,
button[type="submit"],
input[type="submit"] {
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: all 0.25s ease !important;
  text-transform: none;
  letter-spacing: 0.3px;
  border: none !important;
}

.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--qw-shadow-md) !important;
}

.btn:active {
  transform: translateY(0);
}

/* Primary/Success buttons */
.btn-primary,
.btn-success {
  background: linear-gradient(135deg, var(--qw-accent-success), #0a9d63) !important;
  color: #000 !important;
}

.btn-primary:hover,
.btn-success:hover {
  background: linear-gradient(135deg, #10dea0, var(--qw-accent-success)) !important;
  box-shadow: 0 4px 20px rgba(14, 203, 129, 0.4) !important;
}

/* Danger/Error buttons */
.btn-error,
.btn-danger {
  background: linear-gradient(135deg, var(--qw-accent-danger), #d63850) !important;
  color: #fff !important;
}

.btn-error:hover,
.btn-danger:hover {
  background: linear-gradient(135deg, #ff6b7f, var(--qw-accent-danger)) !important;
  box-shadow: 0 4px 20px rgba(246, 70, 93, 0.4) !important;
}

/* Warning buttons */
.btn-warning {
  background: linear-gradient(135deg, var(--qw-accent-warning), #d97706) !important;
  color: #000 !important;
}

/* Outline buttons */
.btn-outline {
  background: transparent !important;
  border: 1px solid var(--qw-border-light) !important;
  color: var(--qw-text-primary) !important;
}

.btn-outline:hover {
  background: var(--qw-bg-card-hover) !important;
  border-color: var(--qw-text-secondary) !important;
}

/* Ghost buttons */
.btn-ghost {
  background: transparent !important;
  color: var(--qw-text-secondary) !important;
}

.btn-ghost:hover {
  background: var(--qw-bg-card) !important;
  color: var(--qw-text-primary) !important;
}

/* =====================
   6. INPUTS - High Contrast
   ===================== */
.input,
.select,
.textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
  background-color: var(--qw-bg-input) !important;
  border: 1px solid var(--qw-border) !important;
  border-radius: 8px !important;
  color: var(--qw-text-primary) !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
}

.input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--qw-text-muted) !important;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--qw-accent-success) !important;
  box-shadow: 0 0 0 3px rgba(14, 203, 129, 0.15) !important;
  background-color: #1a1f26 !important;
}

/* =====================
   7. TABLES - Clean Lines
   ===================== */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background-color: rgba(0, 0, 0, 0.3) !important;
  color: var(--qw-text-secondary) !important;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600 !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--qw-border) !important;
}

.table td {
  color: var(--qw-text-primary) !important;
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid var(--qw-border) !important;
  font-size: 0.875rem;
}

.table tr:hover td {
  background-color: var(--qw-bg-card-hover) !important;
}

.table tr:last-child td {
  border-bottom: none !important;
}

/* =====================
   8. CUSTOM SCROLLBAR
   ===================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--qw-bg-page);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--qw-border-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--qw-text-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--qw-border-light) var(--qw-bg-page);
}

/* =====================
   9. EMPTY STATES
   ===================== */
.empty-state,
td[colspan]:has(~ *:empty),
.text-center.text-gray-500,
[class*="text-center"][class*="py-8"] {
  color: var(--qw-text-secondary) !important;
  font-size: 0.9rem;
  padding: 2rem !important;
}

/* Custom empty state component */
.qw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--qw-text-secondary);
}

.qw-empty-state-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.qw-empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--qw-text-primary);
  margin-bottom: 0.5rem;
}

.qw-empty-state-text {
  font-size: 0.875rem;
  color: var(--qw-text-muted);
}

/* =====================
   10. BADGES
   ===================== */
.badge {
  font-weight: 600 !important;
  font-size: 0.7rem !important;
  padding: 0.25rem 0.6rem !important;
  border-radius: 6px !important;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-success {
  background-color: rgba(14, 203, 129, 0.2) !important;
  color: var(--qw-accent-success) !important;
}

.badge-error {
  background-color: rgba(246, 70, 93, 0.2) !important;
  color: var(--qw-accent-danger) !important;
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.2) !important;
  color: var(--qw-accent-warning) !important;
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.2) !important;
  color: var(--qw-accent-info) !important;
}

.badge-ghost,
.badge-outline {
  background-color: var(--qw-bg-input) !important;
  color: var(--qw-text-secondary) !important;
  border: 1px solid var(--qw-border) !important;
}

/* =====================
   11. ALERTS
   ===================== */
.alert {
  border-radius: 10px !important;
  padding: 1rem 1.25rem !important;
  font-size: 0.9rem;
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: var(--qw-text-primary) !important;
}

.alert-success {
  background-color: rgba(14, 203, 129, 0.15) !important;
  border-color: rgba(14, 203, 129, 0.3) !important;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.alert-error {
  background-color: rgba(246, 70, 93, 0.15) !important;
  border-color: rgba(246, 70, 93, 0.3) !important;
}

/* =====================
   12. COUNTDOWN TIMER
   ===================== */
.countdown,
.timer,
[data-countdown],
.auction-timer {
  font-family: 'JetBrains Mono', 'Roboto Mono', monospace !important;
  font-weight: 700;
  font-size: 1.1rem;
}

.countdown-urgent,
.timer-urgent,
[data-countdown][data-urgent="true"] {
  color: var(--qw-accent-warning) !important;
  animation: countdown-pulse 1s ease-in-out infinite;
}

@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* =====================
   13. AUCTION CARDS - Disabled (using original styles)
   ===================== */
/* Auction card styles removed - keeping original CSS */

/* =====================
   14. HEADER IMPROVEMENTS
   ===================== */
.navbar,
nav.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(11, 14, 17, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--qw-border);
}

/* Wallet connection status */
.wallet-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: 'Roboto Mono', monospace;
}

.wallet-status.connected {
  background: rgba(14, 203, 129, 0.15);
  color: var(--qw-accent-success);
}

.wallet-status.disconnected {
  background: rgba(246, 70, 93, 0.15);
  color: var(--qw-accent-danger);
}

.wallet-status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* =====================
   15. FORMS LAYOUT
   ===================== */
.form-control {
  margin-bottom: 1rem;
}

.label {
  padding: 0.5rem 0;
}

.label-text {
  color: var(--qw-text-secondary) !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.label-text-alt {
  color: var(--qw-text-muted) !important;
  font-size: 0.7rem !important;
}

/* =====================
   16. LOADING STATES
   ===================== */
.loading,
.skeleton {
  background: linear-gradient(
    90deg,
    var(--qw-bg-card) 25%,
    var(--qw-bg-card-hover) 50%,
    var(--qw-bg-card) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* =====================
   17. TOOLTIPS
   ===================== */
[data-tip]::before {
  background-color: var(--qw-bg-elevated) !important;
  color: var(--qw-text-primary) !important;
  border: 1px solid var(--qw-border) !important;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}

/* =====================
   18. DIVIDERS
   ===================== */
.divider {
  color: var(--qw-text-muted) !important;
}

.divider::before,
.divider::after {
  background-color: var(--qw-border) !important;
}

/* =====================
   19. MODALS
   ===================== */
.modal-box {
  background-color: var(--qw-bg-card) !important;
  border: 1px solid var(--qw-border) !important;
  box-shadow: var(--qw-shadow-lg) !important;
}

.modal-backdrop,
.modal-overlay {
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(4px);
}

/* =====================
   20. LINKS
   ===================== */
a {
  color: var(--qw-accent-info);
  transition: color 0.2s ease;
}

a:hover {
  color: #60a5fa;
}

/* Nav links specific */
.nav-link,
.navbar a {
  color: #ffffff !important;
  transition: color 0.2s ease !important;
}

.nav-link:hover,
.navbar a:hover {
  color: #ffffff !important;
}

.nav-link.active {
  color: #ffffff !important;
  font-weight: 600;
}

/* =====================
   21. TEXT UTILITIES
   ===================== */
.text-success { color: var(--qw-accent-success) !important; }
.text-error, .text-danger { color: var(--qw-accent-danger) !important; }
.text-warning { color: var(--qw-accent-warning) !important; }
.text-info { color: var(--qw-accent-info) !important; }
.text-muted { color: var(--qw-text-muted) !important; }
.text-secondary { color: var(--qw-text-secondary) !important; }

/* Price colors */
.text-green-400, .text-green-500 { color: var(--qw-accent-success) !important; }
.text-red-400, .text-red-500 { color: var(--qw-accent-danger) !important; }

/* =====================
   22. RESPONSIVE FIXES
   ===================== */
@media (max-width: 768px) {
  .stats {
    flex-direction: column;
  }

  .stat {
    width: 100%;
  }

  .btn {
    padding: 0.75rem 1rem !important;
  }
}
