:root{
  --bg-main:#050505;
  --bg-elevated:#0f0f10;
  --accent-yellow:#f6c700;
  --text-muted:#b3b3b3;
  --good:#2ecc71;
  --bad:#e74c3c;
  --chip:#141414;
  --chip-border:rgba(255,255,255,0.10);
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg-main);
  color:#fff;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.navbar{
  background:rgba(5,5,5,0.98);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(246,199,0,0.35);
}

.brand-highlight{ color:var(--accent-yellow); }

.nav-lang-select{
  width:90px;
  background:#111 !important;
  border-color:#444 !important;
  color:#fff !important;
  font-size:.8rem;
}

.logo-img{ height:22px; width:auto; display:block; }

.brand-title{ font-weight:800; letter-spacing:.03em; }

.page-header{ padding:1.8rem 0 1.2rem; }
.page-header h1{ font-size:1.9rem; font-weight:800; }
.page-header p{ color:#d0d0d0; max-width:780px; }

.card-compact{
  background: radial-gradient(circle at 20% 0%, rgba(246,199,0,0.04), transparent 60%), var(--bg-elevated);
  border-radius:1rem;
  border:1px solid rgba(255,255,255,0.06);
  box-shadow:0 22px 60px rgba(0,0,0,0.80);
}

.filter-label{
  font-size:.8rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  color:#aaaaaa;
}

.form-select,.form-control{
  background:#111;
  border-color:#333;
  color:#fff;
  font-size:.9rem;
}

.form-select:focus,.form-control:focus{
  border-color:var(--accent-yellow);
  box-shadow:0 0 0 .18rem rgba(246,199,0,0.30);
}

.form-control::placeholder{ color:#777; }

.table-wrapper{
  border-radius:1rem;
  border:1px solid rgba(255,255,255,0.08);
  background:#050505;
  box-shadow:0 18px 55px rgba(0,0,0,0.90);
  overflow:hidden;
}

.table-header-bar{
  padding:.75rem 1.1rem;
  border-bottom:1px solid rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}

.table-header-title{
  font-size:.83rem;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--text-muted);
}

.table-header-status span{
  font-size:.8rem;
  color:var(--text-muted);
}

.status-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#2ecc71;
  box-shadow:0 0 9px rgba(46,204,113,0.9);
  display:inline-block;
  margin-right:.35rem;
}

#offersTable{
  width:100%;
  min-width:900px;
  border-collapse:collapse;
  background:#050505;
  color:#f5f5f5;
}

#offersTable thead{
  background:linear-gradient(90deg,#f6c700,#f1a800);
  color:#000;
}

#offersTable thead th{
  padding:.55rem .6rem;
  font-size:.72rem;
  text-transform:uppercase;
  letter-spacing:.07em;
  white-space:nowrap;
  cursor:pointer;
  user-select:none;
  border-bottom:none;
}

#offersTable thead th:last-child{ text-align:right; }

#offersTable tbody tr{
  background:#090909;
  transition:background-color .15s ease, transform .10s ease;
}

#offersTable tbody tr:nth-child(even){ background:#0e0e0e; }

#offersTable tbody tr:hover{
  background:#161616;
  transform:translateY(-1px);
}

#offersTable td{
  padding:.55rem .6rem;
  font-size:.86rem;
  border-top:1px solid rgba(255,255,255,0.07);
  color:#f1f1f1;
  vertical-align:middle;
}

#offersTable td:last-child{ text-align:right; }

.price-main{ font-weight:800; font-size:.95rem; }

.fiat-code{
  color:var(--accent-yellow);
  font-weight:800;
  margin-left:.25rem;
  letter-spacing:.03em;
}

.completion-pill{
  font-size:.78rem;
  font-weight:800;
  padding:.25rem .6rem;
  border-radius:999px;
  display:inline-block;
  white-space:nowrap;
}

.completion-high{ color:#55d98a; background:rgba(46,204,113,0.12); border:1px solid rgba(46,204,113,0.60); }
.completion-mid{ color:#e6c03c; background:rgba(241,196,15,0.12); border:1px solid rgba(241,196,15,0.55); }
.completion-low{ color:#e25d54; background:rgba(231,76,60,0.12); border:1px solid rgba(231,76,60,0.60); }

.badge-top{
  font-size:.68rem;
  font-weight:900;
  padding:.18rem .45rem;
  border-radius:999px;
  background:rgba(246,199,0,0.15);
  color:var(--accent-yellow);
  border:1px solid rgba(246,199,0,0.65);
  margin-left:.4rem;
  white-space:nowrap;
}

.name-row{
  display:flex;
  align-items:center;
  gap:.5rem;
  flex-wrap:wrap;
}

.verified-inline{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:var(--good);
  font-weight:900;
  font-size:.74rem;
  letter-spacing:.02em;
  white-space:nowrap;
}

.verified-icon{
  width:14px;
  height:14px;
  display:inline-block;
  transform:translateY(1px);
}

.method-line{
  margin-top:.18rem;
  font-size:.72rem;
  display:flex;
  flex-wrap:wrap;
  gap:.35rem;
}

.pm-chip{
  background:var(--chip);
  border:1px solid var(--chip-border);
  border-radius:999px;
  padding:.12rem .48rem;
  color:#cfcfcf;
  white-space:nowrap;
  line-height:1.2;
}

.pm-chip.usable{ border-color:rgba(46,204,113,0.55); color:#e9ffee; }
.pm-chip.not-usable{ opacity:.55; }

.pm-none{ font-size:.72rem; color:#f2c14f; margin-top:.18rem; }

.quantity-cell{ text-align:right; }

.available-line{ font-size:.84rem; color:#d5d5d5; }
.available-line strong{ color:#fff; font-weight:900; }

.limit-cell{ font-size:.82rem; line-height:1.2; }
.limit-cell span{ color:#c9c9c9; }
.limit-cell strong{ color:#fff; }

.side-pill{
  font-size:.75rem;
  text-transform:uppercase;
  font-weight:900;
  letter-spacing:.1em;
  padding:.2rem .7rem;
  border-radius:999px;
  display:inline-block;
}

.buy-pill{ background:rgba(46,204,113,0.12); color:#2ecc71; }
.sell-pill{ background:rgba(231,76,60,0.12); color:#e74c3c; }

.fiat-pill{
  background:rgba(246,199,0,0.12);
  color:var(--accent-yellow);
  border:1px solid rgba(246,199,0,0.65);
}

.trade-btn{
  font-size:.72rem;
  padding:.22rem .55rem;
  border-radius:999px;
  font-weight:900;
  border:1px solid transparent;
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
  box-shadow:none !important;
  min-width:74px;
  width:auto;
}

.trade-btn.buy-mode{ background:rgba(46,204,113,0.16); border-color:rgba(46,204,113,0.55); color:#c9ffe0; }
.trade-btn.sell-mode{ background:rgba(231,76,60,0.16); border-color:rgba(231,76,60,0.55); color:#ffd0cc; }
.trade-btn:hover{ filter:brightness(1.08); }

.pagination-wrapper{ gap:.5rem; }

.pagination .page-link{
  background:#101010;
  border-color:#333;
  color:#f5f5f5;
  font-size:.8rem;
  border-radius:999px;
  min-width:32px;
  text-align:center;
  padding:.25rem .55rem;
}

.pagination .page-item.active .page-link{
  background:linear-gradient(135deg,#f6c700,#f1a800);
  border-color:#f1a800;
  color:#000;
  box-shadow:none;
}

.pagination .page-item.disabled .page-link{
  background:#050505;
  border-color:#202020;
  color:#555;
}

.pagination-meta{ font-size:.78rem; color:var(--text-muted); }
.pagination-meta span{ color:#fff; font-weight:900; }

.footer-note{
  font-size:.8rem;
  color:#aaa;
  margin-top:.5rem;
}

.modal-content{
  background:#0b0b0c;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:1rem;
  box-shadow:0 25px 80px rgba(0,0,0,0.85);
  color:#fff;
}

.modal-header{
  border-bottom:1px solid rgba(255,255,255,0.08);
  padding:.8rem 1rem;
}

.modal-title{
  font-weight:900;
  font-size:1rem;
}

.modal-body{ padding:1rem; }

.modal-footer{
  border-top:1px solid rgba(255,255,255,0.08);
  padding:.8rem 1rem;
  gap:.5rem;
  justify-content:flex-end;
}

#totalFiat{
  height:34px !important;
  min-height:34px !important;
  display:flex !important;
  align-items:center !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  font-variant-numeric: tabular-nums;
  color:#ddd;
  background:#111;
  border:1px solid #333;
  border-radius:.5rem;
  padding:0 .6rem !important;
  font-weight:800;
  font-size:.9rem;
}

#tradeAmount{
  height:34px !important;
  line-height:34px !important;
  padding-top:0 !important;
  padding-bottom:0 !important;
}

.cred-box{
  margin-top:.65rem;
  padding:.75rem;
  border-radius:.8rem;
  background:#0f0f10;
  border:1px solid rgba(255,255,255,0.08);
}

.cred-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
  padding:.25rem 0;
}

.cred-label{
  color:#9aa0a6;
  font-size:.78rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.04em;
  min-width:110px;
}

.cred-value{
  flex:1;
  color:#fff;
  font-weight:800;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.copy-btn{
  width:34px;
  height:34px;
  border-radius:10px;
  background:#141414;
  border:1px solid rgba(255,255,255,0.10);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex:0 0 auto;
}

.copied-pop{
  position:fixed;
  left:50%;
  bottom:30px;
  transform:translateX(-50%);
  background:rgba(46,204,113,0.18);
  border:1px solid rgba(46,204,113,0.55);
  color:#d6ffe6;
  padding:.35rem .65rem;
  border-radius:999px;
  font-weight:900;
  font-size:.82rem;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease, transform .15s ease;
  z-index:2000;
}

.copied-pop.show{
  opacity:1;
  transform:translateX(-50%) translateY(-6px);
}

/* ===== Modal font size compact (last update) ===== */
#tradeModal .modal-title{ font-size:0.92rem !important; }
#tradeModal .modal-body{ font-size:0.86rem !important; }
#tradeModal #modalTitle{ font-size:0.80rem !important; }
#tradeModal #modalInfo{ font-size:0.82rem !important; }
#tradeModal .filter-label{ font-size:0.68rem !important; }
#tradeModal .form-control.form-control-sm,
#tradeModal .form-select.form-select-sm{
  font-size:0.80rem !important;
  height:32px !important;
}
#tradeModal #totalFiat{
  font-size:0.82rem !important;
  height:32px !important;
  min-height:32px !important;
}
#tradeModal .cred-label{ font-size:0.68rem !important; }
#tradeModal .cred-value{ font-size:0.80rem !important; }
#tradeModal .copy-btn{ width:30px !important; height:30px !important; }
#tradeModal .trade-btn{ font-size:0.72rem !important; padding:0.22rem 0.55rem !important; }

@media (max-width: 768px){
  .navbar .brand-title{ display:none; }

  .page-header{ padding:1.1rem 0 .7rem; }
  .page-header h1{ font-size:1.35rem; }
  .page-header p{ font-size:.85rem; }

  .filters-row{ row-gap:.45rem; }
  .filter-label{ font-size:.72rem; }
  .form-select.form-select-sm, .form-control.form-control-sm{
    padding-top:.25rem;
    padding-bottom:.25rem;
    font-size:.78rem;
  }

  .side-fiat-group{
    display:flex;
    gap:.5rem;
  }
  .side-fiat-group > .filter-block{
    flex:1 1 0;
  }

  .table-header-bar{
    flex-direction:column;
    align-items:flex-start;
    padding:.55rem .75rem;
  }

  #offersTable{ min-width:0; }
  #offersTable thead{ display:none; }

  #offersTable tbody tr{
    display:block;
    margin:.4rem 0;
    border-radius:.7rem;
    background:#0d0d0d;
    padding:.45rem .55rem;
  }

  #offersTable td{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    border:none;
    padding:.12rem 0;
    font-size:.78rem;
  }

  #offersTable td:first-child{
    display:block;
    padding-bottom:.22rem;
  }

  #offersTable td::before{
    content: attr(data-label);
    font-size:.68rem;
    color:#999;
    margin-right:.5rem;
  }

  #offersTable td:first-child::before,
  #offersTable td[data-label="Action"]::before{
    content:"";
    margin:0;
  }

  #offersTable td:last-child{
    justify-content:flex-end;
    margin-top:.25rem;
  }
}

/* =========================
   P2P Loader Overlay
   Yellow / White / Black
   ========================= */

.page-loader{
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;              /* default hidden */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.page-loader.show{
  display: flex;
}

.loader-box{
  background: rgba(8,8,8,0.92);
  border: 1px solid rgba(246,199,0,0.35);
  box-shadow: 0 24px 70px rgba(0,0,0,0.85);
  border-radius: 16px;
  padding: 16px 18px;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.spinner-ring{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.18);
  border-top-color: #f6c700;   /* yellow */
  animation: spin 0.9s linear infinite;
}

.loader-text{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.dot-yellow{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f6c700;
  box-shadow: 0 0 14px rgba(246,199,0,0.85);
}

.text-white{ color: #fff; }

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

/* Mobile: slightly smaller */
@media (max-width: 576px){
  .loader-box{ min-width: 160px; padding: 14px 16px; }
  .spinner-ring{ width: 30px; height: 30px; }
  .loader-text{ font-size: 0.8rem; }
}

/* Filter toggle button */
.btn-filter-toggle{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,15,15,0.9);
  border: 1px solid rgba(246,199,0,0.35);
  color: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.btn-filter-toggle:hover{
  background: rgba(24,24,24,0.95);
  border-color: rgba(246,199,0,0.6);
  color: #fff;
}

.btn-filter-toggle:focus{
  box-shadow: 0 0 0 0.18rem rgba(246,199,0,0.22);
}

.btn-filter-text{
  color: rgba(255,255,255,0.9);
}

/* Make collapsed area feel native */
#advancedFilters{
  margin-top: 4px;
}

#advancedFilters .filters-row{
  padding-top: 6px;
}

.market-snapshot-inline .badge{
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
}
@media (max-width: 768px){
  .market-snapshot-inline{
    width: 100%;
    justify-content: flex-start;
  }
}

/* ============================================
   Russian language specific adjustments
   ============================================ */

html[lang="ru"] {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", 
               "Helvetica Neue", "Arial", "Roboto", sans-serif;
}

/* Adjust table cell widths for longer Russian text */
html[lang="ru"] #offersTable th:nth-child(1),
html[lang="ru"] #offersTable td:nth-child(1) {
  min-width: 160px;
}

html[lang="ru"] .filter-label {
  font-size: 0.75rem; /* Slightly smaller for longer words */
}

/* Adjust button widths for Russian text */
html[lang="ru"] .trade-btn {
  min-width: 85px; /* Wider for longer Russian words */
}

/* Modal adjustments for Russian */
html[lang="ru"] #tradeModal .modal-title {
  font-size: 0.95rem !important;
}

html[lang="ru"] .cred-label {
  min-width: 130px; /* Wider for Russian labels */
}

/* Pagination adjustments for Russian */
html[lang="ru"] .pagination-meta {
  font-size: 0.85rem;
}

/* Mobile adjustments for Russian */
@media (max-width: 768px) {
  html[lang="ru"] #offersTable td {
    font-size: 0.82rem;
  }
  
  html[lang="ru"] #offersTable td::before {
    font-size: 0.7rem;
  }
  
  html[lang="ru"] .trade-btn {
    min-width: 80px;
    font-size: 0.75rem !important;
  }
}

/* ============================================
   Timer Screen Styles - COMPLETE WORKING VERSION
   ============================================ */

.timer-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
  background: var(--bg-main);
}

.timer-card {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-elevated);
  border-radius: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
}

.timer-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-title {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.trade-id {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: monospace;
}

.trade-id span {
  color: var(--accent-yellow);
  font-weight: 700;
}

.timer-section {
  text-align: center;
  margin-bottom: 3rem;
}

/* Timer Circle Container */
.d-flex.justify-content-center.mb-4 {
  width: 100%;
}

.position-relative {
  position: relative;
}

/* Timer SVG */
.timer-bg {
  stroke: rgba(255, 255, 255, 0.1);
  fill: transparent;
}

.timer-progress {
  stroke: var(--accent-yellow);
  stroke-linecap: round;
  fill: transparent;
  transition: stroke-dashoffset 1s linear;
}

/* Timer Text */
.position-absolute.top-50.start-50.translate-middle {
  color: #fff;
}

.display-4 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0;
}

.h3 {
  font-size: 1.75rem;
  font-weight: 700;
}

.timer-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.timer-status {
  font-size: 1.1rem;
  color: var(--accent-yellow);
  font-weight: 700;
  margin-top: 1rem;
}

/* Payment Instructions */
.payment-instructions {
  background: rgba(10, 10, 10, 0.8);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(246, 199, 0, 0.2);
}

.payment-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.payment-note {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.payment-note span {
  color: var(--accent-yellow);
  font-weight: 700;
}

.payment-details-card {
  background: rgba(5, 5, 5, 0.9);
  border-radius: 0.8rem;
  padding: 1.2rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-subtitle {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.payment-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-detail-item:last-child {
  border-bottom: none;
}

.payment-detail-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 120px;
}

.payment-detail-value {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
  flex: 1;
  word-break: break-all;
}

.payment-action-note {
  color: var(--accent-yellow);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 1rem;
  background: rgba(246, 199, 0, 0.1);
  border-radius: 0.5rem;
  margin-top: 1.5rem;
}

/* Timer Actions */
.timer-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.timer-actions .btn {
  min-width: 180px;
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
}

#madePaymentBtn {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.6);
  color: #c9ffe0;
}

#madePaymentBtn:hover {
  background: rgba(46, 204, 113, 0.25);
  border-color: rgba(46, 204, 113, 0.8);
}

#cancelTradeBtn {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.6);
  color: #ffd0cc;
}

#cancelTradeBtn:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.8);
}

/* Return Section */
.return-section {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#returnToOffersBtn {
  min-width: 200px;
  padding: 0.8rem 2rem;
  font-weight: 700;
  background: rgba(246, 199, 0, 0.15);
  border-color: rgba(246, 199, 0, 0.6);
  color: #fff;
}

#returnToOffersBtn:hover {
  background: rgba(246, 199, 0, 0.25);
  border-color: rgba(246, 199, 0, 0.8);
}

/* Timer States */
.timer-expired .timer-progress {
  stroke: var(--bad);
}

.timer-expired .timer-status {
  color: var(--bad);
}

.timer-completed .timer-progress {
  stroke: var(--good);
}

.timer-completed .timer-status {
  color: var(--good);
}

/* Confirmation Modal */
#confirmTradeModal .modal-content {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
}

#confirmTradeModal .modal-title {
  color: #fff;
  font-weight: 700;
}

#confirmTradeMessage {
  color: #fff;
  font-size: 1rem;
  line-height: 1.5;
  padding: 0.5rem 0;
}

#confirmTradeModal .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

#confirmTradeModal .btn-primary {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.6);
  color: #c9ffe0;
}

/* ============================================
   RESPONSIVE FIXES FOR TIMER
   ============================================ */

@media (max-width: 768px) {
  .timer-card {
    padding: 1.5rem;
    margin: 0 15px;
  }
  
  .timer-title {
    font-size: 1.5rem;
  }
  
  /* Mobile timer circle */
  .position-relative[style*="width: 200px"] {
    width: 160px !important;
    height: 160px !important;
  }
  
  .position-relative[style*="width: 200px"] svg {
    width: 160px !important;
    height: 160px !important;
  }
  
  .position-relative[style*="width: 200px"] circle {
    cx: 80 !important;
    cy: 80 !important;
    r: 70 !important;
  }
  
  .display-4 {
    font-size: 2.5rem;
  }
  
  .h3 {
    font-size: 1.25rem;
  }
  
  .timer-label {
    font-size: 0.7rem;
  }
  
  .timer-status {
    font-size: 1rem;
  }
  
  .timer-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }
  
  .timer-actions .btn {
    width: 100%;
    max-width: 300px;
    min-width: unset;
  }
  
  .payment-detail-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .payment-detail-label {
    margin-bottom: 0.3rem;
    min-width: unset;
  }
  
  .payment-detail-value {
    text-align: left;
    width: 100%;
  }
  
  #returnToOffersBtn {
    width: 100%;
    max-width: 300px;
    min-width: unset;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .position-relative[style*="width: 200px"] {
    width: 140px !important;
    height: 140px !important;
  }
  
  .position-relative[style*="width: 200px"] svg {
    width: 140px !important;
    height: 140px !important;
  }
  
  .position-relative[style*="width: 200px"] circle {
    cx: 70 !important;
    cy: 70 !important;
    r: 60 !important;
  }
  
  .display-4 {
    font-size: 2rem;
  }
  
  .h3 {
    font-size: 1rem;
  }
  
  .timer-label {
    font-size: 0.65rem;
  }
  
  .timer-status {
    font-size: 0.9rem;
  }
  
  .timer-card {
    padding: 1.2rem;
  }
  
  .payment-instructions {
    padding: 1rem;
  }
  
  .timer-actions .btn {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

/* Smallest screens */
@media (max-width: 360px) {
  .position-relative[style*="width: 200px"] {
    width: 120px !important;
    height: 120px !important;
  }
  
  .position-relative[style*="width: 200px"] svg {
    width: 120px !important;
    height: 120px !important;
  }
  
  .position-relative[style*="width: 200px"] circle {
    cx: 60 !important;
    cy: 60 !important;
    r: 50 !important;
  }
  
  .display-4 {
    font-size: 1.8rem;
  }
  
  .h3 {
    font-size: 0.9rem;
  }
}

/* Dark mode adjustments for modals */
#paymentConfirmationModal .modal-content,
#tradeCancelledModal .modal-content {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  color: #fff;
}

#paymentConfirmationModal .modal-title,
#tradeCancelledModal .modal-title {
  color: #fff;
  font-weight: 700;
}

#paymentConfirmationModal .btn-primary,
#tradeCancelledModal .btn-primary {
  background: rgba(246, 199, 0, 0.15);
  border-color: rgba(246, 199, 0, 0.6);
  color: #fff;
}

/* ============================================
   OVERRIDE FOR BOOTSTRAP DISPLAY CLASSES
   ============================================ */

.display-4 {
  color: #fff !important;
}

.h3 {
  color: #fff !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.w-100 {
  width: 100% !important;
}