:root { font-family: system-ui, Arial, sans-serif; }
body { margin: 0; background: #0b0f12; color: #e9eef2; }
a { color: inherit; }
.container { max-width: 980px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 520px; }
.nav { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; border-bottom:1px solid #1b242c; }
.brand { font-weight: 700; text-decoration:none; }
nav a, nav button { margin-left: 12px; opacity:.9; text-decoration:none; }
nav a.active { opacity:1; text-decoration:underline; }
.btn { background:#e9eef2; color:#0b0f12; padding:10px 14px; border-radius:10px; text-decoration:none; display:inline-block; border:0; cursor:pointer; }
.btn.secondary { background:transparent; color:#e9eef2; border:1px solid #2a3844; }
.linkbtn { background:transparent; border:0; color:#e9eef2; cursor:pointer; }
.lead { font-size: 1.1rem; opacity:.9; max-width: 70ch; }
.filters { display:flex; gap:10px; flex-wrap:wrap; margin: 16px 0; }
input, select, textarea { width: 100%; max-width: 320px; padding: 10px; border-radius:10px; border:1px solid #23313c; background:#0f151a; color:#e9eef2; }
textarea { max-width: 640px; }
.grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:12px; margin-top: 16px; }
.stack { display:flex; flex-direction:column; gap:12px; margin-top: 16px; }
.card { border:1px solid #1b242c; border-radius:14px; padding:14px; background:#0f151a; }
.muted { opacity:.75; }
.badge { display:inline-block; padding:4px 10px; border-radius:999px; border:1px solid #2a3844; font-size:.85rem; opacity:.9; }
label { display:block; margin: 10px 0; }

.site-footer { border-top: 1px solid #1b242c; margin-top: 40px; background:#0b0f12; }
.footer-inner { display:flex; justify-content:space-between; gap:24px; padding: 26px 24px; }
.footer-brand { max-width: 420px; }
.brand-mark { font-weight: 800; letter-spacing: .2px; }
.footer-manifesto { margin-top: 10px; }

.footer-links { display:flex; gap:28px; flex-wrap:wrap; }
.footer-col { display:flex; flex-direction:column; gap:8px; min-width: 140px; }
.footer-title { font-weight: 700; opacity: .9; margin-bottom: 6px; }
.footer-col a { text-decoration:none; opacity: .85; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom { display:flex; justify-content:space-between; align-items:center; gap:12px; padding: 14px 24px 26px; }
.footer-tagline { font-weight: 700; letter-spacing: .2px; }

@media (max-width: 800px) {
  .footer-inner { flex-direction:column; }
  .footer-bottom { flex-direction:column; align-items:flex-start; }
}

/* ---------- Homepage ---------- */

.home-hero {
  background-image: 
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.65)),
    url("/assets/images/homeback.png");
    
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  color: #ffffff;
}

.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero-logo {
  max-width: 220px;
  margin-bottom: 30px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 14px;
  letter-spacing: -0.3px;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 26px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.philosophy {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 50px 0;
}

.philosophy-block h2 {
  margin-bottom: 8px;
}

.tiers-preview {
  margin: 60px 0;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.tier-card {
  border: 1px solid #1b242c;
  padding: 18px;
  text-align: center;
  background: #0b0f12;
}

.tier-name {
  font-weight: 800;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 6px;
}

.text-link {
  display: inline-block;
  margin-top: 18px;
  text-decoration: none;
  font-weight: 600;
}

.closing {
  margin: 60px 0 40px;
  max-width: 720px;
}



.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 50px;      /* small + refined */
  width: auto;
  display: block;
}

@media (max-width: 640px) {
  .brand-logo {
    height: 50px;
  }
}

/* ---------- Header UserName ---------- */
.nav-username {
  margin-left: 12px;
  opacity: 0.85;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Event page ---------- */

.event-banner {
  position: relative;
  height: 320px;
  background: #111;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid #1b242c;
}

.event-tier {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 2; /* sits above the banner overlay */
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(11,15,18,0.85);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #2a3844;
}

.event-tier img {
  height: 28px;
}

.event-header {
  margin: 28px 0 14px;
}

.event-meta {
  opacity: 0.75;
  margin-top: 6px;
}


#eventDescription {
  white-space: pre-line;
}

.event-description {
  line-height: 1.7;
  margin: 24px 0;
}

.event-link a {
  display: inline-block;
  margin-top: 12px;
}

.event-divider {
  margin: 40px 0;
  border: none;
  border-top: 1px solid #1b242c;
}

.event-action {
  margin-bottom: 60px;
}

.hidden {
  display: none !important;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* Acheivement Form */
#achievementForm label,
#achievementForm legend {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

#achievementForm {
  text-align: left;
}

#achievementForm input[type="date"],
#achievementForm textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: inherit;
}

#achievementForm textarea {
  resize: vertical;
  max-width: 100%;
}


/* Rating layout */
.rating-group {
  border: none;
  padding: 0;
  margin: 18px 0 0 0;
}

.rating {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 6px;
  user-select: none;
}

.rating input {
  display: none;
}

.rating label {
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35); /* muted white */
  transition: color 0.15s ease, transform 0.05s ease;
}

/* Hover fills stars */
.rating label:hover,
.rating label:hover ~ label {
  color: #f5c518;
}

/* Selected fills stars */
.rating input:checked ~ label {
  color: #f5c518;
}

/* Tiny press feedback */
.rating label:active {
  transform: scale(0.96);
}

.rating-stars {
  color: #f5c518;
  letter-spacing: 1px;
}

#achievementForm input[type="checkbox"] {
  width: auto;
  max-width: none;
}

.icon-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(233,238,242,0.9);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  line-height: 0;
}

.icon-btn:hover {
  border-color: rgba(255,255,255,0.22);
}

.icon-btn.danger {
  color: #ff6b6b; /* red */
  border-color: rgba(255,107,107,0.25);
}

.icon-btn.danger:hover {
  border-color: rgba(255,107,107,0.45);
}

.icon-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Make the checkbox row behave like a left-aligned form row */
#achievementForm .checkbox {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 18px 0 0 0;  /* override the global label margin if needed */
  text-align: left;
}

/* Default banner image */
.event-banner {
  position: relative;
  height: 320px;
  background-image: url("/assets/banners/default.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid #1b242c;
}

.event-banner::after {
  content: "";
  position: absolute;
  inset: 0;
pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(11,15,18,0.15),
    rgba(11,15,18,0.75)
  );
}

/* ---------- Auth forms ---------- */

.auth-form {
  width: 100%;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.field span {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: 0.92;
}

.auth-form input,
.auth-form textarea,
.auth-form select {
  width: 100%;
  max-width: none; /* overrides your global max-width:320px */
  box-sizing: border-box;
}

.hint {
  display: block;
  margin-top: 6px;
  font-size: 0.9rem;
  opacity: 0.65;
}

.form-msg {
  margin: 0;
  min-height: 1.2em; /* prevents layout jump */
}

.input-error {
  border-color: #b94a48 !important;
}

.error-text {
  color: #ffb3b3;
  opacity: 0.95;
  font-weight: 600;
}

.error-text a {
  text-decoration: underline;
}

/*------Tier Tally Table ------ */
.tier-tally-table {
  width: 100%;
  border-collapse: collapse;
}
.tier-tally-table th, .tier-tally-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tier-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tier-badge {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.count-cell {
  text-align: center;
  font-weight: 700;
}

.rule5-score-wrapper {
  margin-top: 20px;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}

.rule5-score-label {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
}

.rule5-score-value {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 6px;
}

/*------Tiers Page ------ */
.tier-card {
  position: relative;
}

.tier-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  opacity: 0.85;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}


/*------Sliders Style ------ */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #23313c;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: #e9eef2;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider {
  background-color: #f5c518; /* gold accent */
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}
