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

body {
  min-height: 100vh;
  background: #f5f0e8;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(180,160,120,0.18) 28px),
    repeating-linear-gradient(90deg, transparent, transparent 27px, rgba(180,160,120,0.08) 28px);
  font-family: 'Nunito', sans-serif;
  padding: 2rem 1rem 4rem;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.torn-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 18px;
  background: #e8e0ce;
  clip-path: polygon(0% 0%, 2% 100%, 5% 20%, 8% 95%, 11% 10%, 14% 85%, 17% 15%, 20% 95%, 23% 25%, 26% 90%, 29% 10%, 32% 85%, 35% 20%, 38% 100%, 41% 15%, 44% 90%, 47% 20%, 50% 100%, 53% 15%, 56% 85%, 59% 30%, 62% 95%, 65% 10%, 68% 80%, 71% 20%, 74% 90%, 77% 15%, 80% 85%, 83% 25%, 86% 95%, 89% 10%, 92% 80%, 95% 20%, 98% 100%, 100% 0%);
  z-index: 100;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding-top: 1rem;
}

/* ── CAPTCHA OVERLAY ── */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 28, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.3s ease;
}

.captcha-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.captcha-card {
  background: #fff9ee;
  border: 3.5px solid #3a2a1a;
  border-radius: 20px;
  box-shadow: 8px 8px 0 #3a2a1a;
  padding: 2rem 1.8rem 1.8rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  transform: rotate(-0.6deg);
  animation: cardPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardPop {
  from { transform: rotate(-0.6deg) scale(0.85); opacity: 0; }
  to   { transform: rotate(-0.6deg) scale(1);    opacity: 1; }
}

.captcha-icon {
  font-size: 3rem;
  margin-bottom: 0.6rem;
  display: block;
}

.captcha-card h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.65rem;
  color: #2d1a0a;
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}

.captcha-card p {
  font-size: 0.82rem;
  font-weight: 700;
  color: #8b5a2b;
  margin-bottom: 1.4rem;
  line-height: 1.5;
}

.captcha-widget-wrap {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.captcha-footer-note {
  margin-top: 1rem;
  font-size: 0.68rem;
  color: #b09060;
  font-weight: 700;
}

/* ── PROFILE ── */
.profile-area {
  text-align: center;
  margin-bottom: 2rem;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.9rem;
}

.avatar-box {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  border: 4px solid #3a2a1a;
  box-shadow: 6px 6px 0 #3a2a1a;
  overflow: hidden;
  transform: rotate(-2deg);
  background: #7ec850;
}

.status-dot {
  position: absolute;
  bottom: -5px; right: -5px;
  width: 22px; height: 22px;
  background: #5dde3b;
  border: 3px solid #3a2a1a;
  border-radius: 50%;
  box-shadow: 2px 2px 0 #3a2a1a;
}

.name-tag {
  background: #fff9ee;
  border: 3px solid #3a2a1a;
  border-radius: 14px;
  box-shadow: 5px 5px 0 #3a2a1a;
  display: inline-block;
  padding: 7px 28px 8px;
  margin-bottom: 8px;
  transform: rotate(0.6deg);
}

.name-tag h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2.2rem;
  color: #2d1a0a;
  letter-spacing: 1px;
  line-height: 1;
}

.bio {
  font-size: 0.88rem;
  color: #6b4e2a;
  font-weight: 700;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: #8b5a2b;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 1.8rem 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before,
.section-label::after {
  content: '';
  flex: 1;
  height: 2.5px;
  background: repeating-linear-gradient(90deg, #c9a87a 0, #c9a87a 6px, transparent 6px, transparent 10px);
}

/* ── SOCIAL BUTTONS ── */
.social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border: 3px solid #3a2a1a;
  border-radius: 13px;
  box-shadow: 4px 4px 0 #3a2a1a;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #2d1a0a;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
}

.social-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #3a2a1a;
}

.social-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #3a2a1a;
}

.social-btn .sicon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.12);
  color: #fff;
}

.btn-yt  { background: #fff0f0; } .btn-yt  .sicon { background: #e8292b; }
.btn-tt  { background: #fff0f5; } .btn-tt  .sicon { background: #010101; }
.btn-ig  { background: #fff5f9; } .btn-ig  .sicon { background: linear-gradient(135deg,#f9a825,#e91e8c,#9c27b0); }
.btn-dc  { background: #f0f2ff; } .btn-dc  .sicon { background: #5865f2; }
.btn-x   { background: #f0f0f0; } .btn-x   .sicon { background: #111; }
.btn-fb  { background: #eef3ff; } .btn-fb  .sicon { background: #1877f2; }

.donate-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fffaf0;
  border: 2.5px solid #5a3a1a;
  border-radius: 18px;
  box-shadow: 4px 4px 0 #5a3a1a;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.12s, box-shadow 0.12s;
  margin-bottom: 4px;
}
.donate-card:hover { transform: translateY(-2px); box-shadow: 6px 6px 0 #5a3a1a; }
.donate-card:active { transform: translateY(2px); box-shadow: 2px 2px 0 #5a3a1a; }
.donate-icon {
  width: 48px; height: 48px;
  background: #ff6b35;
  border-radius: 14px;
  border: 2px solid #5a3a1a;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}
.donate-icon img { width: 28px; height: 28px; object-fit: contain; }
.donate-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.donate-name { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 1rem; color: #2d1a0a; }
.donate-sub  { font-family: 'Nunito', sans-serif; font-size: 0.78rem; color: #8a6a4a; }
.donate-arrow { color: #e8292b; font-size: 1.3rem; flex-shrink: 0; }

/* ── SEARCH BAR ── */
.search-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: #8b5a2b;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid #3a2a1a;
  background: #3a2a1a;
  color: #f5f0e8;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.08s;
  padding: 0;
}

.search-clear.visible { display: flex; }

.search-clear:hover {
  background: #5a3a1a;
  transform: translateY(-50%) scale(1.1);
}

.search-input {
  width: 100%;
  padding: 11px 40px 11px 40px;
  border: 3px solid #3a2a1a;
  border-radius: 13px;
  box-shadow: 4px 4px 0 #3a2a1a;
  background: #fff9ee;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  color: #2d1a0a;
  outline: none;
  transition: box-shadow 0.08s, transform 0.08s;
}

.search-input::placeholder { color: #c9a87a; }

.search-input:focus {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #3a2a1a;
}

.search-result-info {
  font-size: 0.75rem;
  font-weight: 700;
  color: #8b5a2b;
  margin-bottom: 0.7rem;
  text-align: center;
  display: none;
}

.search-result-info.visible { display: block; }

/* ── CATEGORY LIST ── */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 3px solid #3a2a1a;
  border-radius: 14px;
  box-shadow: 4px 4px 0 #3a2a1a;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  position: relative;
}

.cat-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #3a2a1a;
}

.cat-item:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #3a2a1a;
}

.cat-item.active .cat-arrow { transform: rotate(90deg); }

.cat-rp     { background: #eafada; border-left: 7px solid #5bc850; }
.cat-mod    { background: #e3eefc; border-left: 7px solid #5ba3e0; }
.cat-addon  { background: #fef3e8; border-left: 7px solid #e0875b; }
.cat-plugin { background: #f5eafd; border-left: 7px solid #b85be0; }

.cat-emoji {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 36px; text-align: center;
}

.cat-text { flex: 1; }
.cat-text h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1rem;
  color: #2d1a0a;
  line-height: 1.1;
}

.cat-text span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #7a5a3a;
}

.cat-count {
  font-family: 'Fredoka One', cursive;
  font-size: 0.95rem;
  color: #7a5a3a;
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 20px;
  padding: 2px 10px;
  flex-shrink: 0;
}

.cat-arrow {
  font-size: 18px;
  color: #3a2a1a;
  transition: transform 0.2s;
  flex-shrink: 0;
}

/* ── FILE CARDS ── */
.cat-files {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-left: 10px;
}

.cat-files.open { display: flex; }

.file-card {
  background: #fffdf6;
  border: 2.5px solid #3a2a1a;
  border-radius: 12px;
  box-shadow: 4px 4px 0 #3a2a1a;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.08s, box-shadow 0.08s;
  position: relative;
  overflow: hidden;
}

.file-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #3a2a1a;
}

.file-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 5px;
}

.fc-rp::before    { background: #5bc850; }
.fc-mod::before   { background: #5ba3e0; }
.fc-addon::before { background: #e0875b; }
.fc-plugin::before{ background: #b85be0; }

.fc-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 2px solid #3a2a1a;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.fi-rp    { background: #d4f0a8; }
.fi-mod   { background: #b3d9f5; }
.fi-addon { background: #f5d0a8; }
.fi-plugin{ background: #e0b3f5; }

.fc-info { flex: 1; min-width: 0; }
.fc-info h4 {
  font-family: 'Fredoka One', cursive;
  font-size: 0.9rem;
  color: #2d1a0a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}

.fc-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }

.badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1.5px solid rgba(0,0,0,0.2);
  letter-spacing: 0.2px;
}

.badge-mc  { background: #fff3b0; color: #6b4e00; }
.badge-ver { background: #e8e8e8; color: #3a3a3a; }
.badge-vv  { background: linear-gradient(90deg,#ff6fd8,#f9a825); color: #fff; font-weight: 800; }
.badge-creator { background: #e8f4ff; color: #1a5fa8; }

.dl-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 2.5px solid #3a2a1a;
  background: #3a2a1a;
  color: #f5f0e8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 3px 3px 0 #7a5a3a;
  font-size: 16px;
  flex-shrink: 0;
  text-decoration: none;
  transition: all 0.08s;
}

.dl-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #7a5a3a;
}

.dl-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #7a5a3a;
}

/* ── PAGINATION ── */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 0 2px;
}

.pg-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  border: 2.5px solid #3a2a1a;
  background: #fff9ee;
  color: #3a2a1a;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 3px 3px 0 #3a2a1a;
  font-size: 16px;
  transition: all 0.08s;
  flex-shrink: 0;
}

.pg-btn:hover:not(:disabled) {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #3a2a1a;
  background: #3a2a1a;
  color: #f5f0e8;
}

.pg-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #3a2a1a;
}

.pg-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: 2px 2px 0 #3a2a1a;
}

.pg-info {
  font-family: 'Fredoka One', cursive;
  font-size: 0.82rem;
  color: #7a5a3a;
  background: rgba(255,255,255,0.7);
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 20px;
  padding: 3px 12px;
  min-width: 70px;
  text-align: center;
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}

.empty-box {
  display: inline-block;
  background: #fff9ee;
  border: 3px dashed #c9a87a;
  border-radius: 16px;
  padding: 2rem 3rem;
}

.empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }

.empty-box p {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1rem;
  color: #8b6a3a;
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.72rem;
  color: #b09060;
  font-weight: 700;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #ede8d8; }
::-webkit-scrollbar-thumb { background: #c9a87a; border-radius: 4px; }

/* ── SEARCH HIGHLIGHT ── */
.highlight {
  background: #ffe066;
  border-radius: 3px;
  padding: 0 1px;
}
