.pbb3d-wrap {
    max-width: 480px;
    margin: 30px auto;
    position: relative;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pbb3d-canvas-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* نسبت 16:9 مثل موبایل */
    background: radial-gradient(circle at top, #1e293b, #020617);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 22px 45px rgba(0,0,0,0.65);
}

.pbb3d-canvas-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.pbb3d-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.pbb3d-status-text {
    background: rgba(15,23,42,0.7);
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    font-size: 13px;
    text-align: center;
    max-width: 80%;
}

.pbb3d-controls {
    margin: 17px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pbb3d-btn {
    background: linear-gradient(135deg, rgba(124, 58, 237, 1), rgba(34, 211, 238, 1));
    border-color: rgba(255, 255, 255, .18);
	border-radius: 15px !important;
}

.pbb3d-btn:hover {
    background: #1f2937;
}

.pbb3d-btn:active {
    transform: scale(0.96) translateY(1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}
.pbb3d-btn {
  display: block;
    margin: auto;
    /* margin: 5px; */
    margin-top: 7px;
    width: 100% !important;
}
}
@media (max-width: 600px) {
    .pbb3d-btn {
        padding: 10px 30px;
        font-size: 16px;
    }
	.pbb3d-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.pbb3d-btn {
    background: linear-gradient(135deg, rgba(124, 58, 237, 1), rgba(34, 211, 238, 1));
    border-color: rgba(255, 255, 255, .18);
	border-radius: 15px !important;
}

.pbb3d-btn:hover {
    background: #1f2937;
}

.pbb3d-btn:active {
    transform: scale(0.96) translateY(1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}
.pbb3d-btn {
  display: block;
    margin: auto;
    /* margin: 5px; */
    margin-top: 7px;
 width: 90% !important;
}
}
/* ==================== COUNTDOWN CIRCLE ==================== */

#countdown-wrap {
  display:flex;
  justify-content:center;
  margin-top:20px;
}

.countdown-circle {
  width:160px;
  height:100px;
  border-radius:50%;
  background: conic-gradient(#4b90ff var(--percent), #dce6ff 0deg);
  display:flex;
  justify-content:center;
  align-items:center;
  position:relative;
}

.countdown-circle span {
  font-size:26px;
  font-weight:bold;
  color:#002b6b;
}

.countdown-label {
  text-align:center;
  font-size:18px;
  margin-top:10px;
  color:#444;
}


/* ==================== RANKING BOX ==================== */

#tournament-ranking {
  margin:30px auto;
  max-width:500px;
  background:#0d1b2a;
  padding:20px;
  border-radius:12px;
  border:1px solid #2f3e53;
  box-shadow:0 0 12px rgba(0,0,0,0.2);
}

#tournament-ranking h3 {
  color:#72b6ff;
  text-align:center;
  margin-bottom:15px;
}

.rank-item {
  display:flex;
  justify-content:space-between;
  padding:10px 5px;
  border-bottom:1px solid #2a3648;
  color:#dce6ff;
}

.rank-item:nth-child(1) {
  background:#183153;
  border-radius:8px;
  border:1px solid gold;
}

.rank-item .user {
  font-weight:bold;
}

.rank-item:last-child {
  border-bottom:none;
}
/* کل UI بازی سفید شود */
.pbb3d-wrap * {
    color: #ffffff !important;
}

/* متن شروع بازی، باخت، برد */
.pbb3d-status-text {
    color: #ffffff !important;
}

/* زمان */
.pbb3d-time {
    color: #ffffff !important;
}

/* سکه */
.pbb3d-coins {
    color: #ffffff !important;
}

/* متن قیمت آسان‌کننده‌ها */
.pbb3d-boost-cost {
    color: #ffffff !important;
}

/* دکمه‌های آسان‌کننده */
.pbb3d-boost {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* دکمه‌های چپ و راست (اگر متن دارند) */
.pbb3d-btn {
    color: #ffffff !important;
}
/* ---------------- HUD ریسپانسیو موبایل ---------------- */
.pbb3d-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15,23,42,0.55);
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    backdrop-filter: blur(6px);
}

@media (max-width: 600px) {
    .pbb3d-hud {
        flex-direction: row;
        justify-content: space-between;
        font-size: 14px;
        padding: 8px 10px;
    }
}
