/* account.css */
* { box-sizing: border-box; }

:root{
  --bg: #1b1324;
  --panel: #2c1f38;
  --panel-2: #241a30;
  --border: #3a2a4d;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.7);
  --muted2: rgba(255,255,255,0.55);
  --accent: #ff5a3c;
  --accent2: #ff7b5c;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

/* ---------------- HEADER ---------------- */
.app-header {
  background-color: var(--bg);
  border-bottom: 1px solid #2c1f38;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; }

.app-title { margin: 0; font-size: 22px; }
.app-title span { color: var(--accent); font-weight: 800; }

.header-nav { display: flex; gap: 14px; }
.header-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 8px;
  transition: 0.2s;
}
.header-nav a:hover { background: rgba(255,255,255,0.06); }
.header-nav a.active { background: rgba(255,90,60,0.18); color: #fff; }

.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.credits {
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  font-size: 14px;
}

/* Profile */
.profile-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #2c1f38;
  overflow: hidden;
  background-color: #2c1f38;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
}

.profile-menu {
  position: absolute;
  right: 15px;
  top: 70px;
  width: 240px;
  background: #2c1f38;
  border: 1px solid #3a2a4d;
  border-radius: 10px;
  display: none;
  z-index: 60;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.profile-meta {
  padding: 16px;
  border-bottom: 1px solid #3a2a4d;
}
.profile-name { font-size: 16px; font-weight: 800; }
.profile-email { font-size: 13px; color: #cccccc; margin-top: 2px; }

.menu-item,
.profile-menu button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 14px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  cursor: pointer;
}
.menu-item:hover, .profile-menu button:hover { background: #3a2a4d; }
.danger { color: var(--accent) !important; }
.danger:hover { background: rgba(255,90,60,0.18) !important; color: #fff !important; }

/* ---------------- Buttons ---------------- */
.btn{
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: rgba(255,255,255,0.08);
}
.btn-primary:hover{ background: var(--accent2); transform: translateY(-1px); }

.btn-ghost{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: #fff;
}
.btn-ghost:hover{ background: rgba(255,255,255,0.10); transform: translateY(-1px); }

.btn-danger{
  background: rgba(255,90,60,0.16);
  border-color: rgba(255,90,60,0.35);
  color: #fff;
}
.btn-danger:hover{
  background: rgba(255,90,60,0.26);
  transform: translateY(-1px);
}

/* ---------------- Page Layout ---------------- */
.page{
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.page-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 18px;
}

.page-title{
  margin: 0;
  font-size: 28px;
  letter-spacing: 0.2px;
}
.page-subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: start;
}

.stack{
  display: grid;
  gap: 16px;
}

/* ---------------- Cards ---------------- */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card h3{
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.2px;
}

.divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 14px 0;
}

/* Chips */
.chip{
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
}
.chip.ok{ background: rgba(0, 200, 120, 0.12); border-color: rgba(0, 200, 120, 0.28); }
.chip.bad{ background: rgba(255, 90, 60, 0.14); border-color: rgba(255, 90, 60, 0.34); }

/* Key/Value rows */
.kv{
  display: grid;
  gap: 10px;
}
.kv-row{
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}
.kv-key{
  color: var(--muted2);
  font-weight: 700;
  font-size: 13px;
}
.kv-val{
  font-weight: 800;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-big{
  font-size: 18px;
  font-weight: 900;
  color: #fff;
}
.muted{ color: var(--muted); font-weight: 600; }

/* ✅ Rank card + progress bar */
.rank-card{
  margin-top: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}
.rank-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rank-title{
  font-weight: 900;
  font-size: 13px;
}
.rank-name{
  color: rgba(255,255,255,0.95);
}
.rank-next{
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  font-weight: 700;
}

.progress-wrap{
  margin-top: 10px;
  display: grid;
  gap: 6px;
}
.progress-bar{
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.progress-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,90,60,0.65), rgba(255,123,92,0.85));
  transition: width .35s ease;
}
.progress-text{
  font-size: 12px;
  color: rgba(255,255,255,0.70);
  font-weight: 700;
}

/* Actions list */
.actions{
  display: grid;
  gap: 10px;
}
.action{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
}
.action-title{
  font-weight: 900;
  font-size: 13px;
}
.action-desc{
  font-size: 12px;
  color: rgba(255,255,255,0.62);
  margin-top: 3px;
}

/* Billing */
.billing{
  display: grid;
  gap: 12px;
}
.billing-row{
  padding: 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}
.billing-title{ font-weight: 900; font-size: 13px; }
.billing-desc{ color: rgba(255,255,255,0.62); font-size: 12px; margin-top: 4px; }
.billing-cta{ display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-start; }

/* Danger zone */
.danger-card{
  border-color: rgba(255,90,60,0.22);
}
.danger-box{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,90,60,0.08);
  border: 1px solid rgba(255,90,60,0.18);
}
.danger-title{ font-weight: 900; font-size: 13px; }
.danger-desc{ color: rgba(255,255,255,0.68); font-size: 12px; margin-top: 4px; }

/* Footer */
.page-footer{
  margin-top: 18px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}

/* Responsive */
@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .page-head{ align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px){
  .header-nav{ display:none; }
  .kv-row{ grid-template-columns: 1fr; }
  .rank-top{ flex-direction: column; align-items: flex-start; }
}

/* Rank icon */
.rank-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.rank-icon {
  font-size: 16px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.15));
}

/* Rank color themes */
.rank-observer      { color: #9ca3af; }
.rank-first         { color: #60a5fa; }
.rank-doodler       { color: #34d399; }
.rank-lineartist    { color: #22d3ee; }
.rank-illustrator   { color: #a78bfa; }
.rank-inker         { color: #fb923c; }
.rank-draftsman     { color: #facc15; }
.rank-master        { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,0.6); }
.rank-pro           { color: #38bdf8; text-shadow: 0 0 10px rgba(56,189,248,0.6); }
.rank-grandmaster   { color: #f97316; text-shadow: 0 0 14px rgba(249,115,22,0.7); }

