/* ============================================
   Account Page - IceC Rewards
   ============================================ */

.account-page {
  padding: 84px 20px 60px;
  max-width: 860px;
  margin: 0 auto;
  min-height: calc(100vh - 50px);
}

/* ---- Gate (not logged in) ---- */
.account-not-logged-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 100px 20px;
  text-align: center;
}

.account-gate-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(245, 119, 226, 0.07);
  border: 1px solid rgba(245, 119, 226, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.account-gate-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
}

.account-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* ============================================
   Profile Hero Card
   ============================================ */
.acct-profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.acct-profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 119, 226, 0.5), transparent);
  pointer-events: none;
}

/* Avatar */
.acct-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.acct-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 119, 226, 0.3);
  display: block;
  background: rgba(255,255,255,0.05);
}

.acct-avatar-kick-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #53FC18;
  border: 2px solid #0a0c12;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
}

/* Profile Info */
.acct-profile-info {
  flex: 1;
}

.acct-username {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.acct-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.acct-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.acct-badge-kick {
  background: rgba(83, 252, 24, 0.1);
  border: 1px solid rgba(83, 252, 24, 0.25);
  color: #53FC18;
}

/* Level Block */
.acct-level-block {
  flex-shrink: 0;
  text-align: right;
  min-width: 140px;
}

.acct-level-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.acct-level-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--pink);
  text-shadow: 0 0 20px rgba(245, 119, 226, 0.4);
  line-height: 1;
  margin-bottom: 10px;
}

.acct-xp-bar-wrap {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 5px;
}

.acct-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--pink-dark), var(--pink));
  border-radius: 10px;
  transition: width 0.6s ease;
}

.acct-xp-label {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

.acct-avatar-kick-badge img {
  filter: brightness(0); /* Kick logo PNG rendered black against green circle */
}

.acct-xp-total {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 5px;
  opacity: 0.7;
  position: relative;
  display: inline-block;
  cursor: default;
}

.acct-xp-total-num {
  color: var(--pink);
  font-weight: 700;
}

/* XP tooltip */
.acct-xp-total::after {
  content: 'XP is earned by wagering. Each $1 USD wagered under code IceC equals 1 XP.';
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #1a1b2e;
  border: 1px solid rgba(245, 119, 226, 0.25);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
  letter-spacing: 0.2px;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  white-space: normal;
}

.acct-xp-total::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  right: 16px;
  border: 6px solid transparent;
  border-top-color: rgba(245, 119, 226, 0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 51;
}

.acct-xp-total:hover::after,
.acct-xp-total:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Tab Navigation
   ============================================ */
.acct-tabs-wrap {
  margin-bottom: 16px;
}

.acct-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 5px;
}

.acct-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: transparent;
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.acct-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.acct-tab.active {
  background: rgba(245, 119, 226, 0.12);
  border: 1px solid rgba(245, 119, 226, 0.2);
  color: var(--pink);
}

/* ============================================
   Tab Panels
   ============================================ */
.acct-tab-panel {
  display: none;
}

.acct-tab-panel.active {
  display: block;
}

/* ============================================
   Section Card
   ============================================ */
.acct-section-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 24px 28px;
  min-width: 850px;
}

.acct-section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.acct-section-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -12px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.acct-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 24px 0 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.acct-section-divider svg {
  color: var(--pink);
  flex-shrink: 0;
}

/* ============================================
   Linked Account Rows
   ============================================ */
.acct-linked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.acct-linked-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.acct-linked-row:first-child {
  padding-top: 0;
}

.acct-linked-platform {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Platform icons */
.acct-platform-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acct-platform-kick {
  background: rgba(83, 252, 24, 0.1);
  border: 1px solid rgba(83, 252, 24, 0.2);
  color: #53FC18;
}

.acct-platform-discord {
  background: rgba(88, 101, 242, 0.12);
  border: 1px solid rgba(88, 101, 242, 0.25);
  color: #5865F2;
}

.acct-platform-twitter {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

.acct-platform-luxdrop {
  background: rgba(89, 134, 255, 0.1);
  border: 1px solid rgba(89, 134, 255, 0.2);
  color: var(--blue);
}

.acct-platform-generic {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.acct-platform-eth {
  background: rgba(98, 126, 234, 0.15);
  border: 1px solid rgba(98, 126, 234, 0.25);
  color: #627EEA;
}

.acct-platform-sol {
  background: rgba(153, 69, 255, 0.15);
  border: 1px solid rgba(153, 69, 255, 0.25);
  color: #9945FF;
}

.acct-platform-btc {
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid rgba(247, 147, 26, 0.25);
  color: #F7931A;
}

.acct-platform-ltc {
  background: rgba(52, 93, 157, 0.15);
  border: 1px solid rgba(52, 93, 157, 0.25);
  color: #345D9D;
}

.acct-platform-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.acct-platform-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.acct-platform-status {
  font-size: 11px;
  color: var(--text-muted);
}

.acct-platform-status.connected {
  color: #53FC18;
}

/* Actions */
.acct-linked-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.acct-link-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--blue-light);
  background: rgba(30, 174, 239, 0.1);
  border: 1px solid rgba(30, 174, 239, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.acct-link-btn:hover {
  background: rgba(30, 174, 239, 0.18);
  transform: translateY(-1px);
}

.acct-unlink-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.acct-unlink-btn:hover {
  background: rgba(220, 38, 38, 0.14);
  transform: translateY(-1px);
}

/* Status pill */
.acct-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.acct-status-pill.connected {
  background: rgba(83, 252, 24, 0.1);
  border: 1px solid rgba(83, 252, 24, 0.2);
  color: #53FC18;
}

/* Username link form (e.g. LuxDrop) */
.acct-linked-row--column {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.acct-linked-row--column .acct-linked-platform {
  width: 100%;
}

.acct-username-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.acct-username-input {
  flex: 1;
  background: var(--bg-card-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.acct-username-input::placeholder {
  color: var(--text-muted);
}

.acct-username-input:focus {
  border-color: rgba(89, 134, 255, 0.5);
}

.acct-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  background: var(--blue);
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.acct-save-btn:hover {
  background: #6f9bff;
  transform: translateY(-1px);
}

.acct-save-btn.saved {
  background: rgba(83, 252, 24, 0.15);
  color: #53FC18;
  border: 1px solid rgba(83, 252, 24, 0.3);
}

/* Coming soon pill */
.acct-soon-pill {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold-alt);
  background: rgba(255, 170, 0, 0.08);
  border: 1px solid rgba(255, 170, 0, 0.2);
  border-radius: 20px;
}

.acct-coming-soon-row {
  opacity: 0.55;
}

/* ============================================
   Settings Tab
   ============================================ */
.acct-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  gap: 20px;
}

.acct-settings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acct-settings-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.acct-settings-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.acct-danger-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 10px;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.acct-danger-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  transform: translateY(-1px);
}

/* ============================================
   Toast Notification
   ============================================ */
.acct-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.acct-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.acct-toast--success {
  background: rgba(83, 252, 24, 0.12);
  border: 1px solid rgba(83, 252, 24, 0.3);
  color: #53FC18;
}

.acct-toast--error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #f87171;
}

/* ============================================
   Character Customizer
   ============================================ */
.char-customizer-card {
  min-width: 0;
}

.char-customizer-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* Preview column */
.char-preview-wrap {
  flex-shrink: 0;
  width: 200px;
  background: rgba(8, 5, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.char-preview-wrap canvas {
  display: block;
}

.char-preview-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* Options column */
.char-options-col {
  flex: 1;
  min-width: 0;
}

.char-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.char-cat-btn {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.char-cat-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.char-cat-btn.active {
  color: var(--pink);
  background: rgba(245, 119, 226, 0.12);
  border-color: rgba(245, 119, 226, 0.25);
}

/* Options grid */
.char-options-area {
  min-height: 120px;
}

.char-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}

.char-option {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-option:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.char-option.selected {
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(245, 119, 226, 0.3);
  background: rgba(245, 119, 226, 0.08);
}

.char-option canvas {
  display: block;
}

.char-option-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  line-height: 1.1;
}

/* Locked item overlay */
.char-option-lock {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  pointer-events: none;
}

.char-option-lock svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  opacity: 0.9;
}

.char-option-lock-cost {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
}

/* Color swatches (for skin, shirt, hair colors) */
.char-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.char-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.char-color-swatch:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.char-color-swatch.selected {
  border-color: var(--pink);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(245, 119, 226, 0.4);
}

.char-color-swatch .char-option-lock {
  border-radius: 50%;
}

.char-color-swatch .char-option-lock-cost {
  font-size: 8px;
}

/* Hair sub-sections */
.char-hair-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 12px 0 8px;
}

.char-hair-section-label:first-child {
  margin-top: 0;
}

/* Outfit grid */
.char-outfit-grid {
  grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
  gap: 10px;
}

.char-outfit-option {
  width: auto;
  height: auto;
  min-height: 100px;
  flex-direction: column;
  padding: 6px 4px 4px;
}

.char-outfit-option canvas {
  width: 80px;
  height: 90px;
}

.char-outfit-option .char-option-label {
  position: static;
  margin-top: 2px;
  font-size: 10px;
}

.char-outfit-equipped-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--pink);
  padding: 2px 5px;
  border-radius: 4px;
  line-height: 1;
}

.char-outfit-remove-btn {
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.char-outfit-remove-btn:hover {
  background: rgba(255, 80, 80, 0.1);
  border-color: rgba(255, 80, 80, 0.3);
  color: #ff6666;
}

/* Outfit-locked accessory */
.char-option-outfit-locked {
  opacity: 0.45;
  border-color: rgba(245, 119, 226, 0.2) !important;
  cursor: default !important;
}

.char-option-outfit-badge {
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--pink, #F577E2);
}

.char-accessory-outfit-notice {
  font-size: 11px;
  color: var(--text-muted, #888);
  text-align: center;
  padding: 4px 8px 8px;
  opacity: 0.7;
}

/* Actions row */
.char-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.char-save-btn {
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 700;
}

.char-reset-btn {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.char-reset-btn:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 640px) {
  .account-page {
    padding: 84px 14px 50px;
  }

  .acct-profile-hero {
    flex-wrap: wrap;
    padding: 20px;
    gap: 16px;
  }

  .acct-level-block {
    width: 100%;
    text-align: left;
    min-width: unset;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 14px;
  }

  .acct-xp-label {
    text-align: left;
  }

  .acct-tabs {
    flex-direction: column;
  }

  .acct-section-card {
    padding: 18px 16px;
    min-width: 0;
  }

  .acct-linked-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .acct-linked-actions {
    width: 100%;
  }

  .acct-settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .char-customizer-layout {
    flex-direction: column;
  }

  .char-preview-wrap {
    width: 100%;
  }

  .char-category-tabs {
    gap: 4px;
  }

  .char-cat-btn {
    padding: 5px 10px;
    font-size: 10px;
  }

  .char-actions {
    flex-direction: column;
  }

  .char-save-btn,
  .char-reset-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}
