*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brown theme: */
  /* --card: #251a19; */
  /* --bg: #050101 */

  /* Dark blue theme */
  /* --bg: #111a22; */
  /* --card: #1d2833; */

  /* Material 3 dark theme */
  /*--bg: #211f21;
  --card: #1c1b1d; */

  --bg: #0f0f0f;
  --card: #272727;
  
  --border: #7b7b7b;
  --muted: #7b7b7b;
  --slightly-muted: #dadada;
  --text: white;
  --text-on-accent: black;
  --primary: white;
  /* --accent: #5bc499; minty green*/
  --accent: #35e500;
  --accent-soft: rgba(53, 229, 0, 0.08);
  --site-wrapper-max-width: 1000px;
  --border-radius: 8px;
  --btn-radius: 4px;
  --card-padding: 16px;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark !important;
  font-size: clamp(16px, 1.5vw, 18px);
}

body {
  color: white;
  line-height: 1.25;
  /* font-family: Georgia, "Times New Roman", Times, serif; */
  font-family: Inter, system-ui, sans-serif;
}

html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}


button,
input,
textarea,
select {
    font-family: inherit;
}

textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 10px 14px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    appearance: none;
}

textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea::placeholder,
input::placeholder {
    color: var(--muted);
}

textarea {
  border-radius: var(--border-radius) var(--border-radius) 0 var(--border-radius);
  min-height: 80px;
  line-height: 1.5;
  resize: vertical;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237b7b7b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}



.default-background {
  background: var(--bg);
}

.black-background {
  background: black;
}

.pos-rel {
  position: relative;
}


.w-100 {
  width: 100%;
}

.max-w-100 {
  max-width: 100%;
}

.m-right-5 {
  margin-right: 5px;
}

.m-right-10 {
  margin-right: 10px;
}

.m-right-15 {
  margin-right: 15px;
}

.m-top-5 {
  margin-top: 5px;
}

.m-top-10 {
  margin-top: 10px;
}

.m-top-20 {
  margin-top: 20px;
}

.m-top-50 {
  margin-top: 50px;
}

.m-bot-5 {
  margin-bottom: 5px;
}

.m-bot-10 {
  margin-bottom: 10px;
}

.m-bot-15 {
  margin-bottom: 15px;
}

.m-bot-20 {
  margin-bottom: 20px;
}

.m-bot-30 {
  margin-bottom: 30px;
}


.m-bot-5 {
  margin-bottom: 5px;
}

.pre-wrap {
  white-space: pre-wrap;
}

.icon svg {
  vertical-align: middle;
}

.error {
  color: red;
  margin-top: 5px;
}

.error > ul {
  list-style: none;
}



.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  line-height: 1;
}



/* ── Layout ── */
.wrapper {
  max-width: var(--site-wrapper-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 4.5rem 0 6rem; 
  box-sizing: content-box;
}

@media (max-width: 1000px) {
  .wrapper {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: calc(100% - 1rem);
  }
}

.btn-quiet {
  background: transparent;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-quiet:hover {
  background-color: var(--accent-soft);
}

.btn {
  display: inline-block;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.1s;
  border-radius: var(--btn-radius);
  box-shadow: 2px 2px 5px black;
}

.btn:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-accent {
  background: var(--accent);
  color: var(--text-on-accent);
  border: 0px solid var(--border);
}

.btn-warn {
  background: red;
  color: white;
  border: 0px solid var(--border);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text)
}


.card {
  background: var(--card);
  border-radius: var(--border-radius);
  padding: var(--card-padding);
  box-shadow: 2px 2px 5px black;
}


.flex {
  display: flex;
}

.flex-row {
  flex-direction: row;
}

/* Supporter tiers */
.tier-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tier-card { background: var(--card); overflow: hidden; display: flex; flex-direction: column; box-shadow: 2px 2px 5px black; border-radius: var(--border-radius);}
.tier-image { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.tier-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tier-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tier-number { font-weight: 500; margin: 0; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem;}
.tier-name { font-size: 0.7rem; }
.tier-desc { font-size: 0.8rem; color: #ffffff; line-height: 1.5; margin: 0; }
.tier-features { font-size: 0.8rem; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tier-features li { line-height: 1.5; }
.tier-buttons { margin-top: auto; display: flex; flex-direction: row; gap: 6px; padding-top: 4px; }
.tier-btn {  padding: 12px; font-weight: bold; color: #fff;  width: 100%; font-size: 0.6rem; text-align: center; }
.tier-divider-text { text-align: center; margin-top: 20px; margin-bottom: 20px;}

.btn-sapphire { background: #0010ff; }
.btn-emerald  { background: #23a000; }
.btn-ruby     { background: #c0313a; }
.btn-diamond  { background: #00acff; }
.btn-amethyst { background: #7635b6; }
.btn-orange   { background: #d4641a; }

.tier-1-color { color: #9b98ff; }
.tier-2-color { color: #20d888; }
.tier-3-color { color: #f00010; }
.tier-4-color { color: #00dbff; }
.tier-5-color { color: #ff6bff; }
.tier-6-color { color: #ff6500; }

.current-tier-btn {
  opacity: 0.6;
  cursor: default;
  border: 3px solid white;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .tier-grid { grid-template-columns: minmax(0, 1fr); }
}


/* Motif */
.motif-header {
  position: relative;
  width: 100%;
  margin-bottom: 165px;
}

.motif-cover img {
  width: 100%;
  max-height: 500px;
  border-radius: 15px 15px 0px 0px;
  object-fit: cover;
  display: block;
}

.motif-avatar {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
}

.motif-avatar img {
  width: 250px;
  height: 250px;
  border-radius: 15px;
  object-fit: cover;
  display: block;
}

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.site-header h1 {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  color: var(--text);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.back-link {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
}

.muted-text {
  color: var(--muted);
}

.small-text {
  font-size: 0.7rem;
}

.medium-text {
  font-size: 0.85rem;
}

/* ── Sections ── */
section {
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

/* ── Links ── */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.avatar {
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;

  width: 40px;
  height: 40px;
}

.link-list {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}

.image-emoji {
  height: 1em;
  width: 1em;
  vertical-align: middle;
}

.links-divider {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.links-divider > span {
  color: grey;
}

/* ── Lists ── */
.home ul.plain-list {
  list-style: none;
  padding: 0;
}

.home ul.plain-list li {
  padding: 0.3rem 0;
}

.home ul.plain-list li:last-child {
  border-bottom: none;
}

.total-mrr {
  margin-top: 30px;
  margin-bottom: 30px;
  text-align: center;
}


/* ── Tip card ── */
.item-page-title {
  padding-bottom: 15px;
  border: 0px;

  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

.tip-amount-input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  width: 100px;
  border-radius: var(--btn-radius);
}

.tip-amount-input:focus {
  outline: 1px solid var(--accent);
}

.tip-page-screenshot {
  border-radius: var(--border-radius);
  box-shadow: 2px 2px 5px black
}

.desc {
  color: var(--slightly-muted);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}


.footer {
  margin-top: auto;
  pointer-events: none;
}

.logo {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-right {
  display: flex;
  align-items: center;
}

.user-menu,
.auth-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.username {
  font-size: 14px;
}

.nav-link {
  color: white;
  text-decoration: none;
  opacity: 0.85;
}

.nav-link:hover {
  opacity: 1;
}

.posts-link {
  text-align: center;
}

.posts-link > a {
  display: inline-block;
  text-decoration: none;
  font-size: 1.1em;
  margin: 12px 0 24px;
  transition: opacity 0.15s;
}

.f2p-username {
  color: var(--primary);
}

.superuser-username {
  color: #ba76ff;
}

.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}
.page-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9em;
}
.page-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}
.page-btn:hover:not(.active) {
  background: var(--card);
}

.spinners {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  width: 100%;
}

.spinners > img {
  max-height: 53px;
  flex-shrink: 0;
}


.construction-cheems {
  width: 100px;
  height: auto;
}

.construction-text {
  color: red;
}

/* Mobile view */
@media (max-width: 600px) {
  .construction-cheems {
    width: 50px;
  }
}
