/* ═══════════════════════════════════════════════
   UltraPure — Stealth Sleek Dark UI (#141414 & #252525)
   profile.lxds.org
   ═══════════════════════════════════════════════ */

:root {
  --bg: #141414;
  --bg-tertiary: #252525;
  --text: #ffffff;
  --text-muted: #888888;
  --text-dim: #444444;
  --font-main: 'Outfit', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  border: none;
  outline: none !important;
  box-shadow: none !important; /* ZERO SHADOWS EVERYWHERE */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

html, body {
  width: 100%;
  min-height: 100vh;
  background-color: #141414 !important;
  color: var(--text);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  -webkit-font-smoothing: antialiased;
}

/* Autofill override for Dark Dashboard */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #1a1a1a inset !important;
  transition: background-color 5000s ease-in-out 0s;
}
input:-webkit-autofill::first-line {
  color: #ffffff !important;
}

/* Autofill override for Light Auth Modal */
.auth-input-override:-webkit-autofill,
.auth-input-override:-webkit-autofill:hover, 
.auth-input-override:-webkit-autofill:focus,
.auth-input-override:-webkit-autofill:active {
  -webkit-text-fill-color: #000000 !important;
  color: #000000 !important;
  -webkit-box-shadow: 0 0 0px 1000px #f0f0f0 inset !important;
}
.auth-input-override:-webkit-autofill::first-line {
  color: #000000 !important;
}

/* ═══════════════════════════════════════════════
   AUTH CARD UI (#auth-modal)
   ═══════════════════════════════════════════════ */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: #141414 !important;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw;
  height: 100vh;
  padding: 16px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: #ffffff;
  padding: 24px 28px;
  width: 100%;
  max-width: 350px;
  border-radius: 18px;
}

.auth-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
}

#auth-title {
  color: #151717;
  font-weight: 800;
  font-size: 18px;
  margin: 0;
}

.flex-column > label {
  color: #151717;
  font-weight: 600;
  font-size: 12px;
  margin-top: 4px;
}

.inputForm {
  border-radius: 8px;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  background: #f0f0f0;
}

.input {
  border-radius: 8px;
  width: 100%;
  height: 100%;
  color: #000000;
  font-size: 12.5px;
  background: transparent;
}

.input[dir="auto"]::placeholder {
  direction: rtl;
  text-align: right;
}

.button-submit {
  margin: 12px 0 4px 0;
  background-color: #151717 !important;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  height: 38px;
  width: 100%;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.button-submit:hover {
  opacity: 0.9;
}

.p {
  text-align: center;
  color: #000000;
  font-size: 12px;
  margin: 4px 0 8px 0;
}

.span {
  font-size: 12px;
  margin-left: 5px;
  font-weight: 800;
  cursor: pointer;
  color: #000000;
  text-decoration: underline;
}

.btn.google {
  margin-top: 2px;
  width: 100%;
  height: 38px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  font-size: 12.5px;
  gap: 8px;
  background-color: #ffffff !important;
  color: #151717 !important;
  cursor: pointer;
}

.auth-error {
  color: #e74c3c;
  font-size: 12px;
  text-align: center;
  min-height: 14px;
}

/* ═══════════════════════════════════════════════
   PROFILE DASHBOARD VIEW
   ═══════════════════════════════════════════════ */
.profile-dashboard-wrapper {
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #141414 !important;
}

.profile-container {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

/* Profile Header Row */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

.user-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
}

/* SQUARE AVATAR WITH ROUNDED CORNERS AND #252525 BORDER */
.avatar-circle {
  width: 64px;
  height: 64px;
  border-radius: 14px !important;
  overflow: hidden;
  background: #121214;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1.5px solid #252525 !important;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 13px !important;
}

/* INCREASED SPACING BETWEEN NAME AND JOINED DATE (gap: 11px) */
.user-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  min-height: 64px;
}

.user-name-title {
  font-size: clamp(17px, 3.8vw, 22px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* JOINED WRAPPER WITH CALENDAR-CHECK SVG ICON */
.joined-wrapper {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
}

.calendar-icon {
  flex-shrink: 0;
  color: #888888;
}

.last-signin-label {
  font-size: clamp(11.5px, 2.8vw, 13px);
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* SLEEK ICON-ONLY #252525 BUTTONS (MUTED CLARITY #aaaaaa WITH HOVER WHITE #ffffff) */
.btn-icon-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #252525 !important;
  color: #aaaaaa !important;
  height: 36px;
  width: 36px;
  border-radius: 9px;
  cursor: pointer;
  transition: opacity 0.15s ease, color 0.15s ease, transform 0.1s ease;
  border: 1px solid #252525 !important;
}

.btn-icon-square:hover {
  color: #ffffff !important;
  opacity: 0.95;
}

.btn-icon-square:active {
  transform: scale(0.92);
}

/* 4 Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

/* ═══════════════════════════════════════════════
   STRICT UNCLIPPED 7-ROW FULL YEAR MATRIX
   ═══════════════════════════════════════════════ */
.activity-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 8px;
  position: relative;
  direction: ltr !important;
  overflow: visible !important;
}

.heatmap-scroll-area {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  padding: 4px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  direction: ltr !important;
}
.heatmap-scroll-area::-webkit-scrollbar {
  display: none;
}

.heatmap-grid-layout {
  display: flex;
  gap: 12px;
  direction: ltr !important;
  margin: 0 auto;
  overflow: visible !important;
}

.days-labels-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 82px;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 20px;
  direction: ltr !important;
}

.grid-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  direction: ltr !important;
  overflow: visible !important;
}

/* 53 Columns x 9.5px Dot Size Grid Header */
.months-header-grid {
  display: grid;
  grid-template-columns: repeat(53, 9.5px);
  gap: 2px;
  height: 16px;
  direction: ltr !important;
}

.month-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  grid-row: 1;
  white-space: nowrap;
}

/* STRICT 7 ROWS x 53 COLUMNS UNCLIPPED DOT MATRIX */
.dots-wrapper {
  display: grid;
  grid-template-columns: repeat(53, 9.5px);
  grid-template-rows: repeat(7, 9.5px);
  grid-auto-rows: 9.5px;
  grid-auto-flow: column;
  gap: 2px;
  height: 82px;
  max-height: 82px;
  overflow: visible !important;
  direction: ltr !important;
}

/* DOT CELL BACKGROUND COLOR EXACTLY #252525 */
.dot-cell {
  width: 9.5px;
  height: 9.5px;
  border-radius: 50% !important;
  background: #252525;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.15s ease;
  flex-shrink: 0;
}

.dot-cell.empty-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.dot-cell:hover {
  transform: scale(1.35);
}

.dot-cell.active-white {
  background: #ffffff;
}

.dot-cell.active-white-dim {
  background: rgba(255, 255, 255, 0.45) !important;
}

/* SLEEK CURSOR-STYLE HOVER TOOLTIP CARD */
.heatmap-tooltip {
  position: fixed;
  z-index: 99999;
  background: #18181b;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-8px);
  transition: opacity 0.1s ease;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8) !important;
}

.heatmap-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(-12px);
}

/* ═══════════════════════════════════════════════
   FULL SLIGHTLY DARKER OVERLAY & LABELED MODALS (#0f0f0f)
   ═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: #0f0f0f !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 380px;
  background-color: #0f0f0f !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: none !important;
  box-shadow: none !important;
  position: relative;
}

.modal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.modal-header-title {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.modal-close-text-btn {
  background: transparent !important;
  color: #888888;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease;
}
.modal-close-text-btn:hover {
  color: #ffffff;
}

.modal-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* INPUT WITH ICONS (RIGHT & LEFT SUPPORT) */
.input-with-icon-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.input-share-padded {
  padding-right: 82px !important;
  padding-left: 14px !important;
}

.input-padded-left {
  padding-left: 44px !important;
  padding-right: 14px !important;
}

.input-icons-group {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.input-icons-group-left {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.btn-input-copy-icon {
  background: #252525 !important;
  color: #aaaaaa !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.btn-input-copy-icon.static-icon {
  cursor: default !important;
  pointer-events: none;
}

.btn-input-copy-icon:hover {
  color: #ffffff !important;
  background: #2f2f2f !important;
}

.btn-input-copy-icon:active {
  transform: scale(0.92);
}

/* FLOATING USERNAME RULES TOOLTIP CARD */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
}

.username-rules-card {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #18181b;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  width: 210px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.9) !important;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
  direction: rtl;
}

.tooltip-wrapper:hover .username-rules-card,
.username-rules-card.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #dddddd;
  font-size: 11.5px;
}

.rule-item span {
  color: #888888;
}

@keyframes spinLoader {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-loader {
  animation: spinLoader 0.8s linear infinite;
}

.modal-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #aaaaaa;
}

/* INPUT FIELDS: NO BORDER & SLIGHTLY DARKER STILL (#1a1a1a) */
.modal-input {
  background: #1a1a1a !important;
  color: #ffffff !important;
  border-radius: 10px;
  height: 42px;
  padding: 0 14px;
  font-size: 13px;
  width: 100%;
  border: none !important;
  transition: background-color 0.15s ease;
}

.modal-input:focus {
  background: #1f1f1f !important;
  border: none !important;
}

.username-status-msg {
  font-size: 12px;
  font-weight: 700;
  color: #ff4d4d;
  margin-top: 2px;
  min-height: 16px;
}

.modal-footer-btns {
  display: flex;
  width: 100%;
  margin-top: 8px;
}

/* SAVE BUTTON WITH #252525 COLOR MATCHING EDIT/SHARE BUTTONS */
.btn-modal-save {
  width: 100%;
  height: 42px;
  background: #252525 !important;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 800;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #252525 !important;
}

.btn-modal-save:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  background: #252525 !important;
  color: #888888 !important;
}

/* CLEAN MINIMALIST QR CODE CONTAINER: NO BORDER, NO BACKGROUND, NO USER TEXT */
.qr-code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  padding: 12px 0 0 0;
  border: none !important;
  margin-top: 4px;
  animation: fadeInQr 0.2s ease forwards;
}

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

.qrcode-canvas-container {
  background: transparent !important;
  padding: 0;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qrcode-canvas-container canvas {
  width: 220px !important;
  height: 220px !important;
  display: block;
}

/* MOBILE RESPONSIVE RULES */
@media (max-width: 640px) {
  .profile-dashboard-wrapper {
    padding: 24px 16px;
  }

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

  .user-identity {
    width: 100%;
    min-height: 56px;
  }

  .avatar-circle {
    width: 56px;
    height: 56px;
    border-radius: 12px !important;
  }

  .user-details {
    height: 56px;
  }

  .action-bar {
    width: 100%;
    justify-content: flex-start;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 14px;
  }

  .metric-value {
    font-size: 20px;
  }

  .heatmap-scroll-area {
    justify-content: flex-start;
  }
}

/* GLOBAL BUTTON ANIMATION & TAP HIGHLIGHT REMOVAL */
* {
  -webkit-tap-highlight-color: transparent !important;
}

button, a {
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease, opacity 0.2s ease, color 0.2s ease !important;
}

button:active, a:active {
  transform: scale(0.92) !important;
}

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 650px) {
  /* 1. Make button groups 2 columns */
  div[style*='grid-template-columns: repeat(4'] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Make 3-column groups stack vertically on mobile */
  div[style*='grid-template-columns: repeat(3'] {
    grid-template-columns: 1fr !important;
  }
  
  /* 1.5 Make metrics sections 2x2 */
  section[style*="justify-content: space-around; flex-wrap: wrap;"] {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }

}

