/* Top Sxema V2 - Premium Gamified Portals Game & Atmetka UI */

:root {
  --portal-bg: #0f1015;
  --portal-card: #181920;
  --portal-card-border: rgba(255, 255, 255, 0.08);
  --portal-pink: #ec4899;
  --portal-purple: #8b5cf6;
  --portal-blue: #0ea5e9;
  --portal-green: #10b981;
  --portal-orange: #f97316;
  --portal-yellow: #eab308;
  --portal-text: #f8fafc;
  --portal-subtext: #94a3b8;
}

/* Tabs in Video Ulash (Marketplace) */
.topsxema-tab-container {
  display: flex;
  background: rgba(24, 25, 32, 0.85);
  backdrop-filter: blur(12px);
  padding: 4px;
  border-radius: 16px;
  border: 1px solid var(--portal-card-border);
  margin: 12px 16px;
  gap: 6px;
}

.topsxema-tab-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--portal-subtext);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.topsxema-tab-btn.active {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(139, 92, 246, 0.25));
  color: #ffffff;
  border: 1px solid rgba(236, 72, 153, 0.4);
  box-shadow: 0 4px 15px rgba(236, 72, 153, 0.2);
}

/* Portals Game Arena Container */
.portal-arena-wrapper {
  padding: 12px 16px 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: portalFadeIn 0.3s ease;
}

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

/* Wheel Box (matching the user's uploaded image) */
.portal-wheel-card {
  background: #15161e;
  border-radius: 24px;
  border: 1px solid var(--portal-card-border);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portal-wheel-card::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15), transparent 70%);
  pointer-events: none;
}

.portal-canvas-box {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1 / 1;
  position: relative;
  margin: 0 auto;
}

.portal-wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  display: block;
}

.portal-timer-badge {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
}

.portal-timer-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 10px #ef4444;
  animation: pulseDot 1s infinite alternate;
}

@keyframes pulseDot {
  from { opacity: 0.4; }
  to { opacity: 1; transform: scale(1.2); }
}

/* Collab Instagram Account Info Card */
.portal-collab-info {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.portal-collab-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--portal-pink);
}

.portal-collab-details {
  flex: 1;
  min-width: 0;
}

.portal-collab-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-collab-username {
  font-size: 12px;
  color: var(--portal-blue);
  font-weight: 600;
}

.portal-collab-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Players Section Header */
.portal-players-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 4px;
}

.portal-players-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.portal-players-count {
  color: var(--portal-subtext);
  font-weight: 600;
}

.portal-game-id {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  font-family: monospace;
}

/* Players List */
.portal-players-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.portal-player-card {
  background: #181922;
  border: 1px solid var(--portal-card-border);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s;
}

.portal-player-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.portal-player-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portal-player-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.portal-player-pct {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--portal-purple);
  display: flex;
  align-items: center;
  gap: 4px;
}

.portal-player-pct .color-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.portal-player-amount {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-align: right;
  letter-spacing: -0.2px;
}

/* Bottom Bidding Controls */
.portal-bid-controls {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 16, 21, 0.95);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--portal-card-border);
  padding: 10px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
  max-width: 500px;
  margin: 0 auto;
}

.portal-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.portal-quick-chips::-webkit-scrollbar {
  display: none;
}

.portal-chip-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.portal-chip-btn:active {
  background: rgba(236, 72, 153, 0.25);
  border-color: var(--portal-pink);
  transform: scale(0.96);
}

.portal-submit-bid-btn {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35);
  transition: all 0.2s;
}

.portal-submit-bid-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.2);
}

/* Tap to copy Compact Chip in Profile */
.topsxema-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 6px 14px;
  border-radius: 14px;
  color: var(--portal-blue);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.topsxema-copy-chip:active {
  transform: scale(0.96);
  background: rgba(14, 165, 233, 0.25);
}

/* Glassmorphic Rules Box */
.topsxema-rules-card {
  background: rgba(24, 25, 34, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 14px 16px;
  margin-top: 12px;
}

.topsxema-rules-header {
  font-size: 13px;
  font-weight: 800;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.topsxema-rules-content {
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.55;
  white-space: pre-line;
}

/* Modal Overlay & Admin Panel */
.topsxema-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.topsxema-modal-sheet {
  width: 100%;
  max-width: 500px;
  background: #15161f;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border: 1px solid var(--portal-card-border);
  border-bottom: none;
  padding: 20px 18px 30px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* Admin Floating Button */
.topsxema-admin-floating-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4);
  z-index: 90;
  cursor: pointer;
  transition: transform 0.2s;
}

.topsxema-admin-floating-btn:active {
  transform: scale(0.95);
}
