@import url('theme.css');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== Telegram Login Overlay ===== */
#tgLoginOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tg-login-container {
  text-align: center;
  padding: 40px 32px;
  max-width: 380px;
  width: 90%;
}
.tg-login-badge {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7931a, #e8860f);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(247,147,26,0.4), 0 0 80px rgba(247,147,26,0.15);
}
.tg-login-title {
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 30px rgba(200,200,255,0.2);
  margin-bottom: 4px;
}
.tg-login-subtitle {
  font-size: 14px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #f7931a;
  font-weight: 600;
  margin-bottom: 24px;
}
.tg-login-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f7931a, transparent);
  margin: 0 auto 24px;
}
.tg-login-desc {
  font-size: 15px;
  color: #b0b0cc;
  line-height: 1.6;
  margin-bottom: 32px;
}
.tg-login-widget {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
  min-height: 46px;
}
.tg-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2AABEE, #229ED9);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(42,171,238,0.35);
  transition: all 0.3s ease;
  margin-bottom: 32px;
}
.tg-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(42,171,238,0.5);
}
.tg-login-btn:active { transform: translateY(0); }
.tg-login-footer {
  font-size: 12px;
  color: #6a6a8a;
  line-height: 1.8;
}

/* Prevent long-press context menu on all images */
img, .thumb, .carousel-slide {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.product-card, .product-card *, .image-carousel {
  -webkit-touch-callout: none;
}
.product-card { pointer-events: auto; }

body {
  font-family: -apple-system, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--tg-bg);
  color: var(--tg-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Animated gradient background with floating orbs */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
  z-index: -1;
  animation: bgShift 20s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 147, 26, 0.08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  z-index: -1;
  animation: floatOrb 15s ease-in-out infinite alternate;
}

@keyframes bgShift {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(3deg); }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-50px, 80px) scale(1.2); }
  100% { transform: translate(20px, 40px) scale(0.9); }
}

/* ============ GLASS COMPONENTS ============ */

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  transition: transform 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
}

.glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}

.glass-flat {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
  padding: var(--pad);
  overflow: hidden;
}

/* ============ LAYOUT ============ */

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 var(--gap);
  padding-bottom: 80px;
}

/* Page entrance animation */
#app > *:first-child {
  animation: pageEnter 0.35s var(--ease-smooth);
}

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

/* ============ HEADER / NAV ============ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: var(--gap);
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-bottom: 1px solid var(--glass-border);
  margin: 0 calc(var(--gap) * -1);
  margin-bottom: var(--gap);
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-back {
  background: none;
  border: none;
  color: var(--tg-link);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: transform 0.2s var(--ease-bounce);
}

.header-back:active { transform: scale(0.85); }

/* ============ SEARCH BAR ============ */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: var(--gap);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-bar:focus-within {
  border-color: var(--tg-btn);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--tg-text);
  font-size: 15px;
  outline: none;
}

.search-bar input::placeholder { color: var(--tg-hint); }

.search-icon { color: var(--tg-hint); font-size: 16px; transition: color 0.3s; }
.search-bar:focus-within .search-icon { color: var(--tg-btn); }

/* ============ FILTER CHIPS ============ */

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: var(--gap);
  scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--tg-text);
  transition: all 0.25s var(--ease-bounce);
}

.chip.active {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border-color: var(--tg-btn);
  box-shadow: 0 4px 16px var(--glow-primary);
}

.chip:active { transform: scale(0.92); }

/* ============ PRODUCT GRID ============ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.product-card {
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s;
  animation: cardEnter 0.4s var(--ease-smooth) both;
}

.product-card:nth-child(1) { animation-delay: 0s; }
.product-card:nth-child(2) { animation-delay: 0.05s; }
.product-card:nth-child(3) { animation-delay: 0.1s; }
.product-card:nth-child(4) { animation-delay: 0.15s; }
.product-card:nth-child(5) { animation-delay: 0.2s; }
.product-card:nth-child(6) { animation-delay: 0.25s; }

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

.product-card:active { transform: scale(0.96); }

.product-card .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--tg-secondary-bg);
  display: block;
  transition: transform 0.4s var(--ease-smooth);
}

.product-card:active .thumb { transform: scale(1.03); }

.product-card .thumb-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--tg-secondary-bg), var(--glass-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  overflow: hidden;
}

.product-card .thumb-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmerCard 3s infinite;
}

@keyframes shimmerCard {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.product-card .info {
  padding: 6px 8px;
}

.product-card .title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 2px;
}

.product-card .price {
  font-size: 13px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-card .vendor-info {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  color: var(--tg-hint);
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-card .type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.badge-physical { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.badge-digital { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.badge-service { background: rgba(249, 115, 22, 0.15); color: #f97316; }

/* ============ DELETE LISTING ============ */

.btn-delete-listing {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
  transition: all 0.25s var(--ease-bounce);
  padding: 0;
  line-height: 1;
}

.btn-delete-listing:active {
  transform: scale(0.85);
  background: rgba(255, 59, 48, 0.9);
}

.delete-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  color: #fff;
  padding: 16px;
  animation: fadeIn 0.2s var(--ease-smooth);
}

/* ============ PRODUCT DETAIL ============ */

.product-detail .image-carousel {
  width: calc(100% + var(--gap) * 2);
  margin: 0 calc(var(--gap) * -1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  display: flex;
  scrollbar-width: none;
}

.product-detail .image-carousel::-webkit-scrollbar { display: none; }

.product-detail .image-carousel .carousel-slide {
  min-width: 100%;
  height: 240px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  scroll-snap-align: start;
}

.product-detail .detail-section {
  margin-top: var(--gap);
}

.product-detail .detail-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.product-detail .detail-price {
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 4px;
}

/* ============ VENDOR CARD ============ */

.vendor-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce);
}

.vendor-card:active { transform: scale(0.98); }

.vendor-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--glow-primary);
  position: relative;
}

.vendor-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.3;
  filter: blur(6px);
}

.vendor-card .vendor-details { flex: 1; }
.vendor-card .vendor-name { font-weight: 600; font-size: 14px; }

.stars { color: #fbbf24; font-size: 12px; filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.3)); }
.stars-empty { color: var(--tg-hint); }

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s var(--ease-bounce);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  pointer-events: none;
}

.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  box-shadow: 0 4px 16px var(--glow-primary);
}

.btn-primary:active {
  box-shadow: 0 2px 8px var(--glow-primary);
}

.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: var(--tg-text);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger:active { background: rgba(239, 68, 68, 0.2); }

.btn-success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.15);
}

.btn-success:active { background: rgba(34, 197, 94, 0.2); }

.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; border-radius: 10px; }

/* Bitcoin themed button */
.btn-bitcoin {
  background: var(--gradient-bitcoin);
  color: #fff;
  box-shadow: 0 4px 16px var(--glow-bitcoin);
}

/* ============ FORMS ============ */

.form-group {
  margin-bottom: var(--gap);
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--tg-hint);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--glass-border);
  background: var(--tg-secondary-bg);
  color: var(--tg-text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--tg-btn);
  box-shadow: 0 0 0 3px var(--glow-primary);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

[data-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23bbb' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
}

/* ============ ADMIN ROLE SELECT ============ */

.admin-role-select {
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  background: var(--tg-secondary-bg);
  color: var(--tg-text);
  cursor: pointer;
  outline: none;
}

.admin-role-select option {
  background: var(--tg-bg);
  color: var(--tg-text);
}

/* ============ USER BADGES ============ */

.user-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-admin {
  background: #e74c3c;
  color: #fff;
}

.badge-vendor {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
}

.badge-escrow {
  background: #f39c12;
  color: #fff;
}

.badge-verified {
  background: #2ecc71;
  color: #fff;
}

.badge-banned {
  background: #e74c3c;
  color: #fff;
}

/* ============ ADMIN USER STATS ============ */

.admin-user-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--tg-secondary-bg);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.admin-user-stat-label {
  color: var(--tg-hint);
}

.admin-user-stat-value {
  font-weight: 700;
}

/* ============ ORDER CARD ============ */

.order-card {
  padding: 14px;
  margin-bottom: var(--gap);
  cursor: pointer;
  transition: transform 0.2s var(--ease-bounce);
}

.order-card:active { transform: scale(0.98); }

.order-card .order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.order-card .order-id {
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-hint);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-pending_payment { background: rgba(251, 191, 36, 0.12); color: #f59e0b; }
.status-paid { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.status-shipped { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.status-completed { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.status-disputed { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.status-cancelled, .status-expired { background: rgba(107, 114, 128, 0.12); color: #6b7280; }
.status-resolved_buyer, .status-resolved_seller { background: rgba(34, 197, 94, 0.12); color: #22c55e; }

/* ============ ESCROW TIMELINE ============ */

.timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: var(--glass-border);
  border-radius: 2px;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  flex: 1;
}

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-bottom: 6px;
  transition: all 0.4s var(--ease-bounce);
}

.timeline-step.active .timeline-dot {
  background: var(--tg-btn);
  border-color: var(--tg-btn);
  color: var(--tg-btn-text);
  box-shadow: 0 0 20px var(--glow-primary);
  transform: scale(1.15);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 16px var(--glow-primary); }
  50% { box-shadow: 0 0 28px var(--glow-primary); }
}

.timeline-step.done .timeline-dot {
  background: var(--gradient-success);
  border-color: #22c55e;
  color: white;
  box-shadow: 0 0 12px var(--glow-success);
}

.timeline-label {
  font-size: 10px;
  color: var(--tg-hint);
  text-align: center;
  font-weight: 500;
}

/* ============ TABS ============ */

.tabs {
  display: flex;
  gap: 4px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: var(--gap);
  border: 1px solid var(--glass-border);
}

.tab {
  flex: 1;
  padding: 9px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: var(--tg-hint);
  transition: all 0.3s var(--ease-bounce);
  border: none;
  background: none;
}

.tab.active {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  box-shadow: 0 2px 12px var(--glow-primary);
}

.tab:active { transform: scale(0.95); }

/* ============ PROFILE ============ */

.profile-header {
  text-align: center;
  padding: 28px var(--pad);
}

.profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 30px;
  margin: 0 auto 14px;
  box-shadow: 0 8px 28px var(--glow-primary);
  position: relative;
  animation: avatarFloat 4s ease-in-out infinite;
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.profile-avatar::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--gradient-primary);
  z-index: -1;
  opacity: 0.4;
  filter: blur(8px);
}

.profile-name { font-size: 21px; font-weight: 800; }
.profile-username { font-size: 14px; color: var(--tg-hint); margin-top: 2px; }

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 18px;
}

.stat { text-align: center; }

.stat-value {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label { font-size: 11px; color: var(--tg-hint); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

/* ============ ADMIN ============ */

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.admin-stat {
  text-align: center;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.admin-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 0 0 4px 4px;
}

.admin-stat .value {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-stat .label {
  font-size: 11px;
  color: var(--tg-hint);
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============ TOAST ============ */

.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px var(--glass-shadow);
  animation: toastIn 0.4s var(--ease-bounce);
  color: var(--tg-text);
}

.toast.success { border-left: 4px solid #22c55e; box-shadow: 0 8px 32px var(--glass-shadow), 0 0 12px rgba(34, 197, 94, 0.15); }
.toast.error { border-left: 4px solid #ef4444; box-shadow: 0 8px 32px var(--glass-shadow), 0 0 12px rgba(239, 68, 68, 0.15); }
.toast.info { border-left: 4px solid var(--tg-btn); box-shadow: 0 8px 32px var(--glass-shadow), 0 0 12px var(--glow-primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============ MODAL ============ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.25s var(--ease-smooth);
}

.modal {
  background: var(--tg-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px var(--pad);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.35s var(--ease-bounce);
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--tg-hint);
  border-radius: 2px;
  margin: 0 auto 16px;
  opacity: 0.4;
}

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

/* ============ MISC ============ */

.empty-state {
  text-align: center;
  padding: 48px var(--pad);
  color: var(--tg-hint);
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 14px;
  animation: emptyBounce 2s ease-in-out infinite;
}

@keyframes emptyBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.empty-state .text { font-size: 15px; font-weight: 500; }

.loading {
  display: flex;
  justify-content: center;
  padding: 32px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--glass-border);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: relative;
}

.spinner::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--tg-btn);
  animation: spin 0.7s linear infinite reverse;
  opacity: 0.3;
}

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

.divider {
  height: 1px;
  background: var(--glass-border);
  margin: var(--gap) 0;
}

/* ============ BOTTOM NAV ============ */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 12px;
  cursor: pointer;
  color: var(--tg-hint);
  font-size: 10px;
  font-weight: 600;
  border: none;
  background: none;
  transition: all 0.25s var(--ease-bounce);
  position: relative;
}

.nav-item.active {
  color: var(--tg-btn);
}

.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.1);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 20px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--tg-btn);
  box-shadow: 0 0 8px var(--glow-primary);
}

.nav-item .nav-icon {
  font-size: 22px;
  transition: transform 0.25s var(--ease-bounce);
}

.nav-item:active .nav-icon {
  transform: scale(0.85);
}

/* Nav badge counter */
.nav-badge {
  position: absolute;
  top: 0;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--gradient-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: badgePop 0.3s var(--ease-bounce);
}

@keyframes badgePop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ============ GHOST MODE (stock=0) ============ */

.product-card.ghost {
  opacity: 0.5;
  filter: grayscale(0.4);
  pointer-events: auto;
}

.product-card.ghost .thumb,
.product-card.ghost .thumb-placeholder {
  position: relative;
}

.ghost-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ============ BANNERS (Vote + Announcement) ============ */

#bannerContainer {
  position: sticky;
  top: 0;
  z-index: 200;
  max-width: 480px;
  margin: 0 auto;
}

.banner {
  padding: 10px 14px;
  margin: 0 var(--gap);
  margin-bottom: 4px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-top: none;
  box-shadow: 0 4px 20px var(--glass-shadow);
  cursor: pointer;
  animation: bannerSlideDown 0.35s var(--ease-smooth);
}

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

.banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-icon { font-size: 16px; flex-shrink: 0; }

.banner-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-timer {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.15);
  color: #39ff14;
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-counts {
  display: flex;
  gap: 16px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}

.vote-yes { color: #22c55e; }
.vote-no { color: #ef4444; }

.banner-dismiss {
  background: none;
  border: none;
  color: var(--tg-hint);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

.banner-dismiss:active { color: var(--tg-text); }

.banner-vote { border-left: 3px solid #6366f1; }
.banner-vote.voted { opacity: 0.85; }

.banner-announcement { cursor: default; }
.banner-info { border-left: 3px solid #3b82f6; }
.banner-warning { border-left: 3px solid #f59e0b; background: rgba(245, 158, 11, 0.06); }
.banner-important { border-left: 3px solid #ef4444; background: rgba(239, 68, 68, 0.06); }

[data-theme="dark"] .banner-warning { background: rgba(245, 158, 11, 0.1); }
[data-theme="dark"] .banner-important { background: rgba(239, 68, 68, 0.1); }

/* ============ VERIFIED BADGE ============ */

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ============ FAVORITE HEART ============ */

.btn-favorite {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.25s var(--ease-bounce);
  line-height: 1;
}

.btn-favorite:active {
  transform: scale(1.3);
}

.btn-favorite.active {
  animation: heartPop 0.4s var(--ease-bounce);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.favorite-count {
  font-size: 12px;
  color: var(--tg-hint);
}

/* ============ LANGUAGE SELECTOR ============ */

.lang-selector {
  display: flex;
  gap: 8px;
}

.lang-option {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--tg-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease-bounce);
}

.lang-option.active {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
  border-color: var(--tg-btn);
  box-shadow: 0 2px 12px var(--glow-primary);
}

.lang-option:active { transform: scale(0.95); }

/* ============ IMAGE UPLOAD ============ */

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.image-upload-item {
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px dashed var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s, transform 0.2s;
}

.image-upload-item:active { transform: scale(0.95); }

.image-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-item .remove-img {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============ REVIEW ============ */

.review-item {
  padding: 14px;
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 11px; color: var(--tg-hint); }
.review-comment { font-size: 14px; line-height: 1.5; margin-top: 6px; }

/* ============ WALLET SPECIAL ============ */

.wallet-balance-card {
  text-align: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.wallet-balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(247, 147, 26, 0.06) 25%, transparent 50%, rgba(99, 102, 241, 0.06) 75%, transparent 100%);
  animation: rotateBg 12s linear infinite;
}

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

/* ============ SCROLLBAR ============ */

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 3px; }

/* ============ SELECTION ============ */

::selection {
  background: var(--tg-btn);
  color: var(--tg-btn-text);
}

/* ============ TRANSITIONS ============ */

a, button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

/* ============ LIGHT THEME OVERRIDES ============ */

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
}

[data-theme="light"] body::after {
  background: radial-gradient(circle, rgba(247, 147, 26, 0.05) 0%, transparent 70%);
}

[data-theme="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .modal {
  background: #ffffff;
}

[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.9);
}

/* ===== FatRep ===== */
.fc-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--glass-bg);
  border-radius: 4px;
  overflow: hidden;
}
.fc-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}
.fc-level-bronze { background: linear-gradient(90deg, #cd7f32, #daa06d); }
.fc-level-silver { background: linear-gradient(90deg, #9ca3af, #c0c0c0); }
.fc-level-gold { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.fc-level-diamond { background: linear-gradient(90deg, #3b82f6, #60a5fa, #a78bfa); }

.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.fc-badge.fc-level-bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }
.fc-badge.fc-level-silver { background: rgba(156,163,175,0.15); color: #9ca3af; }
.fc-badge.fc-level-gold { background: rgba(245,158,11,0.15); color: #f59e0b; }
.fc-badge.fc-level-diamond { background: rgba(59,130,246,0.15); color: #60a5fa; }

/* ===== Contest Banner ===== */
.banner-contest {
  background: linear-gradient(135deg, #7c3aed, #a855f7) !important;
  cursor: pointer;
}
.banner-contest:active {
  opacity: 0.9;
}

/* ===== Contest Card ===== */
.contest-active-card {
  border-left: 3px solid #a855f7;
}

/* ===== Apps Grid ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 4px;
}
.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: transform 0.15s;
}
.app-card:active { transform: scale(0.97); }
.app-card-icon { font-size: 40px; }
.app-card-title { font-weight: 600; font-size: 14px; }
.app-card-desc { font-size: 12px; opacity: 0.6; text-align: center; }

/* ===== Dice 3D ===== */
.dice-scene {
  width: 80px;
  height: 80px;
  perspective: 300px;
  margin: 0 auto;
}
.dice-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.3s ease-out;
}
.dice-cube.dice-preset {
  transition: none !important;
}
.dice-cube.rolling {
  animation: diceRoll 3s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.dice-face {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #f5f5f0;
  border: 2px solid #d4d4d0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 12px;
  gap: 6px;
  box-sizing: border-box;
  backface-visibility: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
}
.dice-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1a1a2e;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}
/* Face positions */
.dice-face-1 { transform: rotateY(0deg) translateZ(40px); }
.dice-face-2 { transform: rotateY(90deg) translateZ(40px); }
.dice-face-3 { transform: rotateX(-90deg) translateZ(40px); }
.dice-face-4 { transform: rotateX(90deg) translateZ(40px); }
.dice-face-5 { transform: rotateY(-90deg) translateZ(40px); }
.dice-face-6 { transform: rotateY(180deg) translateZ(40px); }

/* Dot layouts per faccia */
.dice-face-1 .dice-dot { margin: auto; }
.dice-face-2 { justify-content: space-between; align-content: space-between; }
.dice-face-2 .dice-dot:first-child { align-self: flex-start; }
.dice-face-2 .dice-dot:last-child { align-self: flex-end; }
.dice-face-3 { justify-content: space-between; align-content: space-between; }
.dice-face-4 { display: grid; grid-template-columns: 1fr 1fr; place-items: center; }
.dice-face-5 { display: grid; grid-template-columns: 1fr 1fr; place-items: center; }
.dice-face-6 { display: grid; grid-template-columns: 1fr 1fr; place-items: center; }

@keyframes diceRoll {
  0%   { transform: rotateX(0) rotateY(0) rotateZ(0); }
  10%  { transform: rotateX(120deg) rotateY(90deg) rotateZ(60deg); }
  20%  { transform: rotateX(280deg) rotateY(210deg) rotateZ(140deg); }
  30%  { transform: rotateX(450deg) rotateY(360deg) rotateZ(200deg); }
  40%  { transform: rotateX(600deg) rotateY(500deg) rotateZ(280deg); }
  50%  { transform: rotateX(740deg) rotateY(620deg) rotateZ(340deg); }
  60%  { transform: rotateX(860deg) rotateY(730deg) rotateZ(390deg); }
  70%  { transform: rotateX(950deg) rotateY(820deg) rotateZ(420deg); }
  80%  { transform: rotateX(1010deg) rotateY(880deg) rotateZ(440deg); }
  90%  { transform: rotateX(1040deg) rotateY(910deg) rotateZ(450deg); }
  100% { transform: rotateX(1050deg) rotateY(920deg) rotateZ(450deg); }
}

.dice-roll-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  margin: 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.dice-roll-btn:active {
  transform: scale(0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.dice-roll-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Dice scoreboard */
.dice-scoreboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.dice-player {
  text-align: center;
  flex: 1;
}
.dice-player-name {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dice-player-score {
  font-size: 32px;
  font-weight: 700;
}
.dice-vs {
  font-size: 18px;
  font-weight: 700;
  opacity: 0.5;
}

/* Dice round indicators */
.dice-rounds-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}
.dice-round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: background 0.3s;
}
.dice-round-dot.active {
  background: var(--accent);
}
.dice-round-dot.completed {
  background: var(--accent);
  opacity: 0.5;
}

/* Dice game list */
.dice-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  margin-bottom: 8px;
  cursor: pointer;
}
.dice-game-item:active { opacity: 0.8; }
.dice-game-info { flex: 1; }
.dice-game-info-title { font-weight: 600; font-size: 14px; }
.dice-game-info-detail { font-size: 12px; opacity: 0.6; margin-top: 2px; }
.dice-game-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
}
.dice-game-status.waiting_opponent { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.dice-game-status.waiting_payments { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.dice-game-status.playing { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.dice-game-status.finished { background: rgba(107, 114, 128, 0.15); color: #6b7280; }
.dice-game-status.cancelled { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.dice-game-status.expired { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* Dice payment status */
.dice-pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
}
.dice-pay-row:last-child { border-bottom: none; }
.dice-pay-status-paid { color: #22c55e; font-weight: 600; }
.dice-pay-status-unpaid { color: #eab308; font-weight: 600; }

/* Dice result card */
.dice-result-card {
  text-align: center;
  padding: 24px 16px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.dice-result-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.dice-result-amount { font-size: 20px; color: var(--accent); font-weight: 600; }

/* Dice round row (selection buttons) */
.dice-round-select {
  display: flex;
  gap: 8px;
}
.dice-round-select button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid var(--glass-border);
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dice-round-select button.selected {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb, 59, 130, 246), 0.15);
}

/* Dice invite box */
.dice-invite-box {
  text-align: center;
  padding: 20px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.dice-invite-code {
  font-family: monospace;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(0,0,0,0.2);
  display: inline-block;
  margin: 8px 0;
  word-break: break-all;
}

/* Dice countdown */
.dice-countdown {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: #eab308;
  font-variant-numeric: tabular-nums;
}
