/* Overall page */
.profile-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px 0;
}

/* Header */
.profile-header {
    margin: 8px auto 10px;
}

.profile-header-inner {
    padding: 10px 8px 4px;
}

.profile-hello-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #8ed7c8, #1b2735 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 18px;
    box-shadow: 0 0 18px rgba(106, 165, 156, 0.45);
}

.profile-greeting-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-greeting-main {
    font-weight: 600;
    font-size: 15px;
}

.profile-greeting-email {
    font-size: 12px;
}

/* Cards */
.profile-card {
    margin: 0 auto 14px;
    padding: 16px 18px;
    max-width: 1100px;
    box-sizing: border-box;
}

/* Name section */
.profile-name-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.profile-name-input {
    flex: 1;
    min-width: 150px;
}

.profile-save-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-save-btn {
    padding-inline: 26px;
}

.profile-save-msg {
    font-size: 12px;
}

/* Streak section */
.profile-streak-card-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.streak-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.streak-main {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.streak-number {
    font-size: 28px;
    font-weight: 800;
}

.streak-label {
    font-size: 12px;
}

.streak-heat-wrap {
    margin-top: 6px;
}

.streak-heat {
    display: flex;
    gap: 6px;
}

.streak-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.streak-dot.active {
    background: #6AA59C;
    box-shadow: 0 0 10px rgba(106, 165, 156, 0.7);
}

.streak-subtitle {
    font-size: 11px;
    margin-top: 4px;
}

/* =========================
   PROFILE – streak metrics
   ========================= */

.profile-page .metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

/* Each “Best streak / Total attempts / Last activity” pill */
.profile-page .metric-pill {
  flex: 1 1 200px;              /* grow nicely, wrap on small screens */
  max-width: 100%;
  box-sizing: border-box;

  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);

  padding: 10px 18px;           /* ⬅ reduce vertical padding so it’s not huge */
  display: flex;
  flex-direction: column;
  justify-content: center;      /* ⬅ centers text vertically */
}

/* Label (Best streak / Total attempts / Last activity) */
.profile-page .metric-pill .muted {
  font-size: 11px;
  line-height: 1.2;
}

/* Value line (1 day(s), 1, 2025-11-25) */
.profile-page .metric-pill .metric-value {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
}

/* Make sure the whole card never spills horizontally */
.profile-page .card.profile-streak-card,
.profile-page #prof_streak_card {
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}


.metric-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}


.profile-tip {
    font-size: 12px;
    margin-top: 14px;
}

/* Logout */
.profile-logout-wrap {
    text-align: center;
    padding: 20px 0 36px;
    margin-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-logout-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 999px;
    border: none;
    cursor: pointer;

    background: radial-gradient(circle at 0% 0%, #8ed7c8 0, #6AA59C 40%, #3a6c63 100%);
    box-shadow: 0 0 24px rgba(106, 165, 156, 0.45);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.02em;

    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-logout-mobile:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 28px rgba(106, 165, 156, 0.7);
    filter: brightness(1.05);
}

.btn-logout-mobile:active {
    transform: scale(0.96);
    box-shadow: 0 0 18px rgba(106, 165, 156, 0.5);
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .profile-page {
        padding-inline: 12px;
    }

    .profile-card {
        padding: 14px 14px;
        margin-bottom: 12px;
    }

    .profile-metrics-row {
        flex-direction: column;
    }

    .metric-pill {
        width: 100%;
    }

    .btn-logout-mobile {
        width: min(260px, 80vw);
        padding-block: 14px;
        font-size: 17px;
    }

    .profile-logout-wrap {
        padding-bottom: 40px; /* above iOS home bar */
    }
}
