/* ============================================================
   QCT ESPORTZ — PROFILE PAGE
   profile.css | Design System v4.0
============================================================ */


/* ── Page wrapper ── */
.profile-container {
  padding: 0 0 24px;
  animation: fadeUp 0.4s var(--ease-smooth) both;
}

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


/* ============================================================
   SECTION HEADERS
============================================================ */

.prof-section-head {
  padding-left: 14px;
  position: relative;
  margin: 20px 0 12px;
}

.prof-section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--orange), var(--teal));
  box-shadow: 0 0 8px rgba(255,165,0,0.35);
}

.prof-section-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--teal-bright);
  line-height: 1;
  margin-bottom: 2px;
}

.prof-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text-primary);
  line-height: 1;
}


/* ============================================================
   PROFILE HERO CARD
============================================================ */

.profile-card {
  position: relative;
  background: var(--grad-card);
  border: 1px solid rgba(255,165,0,0.18);
  border-radius: var(--radius-xl);
  padding: 28px 20px 22px;
  margin-bottom: 8px;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255,165,0,0.05);
}

/* Tricolor top stripe */
.profile-card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--orange) 0%,
    var(--teal-bright) 50%,
    var(--neon) 100%
  );
  box-shadow: 0 0 12px rgba(255,165,0,0.35);
}

/* Ambient corner glow */
.profile-card-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle,
    rgba(255,165,0,0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}


/* ── Profile picture ── */
.profile-pic-wrap {
  position: relative;
  width: 104px; height: 104px;
  margin: 0 auto 16px;
  cursor: pointer;
  border-radius: 50%;
  display: block;
}

.profile-pic {
  width: 104px; height: 104px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 3px solid transparent;
  background-image:
    linear-gradient(var(--void-01), var(--void-01)),
    linear-gradient(135deg, var(--orange), var(--teal-bright));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 0 20px rgba(255,165,0,0.25), 0 8px 28px rgba(0,0,0,0.55);
  animation: floatPic 4s ease-in-out infinite;
  transition: box-shadow var(--transition-base);
  position: relative;
  z-index: 1;
}

@keyframes floatPic {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* Camera overlay on hover */
.profile-pic-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: 2;
}

.profile-pic-wrap:hover .profile-pic-overlay,
.profile-pic-wrap:focus .profile-pic-overlay {
  opacity: 1;
}

.profile-pic-wrap:hover .profile-pic {
  animation-play-state: paused;
  box-shadow: 0 0 32px rgba(255,165,0,0.45), 0 10px 32px rgba(0,0,0,0.6);
}

/* Hide actual file input */
#profilePicInput {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
  pointer-events: none;
}


/* ── Display name ── */
.profile-name-row { margin-bottom: 14px; }

#displayName {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(255,165,0,0.40);
  line-height: 1;
  position: relative;
  z-index: 1;
}


/* ── IGN + UID boxes ── */
.profile-info-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.profile-info-box {
  flex: 1;
  max-width: 160px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid;
  background: rgba(255,255,255,0.025);
  text-align: left;
}

.profile-info-box.teal  { border-color: rgba(0,140,180,0.28); }
.profile-info-box.orange { border-color: rgba(255,165,0,0.25); }

.pib-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.pib-value {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info-box.teal   .pib-value { color: var(--teal-bright); }
.profile-info-box.orange .pib-value { color: var(--orange); }


/* ── Balance row ── */
.profile-balance-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 0;
}

.profile-bal-block {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pbal-icon { font-size: 26px; }

.pbal-body { text-align: left; }

.pbal-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1px;
}

.pbal-value {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
}

.pbal-value.orange { color: var(--orange);     text-shadow: 0 0 16px rgba(255,165,0,0.40); }
.pbal-value.teal   { color: var(--teal-bright); text-shadow: 0 0 16px rgba(0,196,232,0.35); }

.profile-bal-divider {
  width: 1px; height: 44px;
  background: var(--border-subtle);
  flex-shrink: 0;
}


/* ── Stats row ── */
.profile-stats-row {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 0;
  margin-bottom: 18px;
}

.pstat-box {
  flex: 1;
  text-align: center;
}

.pstat-value {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text-secondary);
  line-height: 1;
  margin-bottom: 2px;
}

.pstat-value.orange { color: var(--orange); }
.pstat-value.neon   { color: var(--neon); }

.pstat-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.pstat-divider {
  width: 1px; height: 36px;
  background: var(--border-subtle);
  flex-shrink: 0;
}


/* ── Edit profile button ── */
.prof-edit-btn {
  width: 100%;
  height: 46px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,165,0,0.30);
  background: rgba(255,165,0,0.09);
  color: var(--orange);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.prof-edit-btn:hover {
  background: rgba(255,165,0,0.16);
  border-color: rgba(255,165,0,0.50);
  box-shadow: var(--glow-orange-sm);
}

.prof-edit-btn:active { transform: scale(0.97); }


/* ============================================================
   REFERRAL CARD
============================================================ */

.referral-card {
  position: relative;
  background: rgba(0,140,180,0.07);
  border: 1px solid rgba(0,140,180,0.25);
  border-radius: var(--radius-xl);
  padding: 18px 16px 16px;
  margin-bottom: 4px;
  overflow: hidden;
}

.referral-card-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--neon));
}

.ref-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 10px;
}

.ref-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.ref-code {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--text-primary);
  flex: 1;
}

.ref-copy-btn {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0,140,180,0.35);
  background: rgba(0,140,180,0.12);
  color: var(--teal-bright);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  flex-shrink: 0;
}

.ref-copy-btn:hover {
  background: rgba(0,140,180,0.22);
  border-color: rgba(0,196,232,0.50);
  box-shadow: var(--glow-teal-sm);
}

.ref-hint {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}


/* ============================================================
   PROFILE LINKS LIST  (rows)
============================================================ */

.prof-links-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

/* Generic row — used for links, buttons, toggles */
.prof-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  text-align: left;
}

/* Left accent on hover */
.prof-link-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--teal));
  opacity: 0;
  transition: opacity var(--transition-fast);
  border-radius: 1px 0 0 1px;
}

.prof-link-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,165,0,0.14);
  transform: translateX(3px);
}

.prof-link-row:hover::before { opacity: 1; }

.plr-icon { font-size: 18px; flex-shrink: 0; }

.plr-text {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex: 1;
}

.plr-arrow {
  font-size: 18px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform var(--transition-fast),
              color var(--transition-fast);
}

.prof-link-row:hover .plr-arrow {
  transform: translateX(2px);
  color: var(--orange);
}

/* Danger rows */
.danger-row {
  border-color: rgba(255,34,68,0.18);
}

.danger-row .plr-text { color: #FF4466; }

.danger-row:hover {
  background: rgba(255,34,68,0.07);
  border-color: rgba(255,34,68,0.35);
}

.danger-row:hover::before {
  background: linear-gradient(180deg, #FF4466, #CC0022);
}

/* Delete row — slightly different shade */
.delete-row .plr-text { color: #FF2244; opacity: 0.80; }


/* ============================================================
   NOTIFICATIONS TOGGLE
============================================================ */

.toggle-row { cursor: pointer; }

.toggle-switch {
  width: 44px; height: 24px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border-subtle);
  position: relative;
  flex-shrink: 0;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  cursor: pointer;
}

.toggle-switch.on {
  background: rgba(255,165,0,0.30);
  border-color: rgba(255,165,0,0.45);
  box-shadow: var(--glow-orange-sm);
}

.toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform var(--transition-fast),
              background var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.toggle-switch.on .toggle-knob {
  transform: translateX(20px);
  background: var(--orange);
}


/* ============================================================
   POPUP MODALS  (shared with wallet)
============================================================ */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2,2,7,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  animation: overlayFade 0.2s ease both;
}

.popup-overlay.hidden { display: none; }

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

.popup-box {
  width: 100%;
  max-width: var(--max-width);
  background: var(--void-01);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl) var(--radius-xl) var(--radius-lg) var(--radius-lg);
  padding: 24px 20px 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 -8px 40px rgba(0,0,0,0.55);
  animation: slideUpModal 0.3s var(--ease-snap) both;
  max-height: 90svh;
  overflow-y: auto;
}

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

.popup-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--teal-bright));
}

.popup-stripe-danger {
  background: linear-gradient(90deg, #FF4466, var(--orange));
}

.popup-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.danger-title { color: #FF4466; }

/* Delete warning box */
.delete-warning {
  background: rgba(255,34,68,0.07);
  border: 1px solid rgba(255,34,68,0.22);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.delete-warning p {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

.delete-warning strong { color: #FF4466; }

/* Form fields */
.form-field { margin-bottom: 16px; }

.form-field label {
  display: block;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.form-field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(8,8,20,0.85);
  color: var(--text-primary);
  font-family: var(--font-label);
  font-size: 15px;
  font-weight: 600;
  box-sizing: border-box;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.form-field input:focus {
  outline: none;
  border-color: rgba(255,165,0,0.50);
  box-shadow: 0 0 0 3px rgba(255,165,0,0.10);
}

.form-field input::placeholder { color: var(--text-dim); }

/* Popup action buttons */
.popup-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.wallet-btn {
  flex: 1;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-fast),
              transform var(--transition-fast) var(--ease-snap);
}

.wallet-btn.primary {
  background: var(--grad-orange);
  color: var(--void-00);
  box-shadow: var(--glow-orange-sm);
}

.wallet-btn.primary:hover { box-shadow: var(--glow-orange-md); }

.wallet-btn.danger {
  background: linear-gradient(135deg, #FF2244, #CC0022);
  color: #fff;
  box-shadow: 0 0 16px rgba(255,34,68,0.30);
}

.wallet-btn.danger:hover { box-shadow: 0 0 28px rgba(255,34,68,0.50); }

.wallet-btn:active { transform: scale(0.97); }

.wallet-btn.loading {
  pointer-events: none;
  color: transparent;
}

.wallet-btn.loading::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
}

@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.cancel-btn {
  flex: 1;
  height: 48px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast);
}

.cancel-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
}


/* ── Version footer ── */
.prof-version {
  text-align: center;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0.40;
  margin-top: 20px;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (min-width: 768px) {
  .profile-card       { padding: 36px 32px 28px; }
  .profile-pic        { width: 120px; height: 120px; }
  .profile-pic-wrap   { width: 120px; height: 120px; }
  #displayName        { font-size: 32px; }
  .popup-overlay      { align-items: center; }
  .popup-box          { border-radius: var(--radius-xl); max-width: 480px; }
}
