/* ==========================================================================
   Referral Campaign Manager — Titan Dark + Gold Frontend
   ========================================================================== */

/* ---------- Page Background ---------- */

body.rcm-page {
	background:
		radial-gradient(circle at top, rgba(255, 200, 100, 0.15), transparent 40%),
		linear-gradient(180deg, #0b0f19, #070a12);
	min-height: 100vh;
}

body.rcm-page::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	background:
		repeating-linear-gradient(
			90deg,
			transparent,
			transparent 79px,
			rgba(255, 255, 255, 0.03) 80px
		),
		repeating-linear-gradient(
			0deg,
			transparent,
			transparent 79px,
			rgba(255, 255, 255, 0.03) 80px
		);
}

body.rcm-page > * {
	position: relative;
	z-index: 1;
}

/* ---------- Design Tokens ---------- */

.rcm-root,
.rcm-auth-page,
.rcm-campaigns-list,
.rcm-join-campaign,
.rcm-dashboard,
.rcm-leaderboard-container {
	--bg: #0b0f19;
	--bg-2: #111827;
	--panel: rgba(17, 24, 39, 0.78);
	--panel-strong: rgba(15, 23, 42, 0.92);

	--text: #f8fafc;
	--text-secondary: #cbd5e1;
	--muted: #94a3b8;

	--gold: #f5c76b;
	--gold-2: #ffdf9a;
	--gold-deep: #b9852f;

	--danger: #ef4444;
	--danger-bg: rgba(239, 68, 68, 0.12);
	--danger-border: rgba(239, 68, 68, 0.28);

	--success: #22c55e;
	--success-bg: rgba(34, 197, 94, 0.12);
	--success-border: rgba(34, 197, 94, 0.22);

	--line: rgba(245, 199, 107, 0.22);
	--line-subtle: rgba(255, 255, 255, 0.06);

	--shadow-gold: 0 10px 30px rgba(245, 199, 107, 0.18);
	--shadow-dark: 0 12px 30px rgba(0, 0, 0, 0.35);
	--shadow-inset-glow:
		inset 0 4px 30px rgba(253, 105, 33, 0.2),
		inset 0 4px 18.9px rgba(253, 105, 33, 0.22),
		0 4px 6px rgba(253, 105, 33, 0.2);

	--radius-xl: 24px;
	--radius-lg: 18px;
	--radius-md: 14px;
	--radius-sm: 10px;

	--container: 1100px;
}

/* ---------- Base Wrappers ---------- */

.rcm-auth-page,
.rcm-campaigns-list,
.rcm-join-campaign,
.rcm-dashboard,
.rcm-leaderboard-container {
	font-family: "Noto Sans TC", "Varela", "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ---------- Global Reset for Plugin Scope ---------- */

.rcm-auth-page *,
.rcm-campaigns-list *,
.rcm-join-campaign *,
.rcm-dashboard *,
.rcm-leaderboard-container * {
	box-sizing: border-box;
}

/* ---------- Glass Card ---------- */

.rcm-glass-card {
	background-image: linear-gradient(149deg, #12121252 55%, #fd692199);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	box-shadow: var(--shadow-inset-glow);
}

/* ---------- Rules Card ---------- */

.rcm-rules-content {
	font-size: 14px;
	line-height: 1.75;
	color: var(--text, #e0e0e0);
}

.rcm-rules-content h1,
.rcm-rules-content h2,
.rcm-rules-content h3,
.rcm-rules-content h4 {
	color: var(--gold, #f5c76b);
	margin: 1.2em 0 0.4em;
}

.rcm-rules-content h1:first-child,
.rcm-rules-content h2:first-child,
.rcm-rules-content h3:first-child {
	margin-top: 0;
}

.rcm-rules-content ul,
.rcm-rules-content ol {
	padding-left: 1.5em;
	margin: 0.6em 0;
}

.rcm-rules-content li {
	margin-bottom: 0.3em;
}

.rcm-rules-content a {
	color: var(--gold, #f5c76b);
	text-decoration: underline;
}

.rcm-rules-content code {
	background: rgba(255, 255, 255, 0.08);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.9em;
}

.rcm-rules-content blockquote {
	border-left: 3px solid var(--gold, #f5c76b);
	margin: 0.8em 0;
	padding: 0.4em 1em;
	opacity: 0.85;
}

/* ---------- Eyebrow ---------- */

.rcm-eyebrow {
	margin: 0 0 10px;
	color: var(--gold);
	font-size: 12px;
	letter-spacing: 0.18em;
	font-weight: 800;
	text-transform: uppercase;
}

/* ---------- Section Titles ---------- */

.rcm-section-title {
	font-size: clamp(28px, 4vw, 48px);
	line-height: 1.08;
	font-weight: 900;
	margin: 0 0 12px;
	color: var(--text);
}

.rcm-section-subtitle {
	color: var(--muted);
	font-size: 16px;
	line-height: 1.7;
	margin: 0;
}

/* ---------- Buttons ---------- */

.rcm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px 40px;
	background-image: linear-gradient(90deg, #f37335, #ddb881);
	border-radius: 10px;
	border: 1px solid transparent;
	color: #fff;
	font-family: "Noto Sans TC", sans-serif;
	font-size: 18px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.25s ease;
	line-height: 1.4;
	box-sizing: border-box;
	position: relative;
}

.rcm-btn-primary {
	color: #fff;
	background-color: #fd6921;
	background-image: none;
	box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.4), 0 11px 38.6px rgba(253, 105, 33, 0.5);
}

.rcm-btn-primary:hover {
	transform: translateY(-1px);
	filter: brightness(1.1);
	box-shadow: inset 0 4px 4px rgba(255, 255, 255, 0.5), 0 14px 44px rgba(253, 105, 33, 0.6);
}

.rcm-btn-primary:active {
	transform: translateY(0);
	filter: brightness(0.95);
}

.rcm-btn-primary:disabled,
.rcm-btn-disabled {
	color: #fff;
	background-color: #fd6921;
	background-image: none;
	box-shadow: none;
	cursor: not-allowed;
	opacity: 0.4;
	transform: none;
	filter: none;
}

.rcm-btn-secondary {
	color: #fff;
	background-color: rgba(253, 105, 33, 0.05);
	border: 1px solid rgba(253, 105, 33, 0.5);
	box-shadow: 0 11px 38px rgba(0, 0, 0, 0.2), inset 0 4px 4px rgba(0, 0, 0, 0.2);
}

.rcm-btn-secondary:hover {
	background-color: rgba(253, 105, 33, 0.12);
	border-color: rgba(253, 105, 33, 0.7);
}

.rcm-btn-danger {
	color: #fecaca;
	border-color: var(--danger-border);
	background: var(--danger-bg);
}

.rcm-btn-danger:hover {
	background: rgba(239, 68, 68, 0.2);
}

.rcm-btn-sm {
	padding: 10px 24px;
	font-size: 14px;
}

.rcm-btn-block {
	width: 100%;
}

/* ---------- Form Inputs ---------- */

.rcm-form-label {
	display: block;
	font-size: 13px;
	color: #e2e8f0;
	font-weight: 700;
	margin-bottom: 8px;
}

.rcm-form-input,
.rcm-form-select {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	color: var(--text);
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
	font-size: 15px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.rcm-form-input::placeholder {
	color: var(--muted);
	opacity: 0.7;
}

.rcm-form-input:focus,
.rcm-form-select:focus {
	border-color: rgba(253, 105, 33, 0.5);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(253, 105, 33, 0.15);
}

.rcm-form-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23fd6921'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 40px;
}

.rcm-form-group {
	margin-bottom: 20px;
}

.rcm-form-row {
	display: flex;
	gap: 16px;
	align-items: flex-end;
}

/* ---------- Messages / Notices ---------- */

.rcm-message,
.rcm-notice {
	padding: 16px 20px;
	border-radius: var(--radius-sm);
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.6;
}

.rcm-message-success,
.rcm-notice-success {
	background: var(--success-bg);
	border: 1px solid var(--success-border);
	color: #bbf7d0;
}

.rcm-message-error,
.rcm-notice-error {
	background: var(--danger-bg);
	border: 1px solid var(--danger-border);
	color: #fecaca;
}

.rcm-notice-info {
	background: rgba(245, 199, 107, 0.08);
	border: 1px solid rgba(245, 199, 107, 0.2);
	color: var(--gold-2);
}

.rcm-notice-info a {
	color: var(--gold);
	font-weight: 700;
	text-decoration: underline;
}

/* ---------- Badges ---------- */

.rcm-badge {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.rcm-badge-success {
	color: #bbf7d0;
	background: var(--success-bg);
	border: 1px solid var(--success-border);
}

.rcm-badge-danger {
	color: #fecaca;
	background: var(--danger-bg);
	border: 1px solid var(--danger-border);
}

.rcm-badge-secondary {
	color: var(--muted);
	background: rgba(148, 163, 184, 0.12);
	border: 1px solid rgba(148, 163, 184, 0.2);
}

.rcm-badge-gold {
	color: #1a1205;
	background: linear-gradient(135deg, var(--gold-2), var(--gold));
}

/* ---------- Tables ---------- */

.rcm-table {
	width: 100%;
	border-collapse: collapse;
}

.rcm-table thead th {
	padding: 18px 24px;
	text-align: left;
	color: rgba(253, 105, 33, 0.9);
	font-size: 13px;
	font-weight: 800;
	background: rgba(253, 105, 33, 0.06);
	border-bottom: 1px solid rgba(253, 105, 33, 0.15);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rcm-table tbody td {
	padding: 18px 24px;
	border-bottom: 1px solid var(--line-subtle);
	vertical-align: middle;
	font-size: 14px;
}

.rcm-table tbody tr {
	transition: background 0.2s ease;
}

.rcm-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.02);
}

.rcm-table-sm thead th,
.rcm-table-sm tbody td {
	padding: 10px 14px;
	font-size: 13px;
}

/* ==========================================================================
   AUTH PAGES — Register / Login / OTP / Banned
   ========================================================================== */

.rcm-auth-page {
	min-height: 80vh;
	display: grid;
	align-items: center;
	padding: 64px 0;
}

.rcm-auth-layout {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: 64px;
	align-items: center;
	width: min(100% - 48px, var(--container));
	margin-inline: auto;
}

.rcm-auth-copy {
	max-width: 620px;
}

.rcm-feature-list {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
}

.rcm-feature-list li {
	padding: 12px 20px;
	border-radius: 10px;
	color: var(--gold-2);
	background-color: rgba(253, 105, 33, 0.05);
	border: 1px solid rgba(255, 163, 118, 0.3);
	box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.2);
	font-size: 13px;
	font-weight: 700;
}

.rcm-auth-card {
	padding: 40px;
	min-width: 420px;
}

.rcm-auth-card h3 {
	margin: 0 0 24px;
	font-size: 28px;
	font-weight: 900;
	color: var(--text);
}

.rcm-auth-form {
	display: grid;
	gap: 20px;
}

.rcm-auth-form label {
	display: grid;
	gap: 8px;
}

.rcm-auth-form label > span {
	font-size: 13px;
	color: #e2e8f0;
	font-weight: 700;
}

.rcm-auth-form input[type="text"],
.rcm-auth-form input[type="email"],
.rcm-auth-form input[type="password"] {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	color: var(--text);
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
	font-size: 15px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.rcm-auth-form input::placeholder {
	color: var(--muted);
	opacity: 0.7;
}

.rcm-auth-form input:focus {
	border-color: rgba(253, 105, 33, 0.5);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(253, 105, 33, 0.15);
}

.rcm-auth-link {
	text-align: center;
	margin-top: 28px;
	color: var(--muted);
	font-size: 14px;
}

.rcm-auth-link a {
	color: var(--gold);
	text-decoration: none;
	font-weight: 700;
}

.rcm-auth-link a:hover {
	text-decoration: underline;
}

/* ---------- Auth — Login Extras ---------- */

.rcm-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.rcm-text-link {
	color: var(--gold);
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
}

.rcm-text-link:hover {
	text-decoration: underline;
}

/* ---------- Auth — OTP Centered Layout ---------- */

.rcm-auth-centered {
	display: grid;
	grid-template-columns: 1fr;
	justify-items: center;
	width: min(100% - 32px, 520px);
	margin-inline: auto;
}

.rcm-otp-card {
	width: 100%;
	padding: 48px 40px;
	text-align: center;
}

.rcm-otp-card .rcm-section-title {
	font-size: 28px;
}

.rcm-otp-instruction {
	color: var(--muted);
	font-size: 15px;
	margin: 8px 0 24px;
	line-height: 1.6;
}

.rcm-otp-instruction strong {
	color: var(--gold);
}

.rcm-otp-input-wrap {
	display: flex;
	justify-content: center;
	margin: 24px 0;
}

.rcm-otp-input-single {
	width: 100%;
	max-width: 280px;
	height: 64px;
	text-align: center;
	font-size: 32px;
	font-weight: 800;
	letter-spacing: 0.5em;
	color: var(--gold);
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(253, 105, 33, 0.3);
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
}

.rcm-otp-input-single:focus {
	border-color: rgba(253, 105, 33, 0.6);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(253, 105, 33, 0.15);
}

.rcm-resend-group {
	margin-top: 16px;
}

.rcm-resend-btn {
	background: none;
	border: none;
	color: var(--gold);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	padding: 8px 16px;
	font-family: inherit;
}

.rcm-resend-btn:hover {
	text-decoration: underline;
}

.rcm-resend-btn:disabled {
	color: var(--muted);
	cursor: not-allowed;
	text-decoration: none;
}

/* ---------- Auth — Banned ---------- */

.rcm-banned-card {
	width: 100%;
	max-width: 520px;
	padding: 48px 40px;
	text-align: center;
	border-color: var(--danger-border);
}

.rcm-banned-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--danger-bg);
	border: 2px solid var(--danger-border);
	font-size: 28px;
}

.rcm-banned-card .rcm-section-title {
	font-size: 24px;
	color: #fecaca;
}

.rcm-banned-reason-box {
	margin: 20px 0;
	padding: 16px;
	background: var(--danger-bg);
	border: 1px solid var(--danger-border);
	border-radius: var(--radius-sm);
	text-align: left;
}

.rcm-banned-reason-label {
	display: block;
	font-size: 12px;
	font-weight: 800;
	color: var(--danger);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.rcm-banned-reason-text {
	color: #fecaca;
	font-size: 14px;
	line-height: 1.5;
}

/* ==========================================================================
   CAMPAIGN LIST
   ========================================================================== */

.rcm-campaigns-list {
	width: min(100% - 48px, var(--container));
	margin-inline: auto;
	padding: 64px 0;
}

.rcm-campaigns-list > .rcm-section-title {
	margin-bottom: 12px;
}

.rcm-campaigns-head {
	margin-bottom: 40px;
}

.rcm-campaigns-head-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.rcm-campaigns-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
	gap: 28px;
}

.rcm-campaign-card {
	position: relative;
	overflow: hidden;
	background-image: linear-gradient(149deg, #12121252 55%, #fd692199);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	box-shadow: var(--shadow-inset-glow);
	padding: 32px;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rcm-campaign-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--gold), var(--gold-deep), var(--gold));
	opacity: 0.6;
}

.rcm-campaign-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-dark), var(--shadow-gold), var(--shadow-inset-glow);
}

.rcm-campaign-card-header {
	margin-bottom: 16px;
}

.rcm-campaign-name {
	margin: 0;
	font-size: 20px;
	font-weight: 900;
	color: var(--text);
}

.rcm-campaign-card-body {
	margin-bottom: 24px;
}

.rcm-campaign-description {
	margin: 0 0 16px;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
}

.rcm-campaign-description--scroll {
	max-height: calc(1.6em * 5);
	overflow-y: auto;
}

.rcm-campaign-meta {
	display: flex;
	gap: 28px;
	flex-wrap: wrap;
}

.rcm-campaign-meta > div {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.rcm-campaign-meta .rcm-label {
	font-size: 11px;
	font-weight: 800;
	color: var(--gold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.rcm-campaign-meta .rcm-value {
	font-size: 14px;
	color: var(--text-secondary);
	font-weight: 600;
}

.rcm-campaign-card-footer {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ==========================================================================
   JOIN CAMPAIGN
   ========================================================================== */

.rcm-join-campaign {
	width: min(100% - 48px, 580px);
	margin-inline: auto;
	padding: 64px 0;
}

.rcm-join-campaign > h2 {
	font-size: 32px;
	font-weight: 900;
	margin: 0 0 12px;
	color: var(--text);
}

.rcm-join-campaign > .rcm-campaign-description {
	color: var(--muted);
	font-size: 15px;
	margin: 0 0 32px;
}

.rcm-join-form-card {
	padding: 40px;
}

.rcm-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 28px;
}

.rcm-fieldset legend {
	font-size: 16px;
	font-weight: 800;
	color: var(--gold);
	margin-bottom: 16px;
	padding: 0;
}

.rcm-join-message {
	margin-top: 16px;
}

/* ==========================================================================
   DASHBOARD
   ========================================================================== */

.rcm-dashboard {
	width: min(100% - 48px, var(--container));
	margin-inline: auto;
	padding: 64px 0;
}

.rcm-dashboard > h2 {
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 900;
	margin: 0 0 12px;
	color: var(--text);
}

.rcm-dashboard-section {
	margin-top: 40px;
}

.rcm-dashboard-section > h3 {
	font-size: 20px;
	font-weight: 800;
	color: var(--gold);
	margin: 0 0 24px;
}

.rcm-campaigns-table-wrap {
	background-image: linear-gradient(149deg, #12121252 55%, #fd692199);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	box-shadow: var(--shadow-inset-glow);
	overflow: hidden;
}

.rcm-row-disqualified {
	opacity: 0.5;
}

.rcm-text-muted {
	color: var(--muted);
	font-size: 13px;
}

.rcm-toggle-referral-form {
	cursor: pointer;
}

/* Referral inline form row */
.rcm-referral-form-row td {
	padding: 0 !important;
	background: rgba(253, 105, 33, 0.04);
}

/* ---------- Submit Referral Inline ---------- */

.rcm-submit-referral {
	padding: 24px 28px;
}

.rcm-referral-form {
	background: transparent;
	border: none;
	padding: 0;
	margin: 0;
}

.rcm-referral-form .rcm-form-row {
	display: flex;
	gap: 16px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.rcm-referral-form .rcm-form-group {
	flex: 1;
	min-width: 160px;
	margin-bottom: 0;
}

.rcm-referral-form .rcm-form-group-btn {
	flex: 0 0 auto;
}

.rcm-referral-form .rcm-label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--gold);
	margin-bottom: 6px;
	letter-spacing: 0.02em;
}

.rcm-referral-form .rcm-input,
.rcm-referral-form .rcm-select {
	width: 100%;
	height: 44px;
	padding: 0 12px;
	color: var(--text);
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
	font-size: 14px;
	font-family: inherit;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.rcm-referral-form .rcm-input:focus,
.rcm-referral-form .rcm-select:focus {
	border-color: rgba(253, 105, 33, 0.5);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(253, 105, 33, 0.15);
}

.rcm-referral-form .rcm-select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%23fd6921'%3E%3Cpath d='M5 6L0 0h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

.rcm-referral-submit-btn {
	height: 44px;
	min-height: 44px;
}

.rcm-referral-message {
	margin-top: 12px;
}

/* ---------- Existing Referrals ---------- */

.rcm-existing-referrals {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--line-subtle);
}

.rcm-existing-referrals h4 {
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 800;
	color: var(--gold);
	letter-spacing: 0.02em;
}

/* ---------- Referral Standalone Page (join.php) ---------- */

.rcm-rules-card,
.rcm-referral-card,
.rcm-referral-history-card,
.rcm-cta-card {
	background-image: linear-gradient(149deg, #12121252 55%, #fd692199);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	box-shadow: var(--shadow-inset-glow);
	padding: 32px;
	margin-top: 12px;
}

.rcm-card-title {
	font-size: 20px;
	font-weight: 800;
	color: var(--gold);
	margin: 0 0 8px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.rcm-card-subtitle {
	font-size: 14px;
	color: var(--muted);
	margin: 0 0 24px;
}

.rcm-cta-card {
	text-align: center;
}

.rcm-cta-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.rcm-referral-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	background: var(--orange);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	border-radius: 14px;
}

.rcm-referral-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.rcm-referral-table {
	width: 100%;
	border-collapse: collapse;
}

.rcm-referral-table thead th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--orange);
	padding: 10px 16px;
	border-bottom: 1px solid var(--line-subtle);
	white-space: nowrap;
}

.rcm-referral-table tbody td {
	padding: 12px 16px;
	font-size: 14px;
	color: var(--text);
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.rcm-referral-table tbody tr:last-child td {
	border-bottom: none;
}

.rcm-referral-table tbody tr:hover td {
	background: rgba(253, 105, 33, 0.04);
}

.rcm-delete-referral {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--muted, #888);
	opacity: 0.6;
	transition: opacity 0.15s, color 0.15s;
	line-height: 1;
}

.rcm-delete-referral:hover {
	opacity: 1;
	color: #e74c3c;
}

.rcm-delete-referral:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

/* ==========================================================================
   LEADERBOARD
   ========================================================================== */

.rcm-leaderboard-container {
	width: min(100% - 48px, var(--container));
	margin-inline: auto;
	padding: 64px 0;
}

.rcm-back-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--muted);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 20px;
	transition: color 0.2s;
}

.rcm-back-link:hover {
	color: var(--gold);
}

.rcm-leaderboard-head {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	align-items: flex-end;
	margin-bottom: 36px;
}

.rcm-leaderboard-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* Campaign Selector */
.rcm-campaign-selector {
	margin-bottom: 32px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.rcm-campaign-selector label {
	font-weight: 700;
	color: var(--gold);
	font-size: 14px;
	white-space: nowrap;
}

.rcm-campaign-selector .rcm-select {
	min-width: 240px;
	height: 48px;
	padding: 0 40px 0 16px;
	color: var(--text);
	background-color: rgba(0, 0, 0, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
	font-size: 15px;
	font-family: inherit;
	outline: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%23fd6921'%3E%3Cpath d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.rcm-campaign-selector .rcm-select:focus {
	border-color: rgba(253, 105, 33, 0.5);
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(253, 105, 33, 0.15);
}

/* Leaderboard Table */
.rcm-leaderboard-table-wrap {
	background-image: linear-gradient(149deg, #12121252 55%, #fd692199);
	border: 0.5px solid rgba(255, 255, 255, 0.3);
	border-radius: 10px;
	box-shadow: var(--shadow-inset-glow);
	overflow: hidden;
}

.rcm-leaderboard-table {
	width: 100%;
	border-collapse: collapse;
}

.rcm-leaderboard-table thead th {
	padding: 20px 28px;
	text-align: left;
	color: rgba(253, 105, 33, 0.9);
	font-size: 13px;
	font-weight: 800;
	background: rgba(253, 105, 33, 0.06);
	border-bottom: 1px solid rgba(253, 105, 33, 0.15);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rcm-leaderboard-table tbody td {
	padding: 20px 28px;
	border-bottom: 1px solid rgba(253, 105, 33, 0.08);
	vertical-align: middle;
	font-size: 15px;
}

.rcm-leaderboard-table tbody tr {
	transition: background 0.2s ease;
}

.rcm-leaderboard-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.02);
}

.rcm-leaderboard-table tbody tr:last-child td {
	border-bottom: none;
}

/* Column widths */
.rcm-col-rank {
	width: 80px;
	text-align: center;
}

.rcm-col-name {
	text-align: left;
}

.rcm-col-count {
	width: 120px;
	text-align: center;
	font-weight: 700;
}

.rcm-col-referrals {
	width: 140px;
	text-align: center;
	vertical-align: middle;
}

.rcm-leaderboard-table tbody tr.rcm-lb-detail-row {
	display: none;
}

.rcm-leaderboard-table tbody tr.rcm-lb-detail-row.is-open {
	display: table-row;
}

.rcm-lb-detail-cell {
	background: rgba(0, 0, 0, 0.22);
	border-bottom: 1px solid rgba(253, 105, 33, 0.12) !important;
	padding-top: 12px !important;
}

.rcm-lb-referral-public-list {
	margin: 0;
	padding: 0 12px 4px 36px;
	list-style: disc;
	color: rgba(255, 255, 255, 0.88);
}

.rcm-lb-referral-public-list li {
	margin-bottom: 8px;
}

.rcm-lb-ref-mono {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 14px;
	letter-spacing: 0.02em;
}

.rcm-lb-toggle-referrals {
	font-size: 13px;
	padding: 8px 12px;
	white-space: nowrap;
}

.rcm-lb-referrals-na {
	color: var(--muted);
	font-weight: 600;
}

.rcm-lb-referrals-empty {
	margin: 0;
	padding: 4px 0 8px;
	color: var(--muted);
	font-size: 14px;
}

.rcm-lb-detail-cell::before {
	display: none !important;
}

/* Rank Badges */
.rcm-rank {
	width: 40px;
	height: 40px;
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	font-weight: 900;
	font-size: 15px;
}

.rcm-rank-1 {
	background: linear-gradient(135deg, #fff1bf, var(--gold));
	color: #2c1a00;
	box-shadow: 0 8px 20px rgba(245, 199, 107, 0.35);
}

.rcm-rank-2 {
	background: linear-gradient(135deg, #e8e8e8, #b0b0b0);
	color: #333;
	box-shadow: 0 6px 16px rgba(176, 176, 176, 0.25);
}

.rcm-rank-3 {
	background: linear-gradient(135deg, #e8c4a0, #b87333);
	color: #3a2010;
	box-shadow: 0 6px 16px rgba(184, 115, 51, 0.25);
}

.rcm-rank-default {
	background: rgba(255, 255, 255, 0.06);
	color: var(--muted);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Top row highlight */
.rcm-row-top1 {
	background: linear-gradient(90deg, rgba(245, 199, 107, 0.10), transparent 60%);
}

.rcm-row-top2 {
	background: linear-gradient(90deg, rgba(192, 192, 192, 0.06), transparent 60%);
}

.rcm-row-top3 {
	background: linear-gradient(90deg, rgba(184, 115, 51, 0.06), transparent 60%);
}

/* Rank Change Indicators */
.rcm-rank-up {
	color: var(--success);
}

.rcm-rank-down {
	color: var(--danger);
}

.rcm-rank-same {
	color: var(--muted);
}

.rcm-rank-indicator {
	font-size: 11px;
	vertical-align: middle;
	margin-left: 4px;
}

/* ---------- Spinner ---------- */

/* ---------- Update Time ---------- */

.rcm-leaderboard-update-time {
	text-align: right;
	font-size: 12px;
	color: var(--muted);
	margin-top: 12px;
}

.rcm-leaderboard-countdown {
	margin-top: 16px;
	padding: 14px 18px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 14px;
	color: var(--text);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 12px;
}

.rcm-leaderboard-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 16px;
}

.rcm-leaderboard-pagination .rcm-btn {
	padding: 10px 18px;
	font-size: 14px;
	border-radius: 10px;
}

.rcm-pagination-status {
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	min-width: 120px;
	text-align: center;
}

.rcm-leaderboard-countdown .rcm-countdown-label {
	font-weight: 600;
	color: var(--gold);
	letter-spacing: 0.02em;
}

.rcm-leaderboard-countdown .rcm-countdown-value {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
	font-size: 18px;
	color: #f5e6c8;
	text-shadow: 0 0 20px rgba(253, 105, 33, 0.25);
}

/* ---------- No Data ---------- */

.rcm-no-data td,
p.rcm-no-data,
p.rcm-message {
	text-align: center;
	color: var(--muted);
	padding: 32px;
	font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* ---- Tablet (960px) ---- */

@media (max-width: 960px) {

	/* Auth: stack to single column */
	.rcm-auth-layout {
		grid-template-columns: 1fr;
		gap: 32px;
		max-width: 560px;
		margin-inline: auto;
	}

	.rcm-auth-copy {
		text-align: center;
		max-width: none;
	}

	.rcm-auth-card {
		min-width: 0;
	}

	.rcm-feature-list {
		justify-content: center;
	}

	/* Leaderboard head stack */
	.rcm-leaderboard-head {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Dashboard table: card layout on tablet */
	.rcm-campaigns-table-wrap .rcm-table thead {
		display: none;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody tr {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px 16px;
		padding: 18px 20px;
		border-bottom: 1px solid var(--line-subtle);
	}

	.rcm-campaigns-table-wrap .rcm-table tbody tr.rcm-referral-form-row {
		display: none !important;
		grid-template-columns: 1fr;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody tr.rcm-referral-form-row.rcm-form-row-open {
		display: grid !important;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody td {
		padding: 0;
		border-bottom: none;
		font-size: 14px;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody td::before {
		content: attr(data-label);
		display: block;
		font-size: 11px;
		font-weight: 800;
		color: rgba(253, 105, 33, 0.7);
		letter-spacing: 0.04em;
		text-transform: uppercase;
		margin-bottom: 2px;
	}

	/* Campaign name spans full width */
	.rcm-campaigns-table-wrap .rcm-table tbody td:first-child {
		grid-column: 1 / -1;
		font-size: 16px;
		font-weight: 700;
		margin-bottom: 4px;
	}

	/* Action button spans full width */
	.rcm-campaigns-table-wrap .rcm-table tbody td:last-child {
		grid-column: 1 / -1;
		margin-top: 4px;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody td:last-child .rcm-btn {
		width: 100%;
		justify-content: center;
	}

	/* Referral form row spans full width */
	.rcm-campaigns-table-wrap .rcm-table tbody tr.rcm-referral-form-row td {
		grid-column: 1 / -1;
	}

	.rcm-campaigns-table-wrap .rcm-table tbody tr.rcm-referral-form-row td::before {
		display: none;
	}
}

/* ---- Small Tablet / Large Phone (768px) ---- */

@media (max-width: 768px) {

	/* Page padding reduction */
	.rcm-campaigns-list,
	.rcm-dashboard,
	.rcm-leaderboard-container {
		padding: 32px 0;
	}

	.rcm-auth-page {
		min-height: auto;
		padding: 32px 0;
	}

	/* Campaign grid: single column */
	.rcm-campaigns-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	/* Auth cards */
	.rcm-auth-card {
		padding: 24px 20px;
	}

	.rcm-auth-card h3 {
		font-size: 22px;
		margin-bottom: 18px;
	}

	/* OTP card */
	.rcm-otp-card {
		padding: 28px 20px;
	}

	.rcm-otp-card .rcm-section-title {
		font-size: 22px;
	}

	/* Banned card */
	.rcm-banned-card {
		padding: 28px 20px;
	}

	/* Section titles */
	.rcm-section-title {
		font-size: 24px;
	}

	.rcm-section-subtitle {
		font-size: 14px;
	}

	/* Leaderboard table scroll */
	.rcm-leaderboard-table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.rcm-leaderboard-table {
		min-width: 420px;
	}

	.rcm-leaderboard-table thead th,
	.rcm-leaderboard-table tbody td {
		padding: 14px 12px;
		font-size: 13px;
	}

	/* Referral inline form: stack */
	.rcm-referral-form .rcm-form-row {
		flex-direction: column;
		gap: 10px;
	}

	.rcm-referral-form .rcm-form-group {
		min-width: 100%;
	}

	.rcm-referral-form .rcm-form-group-btn {
		flex: 1 1 100%;
	}

	.rcm-referral-submit-btn {
		width: 100%;
	}

	/* Campaign selector: stack */
	.rcm-campaign-selector {
		flex-direction: column;
		align-items: stretch;
	}

	.rcm-campaign-selector .rcm-select {
		min-width: 0;
		width: 100%;
	}

	/* Buttons: slightly smaller */
	.rcm-btn {
		padding: 14px 28px;
		font-size: 16px;
	}

	.rcm-btn-sm {
		padding: 8px 18px;
		font-size: 13px;
	}

	/* Join campaign */
	.rcm-join-campaign > h2 {
		font-size: 24px;
	}

	.rcm-join-form-card {
		padding: 24px 20px;
	}

	/* Dashboard title */
	.rcm-dashboard-section > h3 {
		font-size: 18px;
	}

	/* Existing referrals table */
	.rcm-existing-referrals {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.rcm-table-sm {
		min-width: 380px;
	}

	/* Referral standalone cards */
	.rcm-rules-card,
	.rcm-referral-card,
	.rcm-referral-history-card,
	.rcm-cta-card {
		padding: 24px 20px;
	}

	/* Referral table: card layout on mobile */
	.rcm-referral-table thead {
		display: none;
	}

	.rcm-referral-table tbody tr {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px 16px;
		padding: 16px 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	}

	.rcm-referral-table tbody tr:last-child {
		border-bottom: none;
	}

	.rcm-referral-table tbody td {
		padding: 0;
		border-bottom: none;
	}

	.rcm-referral-table tbody td::before {
		content: attr(data-label);
		display: block;
		font-size: 11px;
		font-weight: 700;
		color: var(--orange);
		text-transform: uppercase;
		letter-spacing: 0.06em;
		margin-bottom: 2px;
	}
}

/* ---- Phone (480px) ---- */

@media (max-width: 480px) {

	/* Tighter container margins */
	.rcm-campaigns-list,
	.rcm-dashboard,
	.rcm-leaderboard-container {
		width: min(100% - 24px, var(--container));
	}

	.rcm-auth-layout {
		width: min(100% - 24px, var(--container));
		gap: 24px;
	}

	.rcm-auth-centered {
		width: min(100% - 24px, 520px);
	}

	.rcm-join-campaign {
		width: min(100% - 24px, 640px);
	}

	/* Auth page: remove min-height, let content flow */
	.rcm-auth-page {
		padding: 24px 0;
	}

	/* Campaign cards */
	.rcm-campaign-card {
		padding: 18px;
		border-radius: var(--radius-lg);
	}

	.rcm-campaign-name {
		font-size: 17px;
	}

	.rcm-campaign-description {
		font-size: 13px;
	}

	.rcm-campaign-meta {
		flex-direction: column;
		gap: 8px;
	}

	/* Campaign card footer: full-width buttons */
	.rcm-campaign-card-footer {
		flex-direction: column;
	}

	.rcm-campaign-card-footer .rcm-btn {
		width: 100%;
		justify-content: center;
	}

	/* Buttons: compact */
	.rcm-btn {
		padding: 12px 20px;
		font-size: 15px;
	}

	.rcm-btn-sm {
		padding: 8px 14px;
		font-size: 12px;
	}

	/* Auth cards */
	.rcm-auth-card {
		padding: 20px 16px;
	}

	.rcm-auth-card h3 {
		font-size: 20px;
	}

	.rcm-auth-form input[type="text"],
	.rcm-auth-form input[type="email"],
	.rcm-auth-form input[type="password"] {
		height: 46px;
		font-size: 14px;
	}

	/* OTP */
	.rcm-otp-card {
		padding: 24px 16px;
	}

	.rcm-otp-input-single {
		max-width: 200px;
		height: 52px;
		font-size: 24px;
		letter-spacing: 0.4em;
	}

	.rcm-otp-instruction {
		font-size: 13px;
	}

	/* Banned */
	.rcm-banned-card {
		padding: 24px 16px;
		max-width: none;
	}

	.rcm-banned-icon {
		width: 52px;
		height: 52px;
		font-size: 22px;
	}

	/* Section titles */
	.rcm-section-title {
		font-size: 22px;
	}

	/* Feature list */
	.rcm-feature-list {
		gap: 8px;
	}

	.rcm-feature-list li {
		padding: 8px 12px;
		font-size: 12px;
	}

	/* Eyebrow */
	.rcm-eyebrow {
		font-size: 10px;
		letter-spacing: 0.14em;
	}

	/* Dashboard */
	.rcm-dashboard > h2 {
		font-size: 22px;
	}

	.rcm-dashboard-section > h3 {
		font-size: 16px;
		margin-bottom: 14px;
	}

	/* Rank badges: smaller */
	.rcm-rank {
		width: 32px;
		height: 32px;
		font-size: 13px;
	}

	.rcm-col-rank {
		width: 50px;
	}

	.rcm-col-count {
		width: 70px;
	}

	/* Tables: tighter padding */
	.rcm-table thead th,
	.rcm-table tbody td {
		padding: 10px 12px;
		font-size: 13px;
	}

	/* Join campaign */
	.rcm-join-campaign > h2 {
		font-size: 22px;
	}

	.rcm-join-form-card {
		padding: 20px 16px;
	}

	.rcm-fieldset legend {
		font-size: 14px;
	}

	.rcm-form-input,
	.rcm-form-select {
		height: 46px;
		font-size: 14px;
	}

	/* Submit referral inline */
	.rcm-submit-referral {
		padding: 14px;
	}

	.rcm-referral-form .rcm-input,
	.rcm-referral-form .rcm-select {
		height: 40px;
		font-size: 13px;
	}

	/* Messages */
	.rcm-message,
	.rcm-notice {
		padding: 10px 14px;
		font-size: 13px;
	}

	/* Badges */
	.rcm-badge {
		min-height: 24px;
		padding: 0 8px;
		font-size: 11px;
	}

	/* Grid overlay: reduce visibility on mobile */
	body.rcm-page::before {
		opacity: 0.4;
	}

	/* Leaderboard update time */
	.rcm-leaderboard-update-time {
		text-align: center;
	}
}

/* ---- Small Phone (360px) ---- */

@media (max-width: 360px) {

	.rcm-campaigns-list,
	.rcm-dashboard,
	.rcm-leaderboard-container {
		width: min(100% - 16px, var(--container));
	}

	.rcm-auth-layout {
		width: min(100% - 16px, var(--container));
	}

	.rcm-auth-centered {
		width: min(100% - 16px, 520px);
	}

	.rcm-join-campaign {
		width: min(100% - 16px, 640px);
	}

	.rcm-auth-card,
	.rcm-otp-card,
	.rcm-banned-card,
	.rcm-join-form-card {
		padding: 16px 12px;
	}

	.rcm-campaign-card {
		padding: 14px;
	}

	.rcm-btn {
		padding: 10px 16px;
		font-size: 14px;
	}

	.rcm-section-title {
		font-size: 20px;
	}

	.rcm-otp-input-single {
		max-width: 180px;
		height: 48px;
		font-size: 22px;
		letter-spacing: 0.3em;
	}

	.rcm-auth-form {
		gap: 12px;
	}
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes rcm-fade-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes rcm-slide-up {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes rcm-glow-pulse {
	0%, 100% {
		box-shadow:
			var(--shadow-inset-glow),
			0 0 20px rgba(253, 105, 33, 0.08);
	}
	50% {
		box-shadow:
			var(--shadow-inset-glow),
			0 0 30px rgba(253, 105, 33, 0.18);
	}
}

.rcm-animate-in {
	animation: rcm-fade-in 0.5s ease forwards;
}

.rcm-campaign-card {
	animation: rcm-fade-in 0.4s ease both;
}

.rcm-campaign-card:nth-child(2) { animation-delay: 0.08s; }
.rcm-campaign-card:nth-child(3) { animation-delay: 0.16s; }
.rcm-campaign-card:nth-child(4) { animation-delay: 0.24s; }
.rcm-campaign-card:nth-child(5) { animation-delay: 0.32s; }
.rcm-campaign-card:nth-child(6) { animation-delay: 0.40s; }

.rcm-auth-card,
.rcm-otp-card,
.rcm-banned-card {
	animation: rcm-slide-up 0.5s ease both;
}

.rcm-glass-card {
	animation: rcm-glow-pulse 4s ease-in-out infinite;
}

/* My Rank Badge */
.rcm-my-rank-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 2px solid #ffd700;
  border-radius: 12px;
  padding: 12px 20px;
  min-width: 100px;
}

.rcm-my-rank-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffd700;
  margin-bottom: 4px;
}

.rcm-my-rank-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

@media (max-width: 768px) {
  .rcm-leaderboard-head {
    flex-direction: column;
    text-align: center;
  }
  
  .rcm-my-rank-badge {
    margin-top: 16px;
  }
}

/* Leaderboard Cards on Mobile */
@media (max-width: 600px) {
  .rcm-leaderboard-table-wrap {
    overflow: visible;
  }
  
  .rcm-leaderboard-table {
    display: block;
    min-width: auto;
  }
  
  .rcm-leaderboard-table thead {
    display: none;
  }
  
  .rcm-leaderboard-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .rcm-leaderboard-table tbody tr {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 0;
  }
  
  .rcm-leaderboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .rcm-leaderboard-table tbody tr.rcm-lb-detail-row {
    display: none !important;
  }

  .rcm-leaderboard-table tbody tr.rcm-lb-detail-row.is-open {
    display: flex !important;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 12px 16px 16px;
  }

  .rcm-leaderboard-table tbody tr.rcm-lb-detail-row.is-open td {
    border-bottom: none;
    padding: 0;
  }

  .rcm-leaderboard-table tbody tr.rcm-lb-detail-row.is-open td:first-child {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .rcm-leaderboard-table tbody tr.rcm-lb-detail-row.is-open td:first-child::before {
    display: none;
  }
  
  .rcm-leaderboard-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
  }
  
  .rcm-leaderboard-table tbody td:last-child {
    border-bottom: none;
  }
  
  .rcm-leaderboard-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #ffd700;
    font-size: 12px;
    text-transform: uppercase;
  }
  
  .rcm-leaderboard-table tbody td:first-child {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 12px;
    margin-bottom: 8px;
  }
  
  .rcm-leaderboard-table tbody td:first-child::before {
    display: none;
  }
}

/* Referral Table Cards on Mobile */
@media (max-width: 600px) {
  .rcm-referral-table-wrap {
    overflow: visible;
  }
  
  .rcm-referral-table {
    display: block;
    min-width: auto;
  }
  
  .rcm-referral-table thead {
    display: none;
  }
  
  .rcm-referral-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .rcm-referral-table tbody tr {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
  }
  
  .rcm-referral-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
  }
  
  .rcm-referral-table tbody td::before {
    content: attr(data-label);
    color: #888;
    font-size: 11px;
    text-transform: uppercase;
  }
  
  .rcm-referral-table tbody td:first-child {
    font-weight: 600;
    color: #ffd700;
  }
}

/* Referral Cards - Card Layout */
.rcm-referral-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rcm-referral-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.rcm-referral-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 215, 0, 0.5);
}

.rcm-referral-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.rcm-referral-row .rcm-referral-value {
  font-size: 15px;
  font-weight: 650;
  color: #fff;
  word-break: break-all;
  min-width: 0;
}

.rcm-referral-row .rcm-referral-time {
  font-size: 12px;
  color: #aaa;
  white-space: nowrap;
}

.rcm-referral-number {
  font-size: 13px;
  font-weight: 700;
  color: #ffd700;
}

.rcm-referral-row .rcm-delete-referral {
  background: rgba(255, 0, 0, 0.15);
  border: none;
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: #ff6b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rcm-referral-row .rcm-delete-referral:hover {
  background: rgba(255, 0, 0, 0.3);
  color: #fff;
}

/* Mobile optimized cards */
@media (max-width: 600px) {
  .rcm-referral-cards {
    gap: 10px;
  }
  
  .rcm-referral-card {
    padding: 14px;
  }

  .rcm-referral-row {
    grid-template-columns: auto 1fr;
    grid-auto-rows: minmax(0, auto);
    row-gap: 8px;
  }

  .rcm-referral-row .rcm-referral-time {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .rcm-referral-row .rcm-delete-referral {
    justify-self: end;
  }

  .rcm-referral-number {
    font-size: 14px;
  }

  .rcm-referral-time {
    font-size: 11px;
  }
}

/* ==========================================================================
   Prize column on the leaderboard
   ========================================================================== */

.rcm-leaderboard-table .rcm-col-prize {
	min-width: 160px;
}

.rcm-prize-list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.rcm-prize-pill {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	line-height: 1.4;
	color: #1d2327;
	background: linear-gradient(135deg, #f5e6c8 0%, #e6c98c 100%);
	border-radius: 999px;
	white-space: nowrap;
	box-shadow: 0 0 6px rgba(253, 105, 33, 0.18);
}

.rcm-lb-placeholder-row .rcm-placeholder-name {
	color: var(--muted);
	font-style: italic;
	letter-spacing: 0.04em;
}

.rcm-lb-placeholder-row td {
	opacity: 0.92;
}

@media (max-width: 600px) {
	.rcm-leaderboard-table tbody td.rcm-col-prize {
		display: block;
		padding: 10px 0;
	}

	.rcm-leaderboard-table tbody td.rcm-col-prize::before {
		display: block;
		margin-bottom: 6px;
	}

	.rcm-leaderboard-table tbody td.rcm-col-prize .rcm-prize-pill {
		max-width: 100%;
		white-space: normal;
		word-break: break-word;
	}
}

