:root {
  --bg: #0A0F0A;
  --panelA: #1A2E1A;
  --panelB: #162E16;
  --text: #E8F0E8;
  --muted: #A8B8A8;
  --accent: #FF6A00;
  --accent2: #FF8A00;
  --accent3: #FF9A00;
  --border: #2D482D;
  --shadow: 0 24px 70px rgba(255, 106, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, #FF6A00, #FF8A00, #FF9A00);
  --gradient-secondary: linear-gradient(135deg, #1A2E1A, #162E16, #0F2A0F);
  --neon-green: #FF6A00;
  --neon-cyan: #06B6D4;
  --neon-lime: #84CC16;
  --success: #FF6A00;
  --warning: #F59E0B;
  --error: #EF4444;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  body {
    font-size: 14px;
  }
}

/* Hide scrollbar for horizontal scroll */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Unisat Button Sliding Animation */
#unisat-send-btn {
  transform: translateX(100%);
  opacity: 0;
  transition: all 3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
}

#unisat-send-btn.slide-in {
  transform: translateX(0) !important;
  opacity: 1 !important;
}

/* Ensure the button starts off-screen when hidden */
#unisat-send-btn.hidden {
  display: none;
}

/* When not hidden but not sliding in, keep off-screen */
#unisat-send-btn:not(.hidden):not(.slide-in) {
  transform: translateX(100%);
  opacity: 0;
  transition: all 3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Unisat Button Hover Effects */
#unisat-send-btn button:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

#unisat-send-btn button:active {
  transform: scale(0.98);
}

/* Loading spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* History table styling */
.history-table {
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.history-table th {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  background-color: var(--panelB);
}

.history-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background-color: var(--panelB);
}

/* Mobile responsive history table */
@media (max-width: 768px) {
  .history-table {
    font-size: 0.875rem;
  }
  
  .history-table th,
  .history-table td {
    padding: 0.5rem 0.25rem;
  }
  
  .history-table th:nth-child(1),
  .history-table td:nth-child(1) {
    min-width: 80px;
  }
  
  .history-table th:nth-child(2),
  .history-table td:nth-child(2) {
    min-width: 60px;
  }
  
  .history-table th:nth-child(3),
  .history-table td:nth-child(3) {
    min-width: 80px;
  }
  
  .history-table th:nth-child(4),
  .history-table td:nth-child(4) {
    min-width: 100px;
  }
  
  .history-table th:nth-child(5),
  .history-table td:nth-child(5) {
    min-width: 60px;
  }
}

@media (max-width: 480px) {
  .history-table {
    font-size: 0.75rem;
  }
  
  .history-table th,
  .history-table td {
    padding: 0.375rem 0.125rem;
  }
  
  /* Stack table on very small screens */
  .history-table,
  .history-table thead,
  .history-table tbody,
  .history-table th,
  .history-table td,
  .history-table tr {
    display: block;
  }
  
  .history-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .history-table tr {
    border: 1px solid var(--border);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    background-color: var(--panelA);
  }
  
  .history-table td {
    border: none;
    position: relative;
    padding: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .history-table td:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--accent);
    flex: 0 0 auto;
    margin-right: 1rem;
  }
  
  .history-table td > * {
    flex: 1;
    text-align: right;
  }
}

/* Copy button styling */
.history-table button {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.history-table button:hover {
  opacity: 1;
}

.history-table button:active {
  transform: scale(0.95);
}

/* Device orders styling */
.device-order {
  background: var(--panelA);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.device-order:hover {
  background: var(--panelB);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

/* Mobile responsive device orders */
@media (max-width: 768px) {
  .device-order {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .device-order .font-mono {
    font-size: 0.875rem;
  }
  
  .device-order .text-sm {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .device-order {
    padding: 0.5rem;
  }
}

/* Pagination controls styling */
.pagination-controls {
  margin-top: 1.5rem;
  padding: 1rem 0;
}

.pagination-btn {
  background: var(--panelA);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 80px;
}

.pagination-btn:hover:not(.disabled) {
  background: var(--panelB);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--panelA);
  border-color: var(--border);
  color: var(--text-muted);
}

.pagination-btn:active:not(.disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.pagination-info {
  padding: 0 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Mobile responsive pagination */
@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .pagination-btn {
    width: 100%;
    max-width: 200px;
  }
  
  .pagination-info {
    order: -1;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    margin-top: 1rem;
    padding: 0.75rem 0;
  }
  
  .pagination-btn {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
  }
}

.device-order .font-mono {
  font-size: 0.75rem;
  word-break: break-all;
}

.device-order .text-sm {
  font-size: 0.6875rem;
}

.glass {
  background: var(--gradient-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.pill {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .6rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  background: rgba(16, 185, 129, 0.1);
}

.tile {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: .15s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: rgba(26, 26, 46, 0.5);
  min-height: 3rem;
  /* Firefox compatibility fixes */
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 1;
}

@media (min-width: 640px) {
  .tile {
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: 14px;
    min-height: auto;
  }
}

.tile > * {
  position: relative;
  z-index: 1;
}

.tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.tile:hover {
  border-color: var(--neon-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.tile:hover::before {
  opacity: 1;
}

.tile[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
}

.tile.unavailable {
  opacity: 0.3;
  pointer-events: none;
  background: rgba(75, 85, 99, 0.3);
  border-color: rgba(75, 85, 99, 0.5);
}

.tile.unavailable:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(75, 85, 99, 0.5);
}

.tile.unavailable::before {
  opacity: 0;
}

.tile.selected {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 0 1px var(--accent);
}

.tile.selected::before {
  opacity: 0;
}

.btn {
  background: var(--gradient-primary);
  color: #FFFFFF;
  border-radius: 12px;
  padding: .8rem 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #FF8A00, #FF9A00, #FFB84D);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4);
}

.btn:hover::before {
  left: 100%;
}

.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

input, select {
  background: var(--panelB);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .8rem 1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

input::placeholder {
  color: var(--muted);
}

.skeleton {
  background: linear-gradient(90deg, #1a1b20, #23242a 50%, #1a1b20);
  background-size: 200% 100%;
  animation: s 1.2s infinite;
  border-radius: 8px;
}

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

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--panelA);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .8rem 1rem;
  display: none;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
  backdrop-filter: blur(10px);
}

.toast.show {
  display: block;
  animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Tab Navigation */
.tab-link {
  position: relative;
  transition: all 0.3s ease;
}

.tab-link.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Status Indicators */
.status-live {
  background: var(--success);
}

.status-maintenance {
  background: var(--warning);
}

.status-error {
  background: var(--error);
}

/* Countdown Animation */
.countdown-warning {
  color: var(--warning);
  animation: pulse 1s infinite;
}

.countdown-expired {
  color: var(--error);
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Order Status Badges */
.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-awaiting_payment {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-payment_confirming {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.status-payout_queued,
.status-payout_sent,
.status-payout_creating,
.status-payout_waiting,
.status-payout_processing,
.status-payout_sending {
  background: rgba(99, 102, 241, 0.2);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

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

.status-underpaid {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
  animation: pulse 2s infinite;
}

.status-expired,
.status-payout_failed,
.status-manual_action_required {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* History Table */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.history-table th {
  background: var(--panelB);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-table tr:hover {
  background: rgba(16, 185, 129, 0.05);
}

/* Device Order Cards */
.device-order {
  background: var(--panelB);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.device-order:hover {
  border-color: var(--neon-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* QR Code Container */
#qr-code {
  display: inline-block;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Loading States */
.loading {
  position: relative;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .glass {
    padding: 1rem;
  }
  
  .tile {
    padding: 0.5rem;
  }
  
  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
  
  .history-table {
    font-size: 0.875rem;
  }
  
  .history-table th,
  .history-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .tile {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  
  .tile img,
  .tile > div:first-child {
    margin-bottom: 0.25rem;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states for keyboard navigation */
.tile:focus,
.btn:focus,
input:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--panelB);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Enhanced Order Management Animations */
.status-badge {
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-quoted { background: var(--warning); color: #000; }
.status-awaiting_payment { background: var(--neon-cyan); color: #fff; }
.status-payment_confirming { background: var(--accent); color: #fff; }
.status-paid { background: var(--accent2); color: #fff; }
.status-payout_queued { background: var(--accent); color: #fff; }
.status-payout_sent { background: var(--accent); color: #fff; }
.status-payout_creating { background: var(--accent); color: #fff; }
.status-payout_waiting { background: var(--accent); color: #fff; }
.status-payout_processing { background: var(--accent); color: #fff; }
.status-payout_sending { background: var(--accent); color: #fff; }
.status-completed { background: var(--success); color: #fff; }
.status-payout_finished { background: var(--success); color: #fff; }
.status-cancelled { background: var(--error); color: #fff; }
.status-payout_failed { background: var(--error); color: #fff; }
.status-expired { background: var(--muted); color: #fff; }
.status-manual_action_required { background: var(--warning); color: #000; }

/* Progress bar animation */
#progress-bar {
    transition: width 0.5s ease-in-out;
}

/* Order panel animations */
#order-panel {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Toast animations */
.toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Button hover effects */
.btn, button {
    transition: all 0.2s ease;
}

.btn:hover, button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Copy button animations */
button[onclick*="copyToClipboard"] {
    transition: all 0.2s ease;
}

button[onclick*="copyToClipboard"]:hover {
    transform: scale(1.05);
}

/* Status indicator pulse animation */
#order-status-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}button[onclick*="copyToClipboard"]:hover {
    transform: scale(1.05);
}

/* Status indicator pulse animation */
#order-status-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Instruction Modal */
#instruction-modal {
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

#instruction-modal .bg-\[#121214\] {
    animation: slideInUp 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Modal scrollbar */
#instruction-modal .max-h-\[90vh\]::-webkit-scrollbar {
    width: 6px;
}

#instruction-modal .max-h-\[90vh\]::-webkit-scrollbar-track {
    background: #0F0F11;
    border-radius: 3px;
}

#instruction-modal .max-h-\[90vh\]::-webkit-scrollbar-thumb {
    background: #23242a;
    border-radius: 3px;
}

#instruction-modal .max-h-\[90vh\]::-webkit-scrollbar-thumb:hover {
    background: #2c2d34;
}

/* Scrollable Currency Grids */
.currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panelB);
    /* Cross-browser compatibility fixes */
    width: 100%;
    box-sizing: border-box;
    /* Ensure consistent grid behavior */
    grid-auto-rows: min-content;
    align-items: stretch;
    /* Prevent grid items from shrinking too much */
    min-width: 0;
}

.currency-grid::-webkit-scrollbar {
    width: 6px;
}

.currency-grid::-webkit-scrollbar-track {
    background: var(--panelA);
    border-radius: 3px;
}

.currency-grid::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.currency-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Mobile Responsive Currency Grids */
@media (max-width: 768px) {
    .currency-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
        max-height: 150px;
        /* Firefox mobile compatibility */
        width: 100%;
        box-sizing: border-box;
    }
    
    .tile {
        padding: 0.75rem;
        font-size: 0.875rem;
        /* Ensure tiles maintain proper sizing in Firefox */
        min-width: 0;
        flex-shrink: 1;
    }
    
    .tile img {
        width: 1.5rem;
        height: 1.5rem;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .currency-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.375rem;
        max-height: 120px;
        /* Firefox small mobile compatibility */
        width: 100%;
        box-sizing: border-box;
    }
    
    .tile {
        padding: 0.5rem;
        font-size: 0.75rem;
        /* Ensure tiles maintain proper sizing in Firefox */
        min-width: 0;
        flex-shrink: 1;
    }
    
    .tile img {
        width: 1.25rem;
        height: 1.25rem;
        flex-shrink: 0;
    }
}

/* Cross-browser compatibility fixes */
.currency-grid {
    /* Ensure consistent grid behavior across browsers */
    grid-auto-rows: min-content;
    align-items: stretch;
}

.tile {
    /* Ensure consistent flex behavior across browsers */
    flex-direction: row;
    justify-content: flex-start;
}

.tile > div {
    /* Prevent text from being squashed */
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Remove spinner arrows from number inputs */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox and standard */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Refresh button loading animation */
#refresh-status {
    position: relative;
    transition: all 0.3s ease;
}

#refresh-status.loading {
    pointer-events: none;
    opacity: 0.7;
}

#refresh-status.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Pulse effect for better visual feedback */
#refresh-status:active {
    transform: scale(0.95);
    background-color: rgba(16, 185, 129, 0.1);
}

/* Payment Balances Scrollable */
.payment-balances-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panelB);
    padding: 1rem;
}

.payment-balances-container::-webkit-scrollbar {
    width: 6px;
}

.payment-balances-container::-webkit-scrollbar-track {
    background: var(--panelA);
    border-radius: 3px;
}

.payment-balances-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.payment-balances-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Mobile Responsive Payment Balances */
@media (max-width: 768px) {
    .payment-balances-container {
        max-height: 250px;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .payment-balances-container {
        max-height: 200px;
        padding: 0.5rem;
    }
}

/* Footer Styles */
.footer {
    background: var(--gradient-secondary);
    border-top: 1px solid #000000;
    padding: 2rem 0;
    margin-top: 3rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.footer-copyright {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-quote {
    margin-top: 0.25rem;
}

.footer-quote p {
    color: #A8B8A8;
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
    opacity: 0.8;
}

.footer-copyright p {
    color: var(--muted);
    font-size: 0.75rem;
    margin: 0;
}

.footer-copyright a {
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-copyright a:hover {
    transform: translateY(-1px);
}

/* Powered by Section */
.footer-powered-by {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    justify-self: center;
    max-width: 400px;
}

.powered-by-label {
    color: #A8B8A8;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.powered-by-logos {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.powered-by-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.03);
    border: 1px solid rgba(16, 185, 129, 0.08);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 85px;
}

.powered-by-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 106, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.powered-by-link:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 106, 0, 0.2);
}

.powered-by-link:hover::before {
    left: 100%;
}

.powered-by-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: brightness(0.8);
}

.powered-by-link:hover .powered-by-logo {
    transform: scale(1.05);
    filter: brightness(1);
}

.powered-by-text {
    color: var(--muted);
    font-size: 0.625rem;
    font-weight: 400;
    text-align: center;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.powered-by-link:hover .powered-by-text {
    color: var(--accent);
}

.footer-social {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    justify-self: end;
}

.follow-us-title {
    color: #A8B8A8;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.social-links-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--border);
    color: var(--muted);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-link:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.social-icon {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.social-link:hover .social-icon {
    transform: scale(1.1);
}

/* Footer Legal Section */
.footer-legal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(45, 72, 45, 0.3);
    margin-top: 1rem;
}

.footer-legal p {
    color: #C8D8C8;
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

.legal-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legal-link {
    color: #A8B8A8;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.legal-link:hover {
    color: #FF6A00;
    opacity: 1;
}

.legal-separator {
    color: #A8B8A8;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Mobile Footer Responsive */
@media (max-width: 768px) {
    .footer {
        padding: 1.5rem 0;
        margin-top: 2rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-main {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-copyright {
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-self: center;
    }
    
    .footer-powered-by {
        grid-column: 1;
        grid-row: 2;
        max-width: 100%;
        justify-self: center;
    }
    
    .powered-by-label {
        font-size: 0.5rem;
        margin-bottom: 0.5rem;
        opacity: 0.9;
    }
    
    .powered-by-logos {
        gap: 0.75rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .powered-by-link {
        min-width: 65px;
        padding: 0.5rem 0.75rem;
        background: rgba(16, 185, 129, 0.02);
        border: 1px solid rgba(16, 185, 129, 0.05);
    }
    
    .powered-by-logo {
        width: 24px;
        height: 24px;
    }
    
    .powered-by-text {
        font-size: 0.5rem;
        opacity: 0.7;
    }
    
    .footer-social {
        grid-column: 1;
        grid-row: 3;
        gap: 0.75rem;
        justify-self: center;
        align-items: center;
    }
    
    .follow-us-title {
        font-size: 0.5rem;
        margin-bottom: 0.25rem;
    }
    
    .social-links-container {
        gap: 0.75rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 2.25rem;
        height: 2.25rem;
    }
    
    .social-icon {
        width: 1.125rem;
        height: 1.125rem;
    }
    
    .footer-legal {
        padding-top: 0.75rem;
        margin-top: 0.75rem;
        gap: 0.5rem;
    }
    
    .footer-legal p {
        font-size: 0.75rem;
        color: #C8D8C8;
        opacity: 0.9;
    }
    
    .legal-links {
        gap: 0.5rem;
    }
    
    .legal-link {
        font-size: 0.6875rem;
    }
    
    .legal-separator {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1rem 0;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-main {
        gap: 1rem;
    }
    
    .footer-copyright {
        align-items: center;
        text-align: center;
        justify-self: center;
    }
    
    .footer-copyright p {
        font-size: 0.625rem;
    }
    
    .powered-by-label {
        font-size: 0.4375rem;
        margin-bottom: 0.375rem;
        opacity: 0.9;
    }
    
    .powered-by-logos {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .powered-by-link {
        min-width: 55px;
        padding: 0.375rem 0.5rem;
        background: rgba(16, 185, 129, 0.015);
        border: 1px solid rgba(16, 185, 129, 0.03);
    }
    
    .powered-by-logo {
        width: 20px;
        height: 20px;
    }
    
    .powered-by-text {
        font-size: 0.4375rem;
        opacity: 0.6;
    }
    
    .footer-social {
        justify-self: center;
        gap: 0.5rem;
    }
    
    .follow-us-title {
        font-size: 0.4375rem;
        margin-bottom: 0.125rem;
    }
    
    .social-links-container {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .social-link {
        width: 2rem;
        height: 2rem;
    }
    
    .social-icon {
        width: 1rem;
        height: 1rem;
    }
    
    .footer-legal {
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        gap: 0.375rem;
    }
    
    .footer-legal p {
        font-size: 0.6875rem;
        color: #C8D8C8;
        opacity: 0.9;
    }
    
    .legal-links {
        gap: 0.375rem;
    }
    
    .legal-link {
        font-size: 0.625rem;
    }
    
    .legal-separator {
        font-size: 0.625rem;
    }
}


