@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --rbx-bg-base: #0e1015;
  --rbx-bg-card: #161821;
  --rbx-bg-card-hover: #1d202c;
  --rbx-bg-elevated: #222634;
  --rbx-border: #282c3c;
  --rbx-border-highlight: #383e54;
  --rbx-text-primary: #f3f4f6;
  --rbx-text-secondary: #9ca3af;
  --rbx-text-muted: #6b7280;
  
  --status-ingame: #f59e0b;
  --status-ingame-soft: rgba(245, 158, 11, 0.15);
  --status-ingame-border: rgba(245, 158, 11, 0.4);
  
  --status-online: #10b981;
  --status-online-soft: rgba(16, 185, 129, 0.15);
  --status-online-border: rgba(16, 185, 129, 0.4);
  
  --status-studio: #a855f7;
  --status-studio-soft: rgba(168, 85, 247, 0.15);
  --status-studio-border: rgba(168, 85, 247, 0.4);

  --status-offline: #6b7280;
  --status-offline-soft: rgba(107, 114, 128, 0.15);
  --status-offline-border: rgba(107, 114, 128, 0.3);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --rbx-radius-sm: 6px;
  --rbx-radius-md: 10px;
  --rbx-radius-lg: 16px;
  --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
  --font-sans: 'Prompt', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: clip;
}

body {
  background-color: var(--rbx-bg-base);
  color: var(--rbx-text-primary);
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button, .btn {
  font-family: inherit;
}

code, pre {
  font-family: var(--font-mono, monospace);
}

.rbx-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* Header */
.rbx-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-lg);
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.rbx-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rbx-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--rbx-radius-md);
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(225, 29, 72, 0.35);
  font-size: 1.4rem;
}

.rbx-brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rbx-brand-text .channel-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.15);
  color: #5865f2;
  border: 1px solid rgba(88, 101, 242, 0.35);
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}

.rbx-brand-text p {
  font-size: 0.82rem;
  color: var(--rbx-text-secondary);
}

.rbx-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-sans) !important;
}

.rbx-header-controls *,
.btn-control,
.select-control,
.select-control option,
.chart-tab-btn,
.filter-pill,
.rbx-modal-close,
#userSearchInput {
  font-family: var(--font-sans) !important;
}

.btn-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--rbx-radius-sm, 6px);
  background: var(--rbx-bg-elevated);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-primary);
  font-family: var(--font-sans) !important;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-control:hover {
  background: var(--rbx-bg-card-hover);
  border-color: var(--rbx-border-highlight);
  color: #fff;
}

.btn-control.primary {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 2px 10px rgba(225, 29, 72, 0.3);
}

.select-control {
  padding: 8px 12px;
  border-radius: var(--rbx-radius-sm, 6px);
  background: var(--rbx-bg-elevated);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-primary);
  font-family: var(--font-sans) !important;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

.select-control option {
  background-color: var(--rbx-bg-elevated);
  color: var(--rbx-text-primary);
  font-family: var(--font-sans) !important;
}

/* Stat Cards Grid */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--rbx-border-highlight);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--rbx-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2px;
}

.chart-tab-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  margin-right: 4px;
}

.search-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2px;
}

.rbx-logo-badge svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.2px;
}

.stat-icon.gold {
  background: var(--status-ingame-soft);
  color: var(--status-ingame);
}

.stat-icon.green {
  background: var(--status-online-soft);
  color: var(--status-online);
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-icon.purple {
  background: var(--status-studio-soft);
  color: var(--status-studio);
}

.stat-body {
  flex: 1;
  min-width: 0;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--rbx-text-secondary);
  font-weight: 500;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-subtext {
  font-size: 0.72rem;
  color: var(--rbx-text-muted);
  margin-top: 2px;
}

/* Charts Card */
.chart-section-card {
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.chart-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chart-title-group h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-title-group p {
  font-size: 0.8rem;
  color: var(--rbx-text-secondary);
}

.chart-tabs-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.chart-tab-btn {
  padding: 8px 16px;
  border-radius: var(--rbx-radius-sm);
  background: var(--rbx-bg-elevated);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-tab-btn:hover {
  background: var(--rbx-bg-card-hover);
  color: #fff;
}

.chart-tab-btn.active {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border-color: #f43f5e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  margin-top: 10px;
}

/* Two Columns: Discord Feed & Active Players Spotlight */
.content-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.feed-card {
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.feed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rbx-border);
}

.feed-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feed-items-list::-webkit-scrollbar,
#discordFeedContainer::-webkit-scrollbar,
#activePlayersContainer::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Discord Embed Item */
.discord-embed-card {
  background: #2b2d31;
  border-radius: 4px 8px 8px 4px;
  border-left: 4px solid #5865f2;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.discord-embed-card:hover {
  transform: translateX(3px);
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.embed-author-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.embed-author-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #dbdee1;
  text-decoration: none;
}

.embed-author-name:hover {
  text-decoration: underline;
  color: #fff;
}

.embed-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.embed-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.embed-field {
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 10px;
  border-radius: 4px;
}

.embed-field.full-width {
  grid-column: 1 / -1;
}

.embed-field-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #b5bac1;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.embed-field-value {
  font-size: 0.85rem;
  color: #f2f3f5;
  line-height: 1.4;
  word-break: break-word;
}

.embed-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #949ba4;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Active In-Game Spotlight Items */
.active-player-item {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  min-height: 72px;
  background: linear-gradient(135deg, rgba(32, 36, 46, 0.95) 0%, rgba(20, 23, 31, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 4px solid var(--status-ingame);
  border-radius: 12px;
  padding: 13px 18px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              background 0.2s ease;
  position: relative;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.active-player-item:hover {
  transform: translateX(4px) scale(1.01);
  border-color: rgba(245, 158, 11, 0.6);
  border-left-color: #fbbf24;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2), 0 2px 8px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, rgba(40, 45, 58, 0.98) 0%, rgba(26, 30, 40, 0.98) 100%);
}

.active-player-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--status-ingame);
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.active-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.active-player-name {
  font-size: 0.96rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.active-player-name:hover {
  color: var(--status-ingame);
}

.active-player-game {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.active-player-time {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Presence Board Table Section */
.board-section-card {
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}

.board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 14px;
  flex-wrap: wrap;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--rbx-bg-elevated);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  background: var(--rbx-bg-card-hover);
  color: #fff;
}

.filter-pill.active {
  background: #e11d48;
  border-color: #f43f5e;
  color: #fff;
}

.search-box {
  position: relative;
  width: 280px;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border-radius: var(--rbx-radius-sm);
  background: var(--rbx-bg-elevated);
  border: 1px solid var(--rbx-border);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.search-box input:focus {
  border-color: #e11d48;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rbx-text-muted);
  font-size: 0.9rem;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) rgba(15, 17, 23, 0.7);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(15, 17, 23, 0.7);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.rbx-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.rbx-table th {
  background: var(--rbx-bg-elevated);
  padding: 12px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rbx-text-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--rbx-border);
  white-space: nowrap;
}

.rbx-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rbx-border);
  color: var(--rbx-text-primary);
  vertical-align: middle;
  white-space: nowrap;
}

.rbx-table tr:hover td {
  background: var(--rbx-bg-card-hover);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #111;
}

.user-names {
  display: flex;
  flex-direction: column;
}

.user-display-name {
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.user-display-name:hover {
  text-decoration: underline;
  color: #fb7185;
}

.user-handle {
  font-size: 0.76rem;
  color: var(--rbx-text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge.ingame {
  background: var(--status-ingame-soft);
  color: var(--status-ingame);
  border: 1px solid var(--status-ingame-border);
}

.status-badge.online {
  background: var(--status-online-soft);
  color: var(--status-online);
  border: 1px solid var(--status-online-border);
}

.status-badge.studio {
  background: var(--status-studio-soft);
  color: var(--status-studio);
  border: 1px solid var(--status-studio-border);
}

.status-badge.offline {
  background: var(--status-offline-soft);
  color: var(--status-offline);
  border: 1px solid var(--status-offline-border);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-badge.ingame .status-dot {
  background: var(--status-ingame);
  box-shadow: 0 0 6px var(--status-ingame);
}

.status-badge.online .status-dot {
  background: var(--status-online);
  box-shadow: 0 0 6px var(--status-online);
}

.status-badge.studio .status-dot {
  background: var(--status-studio);
}

.status-badge.offline .status-dot {
  background: var(--status-offline);
}

.empty-notice {
  text-align: center;
  padding: 36px 20px;
  color: var(--rbx-text-muted);
}

/* Playtime Pills */
.playtime-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
}

.playtime-pill.day {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.playtime-pill.week {
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.playtime-pill.month {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-profile-peek {
  background: #232734;
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-secondary);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-profile-peek:hover {
  background: #e11d48;
  color: #fff;
  border-color: #f43f5e;
}

/* Activity Profile Modal */
.rbx-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rbx-modal-card {
  background: #181b24;
  border: 1px solid #2e3547;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rbx-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--rbx-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.rbx-modal-close:hover {
  color: #fff;
}

.rbx-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.m-avatar {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 2px solid #363e52;
  object-fit: cover;
  background: #111;
}

.m-dname {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.m-uname {
  font-size: 0.85rem;
  color: var(--rbx-text-secondary);
}

.m-uid {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 3px;
  color: #94a3b8;
}

.m-playtime-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #12141c;
  border-radius: 8px;
  padding: 12px;
  border: 1px solid #242938;
  text-align: center;
}

.m-stat-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-label {
  font-size: 0.7rem;
  color: var(--rbx-text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.m-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.highlight-gold { color: #f59e0b; }
.highlight-purple { color: #c084fc; }

.m-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-sec-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #cbd5e1;
}

.m-sec-content {
  font-size: 0.82rem;
  color: var(--rbx-text-secondary);
  background: #12141c;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #242938;
}

.m-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.m-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  padding: 6px 10px;
  background: #12141c;
  border-radius: 6px;
  border: 1px solid #242938;
}

.m-sess-time {
  color: #94a3b8;
  font-weight: 600;
}

.m-sess-loc {
  color: var(--status-ingame);
  font-weight: 600;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rbx-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--rbx-text-muted);
  margin-top: 30px;
}

/* 🎨 Roblox Profile Widget Studio */
.widget-studio-card {
  background: var(--rbx-bg-card);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-lg);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: var(--shadow);
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
}

.widget-studio-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rbx-border);
}

.head-icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.widget-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  border-radius: 9999px;
}

.widget-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 🎛️ Left Column: Control Panel Steps */
.widget-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.widget-step-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease;
}

.widget-step-box:focus-within {
  border-color: rgba(16, 185, 129, 0.4);
}

.step-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.72rem;
  font-weight: 700;
}

.step-title label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rbx-text-primary);
  margin: 0;
  cursor: pointer;
}

.widget-input-wrapper {
  display: flex;
  gap: 8px;
  position: relative;
}

.input-icon-wrap {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rbx-text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.widget-input-wrapper input {
  flex: 1;
  background: var(--rbx-bg-base);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-md);
  padding: 10px 14px 10px 34px;
  color: var(--rbx-text-primary);
  font-size: 0.88rem;
  transition: all 0.2s;
}

.widget-input-wrapper input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.quick-user-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.quick-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-sm);
  color: var(--rbx-text-secondary);
  font-size: 0.74rem;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.quick-chip:hover {
  border-color: rgba(16, 185, 129, 0.4);
  color: #fff;
  background: rgba(16, 185, 129, 0.08);
}

.quick-chip.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #34d399;
  font-weight: 600;
}

.widget-themes-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.widget-theme-btn {
  padding: 6px 12px;
  border-radius: var(--rbx-radius-md);
  background: var(--rbx-bg-base);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.widget-theme-btn:hover {
  border-color: var(--rbx-border-highlight);
  color: var(--rbx-text-primary);
}

.widget-theme-btn.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #10b981;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.widget-status-note {
  font-size: 0.8rem;
  min-height: 18px;
  color: #10b981;
}

/* 🎨 Custom Color Box */
.widget-custom-color-box {
  background: var(--rbx-bg-base);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.custom-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.custom-color-item {
  flex: 1 1 180px;
  min-width: 0;
  box-sizing: border-box;
}

.custom-color-item label {
  display: block;
  font-size: 0.74rem;
  color: var(--rbx-text-secondary);
  margin-bottom: 4px;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: var(--rbx-radius-sm);
  border: 1px solid var(--rbx-border);
  box-sizing: border-box;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.color-picker-wrapper:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(16, 185, 129, 0.45);
}

.color-picker-wrapper:focus-within {
  border-color: var(--rbx-mint);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.color-picker-wrapper input[type="color"] {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  padding: 0;
  flex-shrink: 0;
}

.color-hex-val {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--rbx-text-primary);
  background: transparent;
  border: none;
  outline: none;
  width: 65px;
  padding: 1px 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: text;
}

.color-hex-val:focus {
  color: var(--rbx-mint);
  background: rgba(16, 185, 129, 0.08);
  border-radius: 3px;
}

/* 🎛️ Full-Width 1-Column Control Grid for Sliders & Precision Controls */
.custom-control-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* 🫧 Custom Opacity Control Box */
.custom-opacity-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--rbx-radius-sm);
  padding: 9px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.custom-opacity-box:hover {
  border-color: rgba(16, 185, 129, 0.25);
}

.custom-opacity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.custom-opacity-header label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--rbx-text-secondary);
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  min-width: 0;
  word-break: break-word;
  flex: 1 1 auto;
}

.opacity-val-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--rbx-mint);
  border: 1px solid rgba(16, 185, 129, 0.28);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.opacity-slider-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 0;
}

.opacity-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(16, 185, 129, 0.6) 100%);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.opacity-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.opacity-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.9);
}

.opacity-range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.opacity-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0 4px 0;
  width: 100%;
  box-sizing: border-box;
}

.opacity-presets::-webkit-scrollbar {
  display: none;
}

.opacity-preset-chip {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--rbx-text-secondary);
  border: 1px solid var(--rbx-border);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.opacity-preset-chip:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.35);
}

.opacity-preset-chip.active {
  background: rgba(16, 185, 129, 0.22);
  color: var(--rbx-mint);
  border-color: rgba(16, 185, 129, 0.5);
  font-weight: 600;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.custom-preset-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.color-preset-chip {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.color-preset-chip:hover {
  transform: scale(1.2);
  border-color: #fff;
}

/* 🏷️ Custom Section Divider Label */
.custom-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--rbx-mint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.16);
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
}

.custom-section-label:first-child {
  margin-top: 0;
}

.custom-color-row-3 {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.custom-color-row-3 .custom-color-item {
  flex: 1 1 120px;
  min-width: 0;
  box-sizing: border-box;
}

.custom-color-row-3 .color-picker-wrapper {
  padding: 3px 6px;
  gap: 6px;
  box-sizing: border-box;
  min-width: 0;
}

.custom-color-row-3 .color-picker-wrapper input[type="color"] {
  width: 22px;
  height: 22px;
}

.custom-color-row-3 .color-hex-val {
  font-size: 0.7rem;
}

/* 📐 Custom Corner Radius Box */
.custom-radius-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--rbx-radius-sm);
  padding: 9px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.custom-radius-box:hover {
  border-color: rgba(16, 185, 129, 0.25);
}

.custom-radius-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
}

.custom-radius-header label:not(.switch-toggle-label) {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--rbx-text-secondary);
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  min-width: 0;
  word-break: break-word;
  flex: 1 1 auto;
}

.radius-val-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--rbx-mint);
  border: 1px solid rgba(16, 185, 129, 0.28);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.deg-number-input::-webkit-inner-spin-button,
.deg-number-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.deg-number-input {
  -moz-appearance: textfield;
}

.radius-slider-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 4px 0;
}

.radius-range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(16, 185, 129, 0.6) 100%);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.radius-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.radius-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.9);
}

.radius-range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.radius-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0 4px 0;
  width: 100%;
  box-sizing: border-box;
}

.radius-presets::-webkit-scrollbar {
  display: none;
}

.radius-preset-chip {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--rbx-text-secondary);
  border: 1px solid var(--rbx-border);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.radius-preset-chip:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.35);
}

.radius-preset-chip.active {
  background: rgba(16, 185, 129, 0.22);
  color: var(--rbx-mint);
  border-color: rgba(16, 185, 129, 0.5);
  font-weight: 600;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

/* 🎨 Pro Palette Grid */
.custom-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.color-palette-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--rbx-radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rbx-border);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.color-palette-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.color-palette-btn.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--rbx-mint);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.palette-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.palette-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rbx-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🎛️ Detailed Custom Control Helpers */
.custom-color-row-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.custom-chip-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.custom-chip-btn {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--rbx-text-secondary);
  border: 1px solid var(--rbx-border);
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-chip-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.35);
}

.custom-chip-btn.active {
  background: rgba(16, 185, 129, 0.22);
  color: var(--rbx-mint);
  border-color: rgba(16, 185, 129, 0.5);
  font-weight: 600;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.custom-text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rbx-border);
  border-radius: var(--rbx-radius-sm);
  color: var(--rbx-text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 5px 8px;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-text-input:focus {
  border-color: var(--rbx-mint);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

/* 🎚️ Modern Switch Toggle (iOS Pill Style) */
.switch-toggle-label {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-end !important;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 0.76rem;
  color: #cbd5e1;
  transition: color 0.2s ease;
  margin-left: auto !important;
  flex: 0 0 auto !important;
  flex-shrink: 0 !important;
}

.switch-toggle-label:hover {
  color: #ffffff;
}

.switch-toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  margin: 0;
}

.switch-toggle-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.switch-toggle-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
}

.switch-toggle-label:hover .switch-toggle-slider {
  border-color: rgba(255, 255, 255, 0.4);
}

.switch-toggle-label input[type="checkbox"]:checked + .switch-toggle-slider {
  background: var(--rbx-mint, #10b981);
  border-color: var(--rbx-mint, #10b981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.switch-toggle-label input[type="checkbox"]:checked + .switch-toggle-slider::before {
  transform: translateX(14px);
  background: #ffffff;
}

.switch-toggle-label input[type="checkbox"]:focus-visible + .switch-toggle-slider {
  outline: 2px solid var(--rbx-mint, #10b981);
  outline-offset: 2px;
}

.switch-toggle-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.switch-toggle-label:hover .switch-toggle-text {
  color: #ffffff;
}

.switch-toggle-label input[type="checkbox"]:checked ~ .switch-toggle-text {
  color: var(--rbx-mint, #10b981);
}

/* 🔘 Stat Toggles Grid */
/* 🔘 Stat Toggles Grid — Modern Interactive Switch Cards */
.widget-toggles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 600px) {
  .widget-toggles-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.widget-toggle-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--rbx-radius-md, 12px);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.widget-toggle-chip.span-full {
  grid-column: 1 / -1;
}

.widget-toggle-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.widget-toggle-chip:active {
  transform: scale(0.985);
}

.widget-toggle-chip:focus-within {
  outline: 2px solid var(--rbx-mint, #10b981);
  outline-offset: 2px;
}

/* Active card state via :has() */
.widget-toggle-chip:has(input[type="checkbox"]:checked) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 30, 0.85) 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), 0 0 1px rgba(16, 185, 129, 0.4);
}

.widget-toggle-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Left Content Area */
.toggle-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

/* Icon Badges with distinct chromatic identity */
.toggle-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
  transition: all 0.22s ease;
}

.toggle-icon-badge svg,
.toggle-icon-badge i {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.toggle-icon-badge.icon-friends {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
}

.toggle-icon-badge.icon-followers {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: #38bdf8;
}

.toggle-icon-badge.icon-following {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #818cf8;
}

.toggle-icon-badge.icon-presence {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.toggle-icon-badge.icon-watermark {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.28);
  color: #c084fc;
}

/* Inactive Icon Dimming */
.widget-toggle-chip:not(:has(input[type="checkbox"]:checked)) .toggle-icon-badge {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #64748b;
  opacity: 0.65;
  filter: grayscale(35%);
}

/* Text Hierarchy */
.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.toggle-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: color 0.2s ease;
}

.toggle-subtitle {
  font-size: 0.68rem;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.2;
  transition: color 0.2s ease;
}

.widget-toggle-chip:not(:has(input[type="checkbox"]:checked)) .toggle-title {
  color: #94a3b8;
}

.widget-toggle-chip:not(:has(input[type="checkbox"]:checked)) .toggle-subtitle {
  color: #64748b;
}

/* Sibling fallbacks for non-:has browsers */
.widget-toggle-chip input[type="checkbox"]:checked ~ .toggle-card-left .toggle-title {
  color: #ffffff;
}

.widget-toggle-chip input[type="checkbox"]:checked ~ .switch-toggle-slider {
  background: var(--rbx-mint, #10b981);
  border-color: var(--rbx-mint, #10b981);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.45);
}

.widget-toggle-chip input[type="checkbox"]:checked ~ .switch-toggle-slider::before {
  transform: translateX(14px);
  background: #ffffff;
}

/* Right Switch Slider */
.widget-toggle-chip .switch-toggle-slider {
  margin-left: auto;
  flex-shrink: 0;
}

/* Badge for Step 3 Active Items Count */
.step-subtitle-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.step-subtitle-badge.has-hidden {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

/* Backward compatibility fallbacks */
.widget-toggle-chip .toggle-indicator {
  display: none;
}
.widget-toggle-chip .toggle-text {
  font-size: 0.8rem;
}

/* 🖼️ Right Column: Preview & Stage Canvas */
.widget-preview-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1061px) {
  .widget-preview-col {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    align-self: start;
    z-index: 10;
  }
}

.preview-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.preview-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rbx-text-secondary);
}

.preview-mode-tabs {
  display: none !important; /* ปิดไว้ก่อนชั่วคราว เน้นพรีวิวสดเคลื่อนไหว (Live) ก่อน */
  gap: 6px;
}

.preview-tab-btn {
  display: none !important; /* ปิดไว้ก่อนชั่วคราว เน้นพรีวิวสดเคลื่อนไหว (Live) ก่อน เก็บไว้พัฒนาต่อ */
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: var(--rbx-radius-sm);
  background: var(--rbx-bg-base);
  border: 1px solid var(--rbx-border);
  color: var(--rbx-text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.preview-tab-btn:hover {
  color: var(--rbx-text-primary);
  border-color: var(--rbx-border-highlight);
}

.preview-tab-btn.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #fff;
  font-weight: 600;
}

.resolution-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

/* 🎪 Studio Canvas Stage */
.widget-preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  background: radial-gradient(circle at 50% 35%, rgba(16, 185, 129, 0.12) 0%, rgba(10, 14, 18, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--rbx-radius-lg);
  padding: 40px 14px 20px 14px;
  min-height: 260px;
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 36px rgba(0, 0, 0, 0.45);
}

/* 🪪 Live Card Mockup (Mint HD Design) */
.live-card-mockup {
  --card-font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-family: var(--card-font-family);
  width: 100%;
  max-width: 540px;
  height: 240px;
  border-radius: 18px;
  position: relative;
  overflow: visible;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  flex-shrink: 0;
}

.live-card-dname,
.live-card-uname,
.live-card-metric-col,
.live-card-watermark,
.live-card-game-tag {
  font-family: var(--card-font-family, inherit);
}

.widget-card-img {
  max-width: 540px;
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 240;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 12px 36px rgba(0, 0, 0, 0.6));
  transition: opacity 0.3s ease;
}

.live-card-banner {
  height: 76px;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  flex-shrink: 0;
  position: relative;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  overflow: hidden;
  transition: background 0.3s ease;
}

.live-card-watermark {
  position: absolute;
  top: 10px;
  right: 14px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.live-card-body {
  flex: 1;
  padding: 0 20px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.live-card-avatar-wrap {
  position: absolute;
  top: var(--avatar-top, -60px);
  left: var(--avatar-left, 18px);
  width: var(--avatar-size, 124px);
  height: var(--avatar-size, 124px);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: var(--avatar-bg, #1e293b);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s ease, background 0.3s ease;
  overflow: visible;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-card-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-sizing: border-box;
  background: transparent;
}

.live-card-presence-dot {
  position: absolute;
  bottom: var(--dot-bottom, 2px);
  right: var(--dot-right, 2px);
  width: var(--dot-size, 22px);
  height: var(--dot-size, 22px);
  border-radius: 50%;
  border: 3px solid #12161f;
  background: #10b981;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  transition: all 0.3s;
  z-index: 40;
}

.live-card-user-info {
  margin-left: var(--text-margin-left, 136px);
  margin-top: var(--text-margin-top, -46px);
  min-width: 0;
  max-width: calc(100% - var(--text-margin-left, 136px));
}

.live-card-dname {
  font-size: var(--dname-font-size, 2.1rem);
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
  transition: color 0.3s;
  max-width: 100%;
  overflow: hidden;
}

#liveCardDnameText {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.live-card-uname {
  font-size: var(--uname-font-size, 1.1rem);
  color: #8e9aa8;
  line-height: 1.25;
  margin-top: var(--uname-gap, 6px);
  transition: color 0.3s, margin-top 0.2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.live-card-game-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: var(--game-tag-gap, 5px);
  font-size: var(--game-tag-size, 0.72rem);
  font-weight: 600;
  padding: var(--game-tag-padding, 2px 8px);
  border-radius: var(--game-tag-radius, 10px);
  background: rgba(0, 176, 255, 0.2);
  color: #00b0ff;
  width: fit-content;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: font-size 0.2s ease, padding 0.2s ease, border-radius 0.2s ease;
}

/* ⌨️ Typewriter Cursor Animation */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: currentColor;
  margin-left: 3px;
  vertical-align: middle;
  animation: typewriter-blink 0.75s infinite;
}

@keyframes typewriter-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 🎮 Presence Status Simulator Bar */
.presence-simulator-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  flex-wrap: wrap;
}

.presence-simulator-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rbx-text-secondary);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.presence-simulator-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.presence-sim-chip {
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--rbx-text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.presence-sim-chip:hover {
  background: rgba(16, 185, 129, 0.12);
  color: #fff;
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.presence-sim-chip.active {
  background: rgba(16, 185, 129, 0.22);
  color: var(--rbx-mint);
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.live-card-stats-grid {
  display: flex;
  align-items: center;
  gap: var(--pills-gap, 10px);
  width: 100%;
  margin-top: var(--pills-margin-top, auto);
  margin-bottom: 0;
}

.live-card-metric-col {
  flex: 0 0 auto;
  min-width: 0;
  height: var(--pill-height, 42px);
  padding: var(--pill-padding, 0 16px);
  border-radius: var(--pill-radius, 21px);
  background: #15212b;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease, height 0.2s ease;
  user-select: none;
  cursor: pointer;
}

.live-card-metric-col:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(16, 185, 129, 0.5) !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

.live-card-metric-col:active {
  transform: scale(0.97);
}

.live-card-metric-col .stat-num,
.live-card-metric-col .stat-num.casino-odometer,
.live-card-metric-col .casino-odometer,
.live-card-metric-col .casino-reel-col,
.live-card-metric-col .casino-reel-track,
.live-card-metric-col .casino-reel-digit,
#widgetLiveCard .stat-num,
#widgetLiveCard .stat-num.casino-odometer,
#widgetLiveCard .casino-odometer,
#widgetLiveCard .casino-reel-col,
#widgetLiveCard .casino-reel-track,
#widgetLiveCard .casino-reel-digit {
  font-family: var(--card-font-family, inherit) !important;
  font-size: var(--pill-num-size, 1rem);
  font-weight: 700;
  color: var(--stat-num-color, #34d399);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.live-card-metric-col .metric-label {
  font-size: var(--pill-lbl-size, 0.88rem);
  color: #94a3b8;
  font-weight: 500;
  line-height: 1;
  margin-top: 0;
}

/* Casino Odometer Styles & Reel Animation */
.casino-odometer {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  line-height: 1.25em !important;
  height: 1.25em !important;
  vertical-align: middle !important;
  font-family: inherit !important;
  font-variant-numeric: tabular-nums !important;
  user-select: none !important;
}

.casino-reel-col {
  display: inline-flex !important;
  flex-direction: column !important;
  height: 1.25em !important;
  overflow: hidden !important;
  position: relative !important;
  vertical-align: middle !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

.casino-reel-track {
  display: flex !important;
  flex-direction: column !important;
  will-change: transform !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

.casino-reel-digit {
  height: 1.25em !important;
  line-height: 1.25em !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
  color: inherit !important;
}

.casino-reel-sep {
  height: 1.25em !important;
  line-height: 1.25em !important;
  padding: 0 1px !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-family: inherit !important;
}

.casino-odometer.spinning .casino-reel-digit {
  filter: blur(0.25px);
}

.casino-odometer.landed {
  animation: casinoLandedPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes casinoLandedPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); text-shadow: 0 0 12px rgba(250, 222, 42, 0.7); }
  100% { transform: scale(1); text-shadow: none; }
}

.widget-card-img {
  max-width: 100%;
  width: 540px;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.widget-card-img:hover {
  transform: translateY(-2px);
}

.widget-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 16, 21, 0.9);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

/* 🚀 Export Actions Hub Underneath Preview */
.widget-export-hub {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.export-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn-control.primary-glow {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.btn-control.primary-glow:hover {
  background: linear-gradient(135deg, #34d399, #10b981);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

.btn-copied {
  background: #10b981 !important;
  color: #fff !important;
  border-color: #10b981 !important;
}

/* 📺 OBS Integration Card */
.obs-integration-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--rbx-radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.obs-card-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.obs-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e0e7ff;
}

.obs-badge {
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  padding: 1px 6px;
  border-radius: 4px;
}

.obs-card-sub {
  font-size: 0.74rem;
  color: #a5b4fc;
  line-height: 1.4;
}

.obs-card-sub code {
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  color: #e0e7ff;
  font-family: var(--font-mono);
}

.obs-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-obs-action {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--rbx-radius-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(139, 92, 246, 0.5);
  color: #e0e7ff;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-obs-action:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.45), rgba(139, 92, 246, 0.5));
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-obs-action.outline {
  background: transparent;
  border-color: rgba(139, 92, 246, 0.35);
  color: #c4b5fd;
}

.btn-obs-action.outline:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #ffffff;
}

@media (max-width: 1060px) {
  .widget-studio-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .widget-preview-col {
    position: static !important;
    top: auto !important;
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-anim {
  animation: spin 1s linear infinite;
}

@media (max-width: 900px) {
  .content-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .rbx-container {
    padding: 12px 10px 40px;
  }
  .widget-studio-card {
    padding: 16px 14px;
  }
  .widget-preview-box {
    padding: 14px 6px;
    justify-content: flex-start;
  }
  .rbx-header {
    flex-direction: column;
    align-items: stretch;
  }
  .rbx-header-controls {
    justify-content: space-between;
  }
  .chart-canvas-wrapper {
    height: 300px;
  }
  .stat-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .m-playtime-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 📥 URL Settings Importer */
.widget-import-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(15, 23, 30, 0.4) 100%);
  border: 1px dashed rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}

.widget-import-box:focus-within {
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}

.step-badge.import-badge {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

.import-tag-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--rbx-text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 2px 8px;
  white-space: nowrap;
}

.btn-control.primary-mint {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #34d399;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.25);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-control.primary-mint:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-control.primary-mint:active {
  transform: translateY(0);
}

.widget-import-feedback {
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: var(--rbx-radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.2s ease-in;
}

.widget-import-feedback.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.widget-import-feedback.warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.widget-import-feedback.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.widget-import-feedback.info {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

/* ⚡ Animation & Replay Button */
.btn-replay-anim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-replay-anim:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-replay-anim:active {
  transform: translateY(0);
}

.type-speed-presets, .roll-duration-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-top: 6px;
  padding-bottom: 2px;
  width: 100%;
  box-sizing: border-box;
}

.type-speed-presets::-webkit-scrollbar,
.roll-duration-presets::-webkit-scrollbar {
  display: none;
}

@media (max-width: 480px) {
  .opacity-preset-chip,
  .radius-preset-chip {
    padding: 3px 6px;
    font-size: 0.67rem;
  }
}

/* 🔤 Font Selector & Upload UI */
.font-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 8px;
  width: 100%;
}

.font-chip-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: #cbd5e1;
  text-align: left;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.font-chip-btn:hover {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.45);
  color: #ffffff;
  transform: translateY(-1px);
}

.font-chip-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3);
}

.font-chip-name {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.font-chip-preview {
  font-size: 0.70rem;
  opacity: 0.75;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.font-upload-dropzone {
  border: 2px dashed rgba(16, 185, 129, 0.35);
  background: rgba(15, 23, 42, 0.45);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.font-upload-dropzone:hover,
.font-upload-dropzone.dragover {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

.font-upload-dropzone input[type="file"] {
  display: none;
}

.font-upload-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-upload-hint {
  font-size: 0.72rem;
  color: #94a3b8;
}

.font-upload-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: none;
  margin-top: 4px;
}

.font-upload-status.success {
  display: inline-block;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.font-upload-status.error {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.font-upload-status.loading {
  display: inline-block;
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.custom-font-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.uploaded-fonts-box {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
}

.uploaded-fonts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  width: 100%;
}
