* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Make layout full-height and footer stick to bottom */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

:root {
    --bg-body: #121212;
    --bg-card: rgba(10, 10, 10, 0.86);
    --bg-card-strong: rgba(5, 5, 5, 0.94);
    --bg-secondary: rgba(20, 20, 20, 0.9);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-primary: #00c7d3;
    --accent-hover: #00e0f0;
    --accent-pill: #03d6dd;
    --accent-pill-inner: #f9f9f9;
    --border-color: rgba(255, 255, 255, 0.05);
    --radius: 14px;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.65);
    --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.6);
}

/* body is flex column so footer stays at bottom */
body {
    display: flex;
    flex-direction: column;

    background-color: #121212;
    background-image: url("https://i.postimg.cc/TYGf8pqZ/Black-Orange-and-White-Illustrated-Weekend-Market-Instagram-Post.png");
    background-repeat: no-repeat;
    background-position: center top;
    background-attachment: fixed;
    background-size: cover;

    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    line-height: 1.6;
}

/* main content flexes to fill, pushing footer to bottom */
.content-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 32px;
    flex: 1 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* ============================================================
   GLASS HELPERS
   ============================================================ */

.glass-panel {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(6px);
    transition:
        transform 0.12s ease-out,
        box-shadow 0.18s ease-out,
        border-color 0.15s ease-out,
        background 0.18s ease-out;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.9);
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15,15,20,0.9);
}

.glass-panel-strong {
    background: var(--bg-card-strong);
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.7);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.glass-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: var(--shadow-subtle);
    backdrop-filter: blur(4px);
    transition:
        transform 0.12s ease-out,
        box-shadow 0.16s ease-out,
        border-color 0.16s ease-out;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.85);
    border-color: rgba(255,255,255,0.14);
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    width: 100%;
    background: linear-gradient(to bottom, rgba(5,5,5,0.96), rgba(5,5,5,0.92));
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 12px 30px rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    font-size: 22px;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: -0.5px;
    margin-right: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    line-height: 1;
}

.nav-center {
    display: flex;
    gap: 24px;
}

@media (max-width: 640px) {
    .nav-center {
        gap: 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 4px 6px;
        margin: 0 8px;
    }
}

.nav-item {
    position: relative;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    padding: 4px 0;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.18s ease-out;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #00c7d3, #ffd65c);
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    transition: transform 0.18s ease-out, opacity 0.18s ease-out;
}

.nav-item:hover {
    color: var(--text-main);
}

.nav-item:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

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

.profile-btn, .logout-btn, .login-btn, .register-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.6);
    color: var(--text-main);
    cursor: pointer;
    transition:
        transform 0.12s ease-out,
        box-shadow 0.16s ease-out,
        border-color 0.16s ease-out,
        background 0.16s ease-out;
}

.logout-btn:hover, .login-btn:hover, .profile-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.35);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.7);
}

.register-btn {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
}

.register-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0,0,0,0.75);
}

/* ============================================================
   LAYOUT
   ============================================================ */

.two-column-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 260px;
    padding: 20px 18px;
    position: sticky;
    top: 84px;
    height: fit-content;
    max-height: 85vh;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.sidebar-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.sidebar-section {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 800;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.sidebar-option {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
    padding: 7px 10px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.16s ease-out, color 0.16s ease-out, transform 0.1s ease-out;
}

.sidebar-option:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    transform: translateX(2px);
}

.sidebar-option.active {
    background: var(--accent-primary);
    color: #000;
}

/* Main column */
.main-content {
    flex: 1;
    width: 100%;
}

/* ============================================================
   CARDS / GRID
   ============================================================ */

.creature-grid, .listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    padding-top: 10px;
}

.creature-card, .listing-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.16s ease, background 0.18s ease;
}

.creature-card:hover, .listing-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 30px rgba(0,0,0,0.9);
    background: radial-gradient(circle at top, rgba(0,199,211,0.18), rgba(0,0,0,0.9));
}

.creature-img, .listing-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #050505;
    margin-bottom: 10px;
    transition: transform 0.18s ease-out;
}

.creature-card:hover .creature-img,
.listing-card:hover img {
    transform: scale(1.04);
}

.creature-name, .listing-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.creature-category-label {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.creature-val {
    font-size: 13px;
}

.shoom-value {
    color: var(--accent-primary);
}

/* ============================================================
   SEARCH & BUTTONS
   ============================================================ */

.search-container {
    display: flex;
    gap: 10px;
    background: var(--bg-card);
    padding: 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.search-input-box {
    flex: 1;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 15px;
    transition: 0.2s;
}

.search-input-box:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0,199,211,0.4);
}

/* pill search bar */
.search-bar-pill {
    display: flex;
    align-items: center;
    padding: 4px 4px 4px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    background: rgba(0,0,0,0.72);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.75);
}

.search-pill-input {
    flex: 1;
    border: none;
    outline: none;
    background: var(--accent-pill-inner);
    color: #333;
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 999px;
}

.search-pill-input::placeholder {
    color: #999;
}

.search-pill-button {
    border: none;
    outline: none;
    background: var(--accent-primary);
    color: #002326;
    width: 42px;
    height: 42px;
    margin-left: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-pill-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

/* Buttons */

.btn-gold {
    display: inline-block;
    padding: 10px 20px;
    background: var(--accent-primary);
    color: #000;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 199, 211, 0.25);
}

.btn-gold:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 199, 211, 0.4);
}

.full-width {
    width: 100%;
}

.btn-small {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    background: var(--accent-primary);
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    transition: transform 0.12s ease-out, box-shadow 0.16s ease-out, background 0.16s ease-out;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.75);
    background: var(--accent-hover);
}

/* ============================================================
   VALUES PAGE
   ============================================================ */

.values-header {
    margin-bottom: 18px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

/* ============================================================
   CREATURE DETAIL PAGE
   ============================================================ */

.creature-page {
    max-width: 1200px;
    margin: 0 auto 32px;
}

.creature-header-row {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.creature-header-left {
  width: 380px;
  flex-shrink: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 14px 32px rgba(0,0,0,0.85);
  background: radial-gradient(circle at center, #111 0%, #000 65%);
  overflow: hidden;
}

.creature-header-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.creature-big-img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: contain;
    object-position: center;
    transition: transform 0.24s ease-out;
}

.creature-header-left:hover .creature-big-img {
    transform: scale(1.03);
}

.creature-main-info {
    padding: 18px 18px 16px;
}

.creature-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
}

.creature-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.creature-meta-label {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.creature-meta-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.14);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.85);
}

.creature-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.creature-stat {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
}

.creature-stat .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.65);
    margin-bottom: 2px;
}

.creature-stat .stat-value {
    font-size: 14px;
    font-weight: 600;
}

.creature-description {
    margin-top: 6px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

.creature-actions {
    padding: 12px 14px;
}

/* lower part: summary / similar / trades */

.creature-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 18px;
}

.creature-lower-left,
.creature-lower-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-block {
    padding: 15px 16px;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
}

.info-title {
    font-size: 15px;
    color: var(--accent-primary);
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.info-line {
    font-size: 13px;
    margin-bottom: 4px;
}
.info-line span {
    color: rgba(255,255,255,0.6);
    margin-right: 4px;
}

.info-empty {
    font-size: 13px;
    color: var(--text-muted);
}

/* similar items */

.similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.similar-card {
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--text-main);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.similar-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.85);
  border-color: var(--accent-primary);
}

.similar-card img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  background: #050505;
  margin-bottom: 6px;
}

.similar-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.similar-value {
  font-size: 12px;
  color: #aaa;
}

/* ============================================================
   TRADERIE-STYLE TRADES GRID (SMALL BOXES)
   ============================================================ */

/* center-column container for active trades under header */
.creature-trades-center {
    max-width: 1100px;
    margin: 0 auto 36px;
}

/* filter row with dropdowns */
.trades-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.trades-filter-row > div {
    min-width: 150px;
}

.trades-filter-row label.form-label {
    font-size: 13px;
}

/* grid of trade cards */
.trade-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

/* compact trade card (no big image) */
.trade-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.82);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    transition: transform 0.15s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.trade-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.9);
    border-color: var(--accent-primary);
}

.trade-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.trade-header-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.trade-user,
.trade-amount {
    font-weight: 700;
    font-size: 13px;
}

.trade-type-pill {
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.16);
}

.trade-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.85);
}

.trade-meta-tag {
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.trade-price-line {
    font-size: 12px;
    margin-top: 1px;
}

.trade-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 6px;
    margin-left: 6px;
}

.trade-time {
    font-size: 10px;
    color: var(--text-muted);
}

/* small icons for palette / plushies / mutations / any items */
.trade-small-icon {
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

/* Amount filter popover */

.amount-filter-wrapper {
    position: relative;
    display: inline-block;
}

.amount-filter-button {
    width: 100%;
    text-align: left;
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.75);
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
}

.amount-filter-button span {
    opacity: 0.85;
}

.amount-popup {
    position: absolute;
    top: 110%;
    left: 0;
    z-index: 50;
    width: 260px;
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: rgba(5,5,5,0.96);
    border: 1px solid rgba(255,255,255,0.16);
    box-shadow: 0 14px 30px rgba(0,0,0,0.85);
    display: none;
}

.amount-popup.active {
    display: block;
}

.amount-popup-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.amount-popup-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.amount-popup-row input {
    flex: 1;
}

.amount-popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.amount-popup-actions button {
    padding: 5px 12px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.amount-popup-clear {
    background: transparent;
    color: rgba(255,255,255,0.75);
}

.amount-popup-done {
    background: var(--accent-primary);
    color: #000;
}

/* ============================================================
   CHAT / MESSAGES PAGE
   ============================================================ */

.chat-page {
    max-width: 1100px;
    margin: 0 auto 32px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
}

/* sidebar */

.chat-sidebar {
    padding: 16px 14px;
    border-radius: 16px;
    max-height: 75vh;
    display: flex;
    flex-direction: column;
}

.chat-sidebar-header {
    margin-bottom: 10px;
}

.chat-sidebar-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.chat-convo-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 4px;
}

.chat-convo-link {
    text-decoration: none;
    color: inherit;
}

.chat-convo-item {
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
    background: rgba(0,0,0,0.5);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease-out, border-color 0.15s ease-out, transform 0.1s ease-out;
}

.chat-convo-item:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.chat-convo-item.active-convo {
    border-color: var(--accent-primary);
    background: rgba(0,0,0,0.8);
}

.chat-convo-title {
    font-size: 13px;
    font-weight: 600;
}

.chat-convo-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

/* main chat panel */

.chat-main {
    padding: 14px 14px 12px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    max-height: 75vh;
}

.chat-header-bar {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-with-title {
    font-size: 18px;
    font-weight: 700;
}

/* messages */

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: 10px;
}

.chat-message {
    display: flex;
    margin-bottom: 6px;
}

.chat-me {
    justify-content: flex-end;
}

.chat-them {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 70%;
    padding: 8px 11px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.chat-me .chat-bubble {
    background: var(--accent-primary);
    color: #000;
    border-bottom-right-radius: 4px;
}

.chat-them .chat-bubble {
    background: rgba(255,255,255,0.08);
    border-bottom-left-radius: 4px;
}

/* input row */

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.chat-input-box {
    flex: 1;
    padding: 9px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.8);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
}

.chat-input-box:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0,199,211,0.4);
}

.chat-send-btn {
    padding: 8px 18px;
    border-radius: 999px;
}

/* ============================================================
   LISTING PAGE
   ============================================================ */

.listing-page {
    max-width: 1100px;
    margin: 0 auto 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.listing-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr);
    gap: 14px;
}

.listing-left {
    padding: 12px 14px 16px;
}

.listing-back-link {
    display: inline-block;
    font-size: 13px;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

.listing-main {
    display: flex;
    gap: 14px;
}

.listing-image-wrap {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    background: #050505;
    border: 1px solid rgba(255,255,255,0.12);
    flex-shrink: 0;
}

.listing-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease-out;
}

.listing-image-wrap:hover img {
    transform: scale(1.05);
}

.listing-main-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.listing-title {
    font-size: 20px;
    font-weight: 800;
}

.listing-meta-line {
    display: flex;
    gap: 6px;
    font-size: 13px;
}

.listing-meta-label {
    color: rgba(255,255,255,0.7);
}

.listing-meta-value {
    color: #fff;
}

.listing-seller-block {
    margin-top: 6px;
}

.listing-seller-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.listing-seller-name {
    font-weight: 600;
    font-size: 14px;
}

/* right side: offer panel */

.listing-right {
    padding: 14px 16px 16px;
}

.listing-offer-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.listing-offer-text {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 10px;
}

.listing-offer-form .form-section {
    margin-bottom: 10px;
}

.listing-offer-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.listing-cancel-link {
    font-size: 13px;
    color: var(--text-muted);
}

.listing-cancel-link:hover {
    color: var(--text-main);
}

.listing-offer-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* offers list */

.listing-offers {
    padding: 10px 14px 14px;
}

.listing-offers-header {
    margin-bottom: 8px;
}

.listing-offers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.listing-offer-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.82);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.12s ease-out, box-shadow 0.16s ease-out, border-color 0.16s ease-out;
}

.listing-offer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.85);
    border-color: rgba(255,255,255,0.14);
}

.offer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.offer-user-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.offer-username {
    font-weight: 700;
}

.offer-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

.offer-status-pending {
    background: rgba(255,255,255,0.06);
}

.offer-status-accepted {
    background: rgba(0,200,120,0.2);
}

.offer-status-declined {
    background: rgba(220,60,60,0.25);
}

.offer-line {
    font-size: 13px;
}

.offer-label {
    color: rgba(255,255,255,0.7);
    margin-right: 4px;
}

.offer-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-left: 8px;
}

/* responsive */

@media (max-width: 900px) {
    .listing-top-row {
        grid-template-columns: 1fr;
    }
    .listing-main {
        flex-direction: column;
    }
    .listing-image-wrap {
        width: 100%;
        max-width: 220px;
        height: 180px;
    }
}


/* ============================
   PROFILE PAGE LAYOUT
   ============================ */

.profile-page {
  max-width: 1100px;
  margin: 40px auto;
}

/* top dark bar */
.profile-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  margin-bottom: 10px;
}

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

.profile-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.profile-avatar img:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 22px rgba(0,0,0,0.8);
}

.profile-header-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-username-row h1 {
  font-size: 22px;
  margin: 0;
}

.profile-header-meta {
  font-size: 12px;
  opacity: 0.85;
  display: flex;
  gap: 12px;
}

/* listings bar */
.profile-listings-bar {
  padding: 8px 14px 10px;
  margin-top: 6px;
}

.profile-listings-grid {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* each listing row inside profile */
.profile-listing-card {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.15s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.profile-listing-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.85);
  border-color: var(--accent-primary);
}

/* left: thumb + text */
.pl-card-main {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
}

.pl-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #050505;
  flex-shrink: 0;
}

.pl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pl-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pl-title-link {
  font-size: 14px;
  font-weight: 700;
}

.pl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
}

.pl-tag {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.pl-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
}

.pl-meta-pill {
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}

.pl-price-line {
  font-size: 12px;
  margin-top: 2px;
}

/* right: buttons + time */
.pl-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  margin-left: 8px;
}

.pl-time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-container {
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:60vh;
}

.auth-card {
    max-width:380px;
    width:100%;
    padding:22px 20px 24px;
    border-radius:16px;
    background:var(--bg-card);
    border:1px solid rgba(255,255,255,0.12);
    box-shadow:var(--shadow-soft);
}

.auth-title {
    font-size:22px;
    font-weight:700;
    margin-bottom:14px;
}

.auth-label {
    display:block;
    font-size:13px;
    margin-top:10px;
    margin-bottom:4px;
}

.auth-input {
    width:100%;
    padding:9px 11px;
    border-radius:9px;
    border:1px solid rgba(255,255,255,0.18);
    background:rgba(0,0,0,0.8);
    color:var(--text-main);
    outline:none;
}

.auth-input:focus {
    border-color:var(--accent-primary);
}

.auth-btn {
    margin-top:16px;
    width:100%;
    padding:9px 12px;
    border-radius:9px;
    border:none;
    background:var(--accent-primary);
    color:#000;
    font-weight:600;
    cursor:pointer;
    transition: background 0.16s ease-out, transform 0.1s ease-out, box-shadow 0.16s ease-out;
}

.auth-btn:hover {
    background:var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.75);
}

.auth-error {
    color:#ff8888;
    font-size:13px;
    margin-bottom:8px;
}

.auth-link-text {
    margin-top:12px;
    font-size:13px;
    color:var(--text-muted);
}

.auth-link {
    color:var(--accent-primary);
}

/* ============================================================
   LEADERBOARD / PODIUM
   ============================================================ */

.leaderboard-page {
    max-width: 1000px;
    margin: 0 auto;
}

.leaderboard-title {
    margin-bottom: 24px;
}

.podium-wrapper {
    margin: 0 auto 28px;
    padding: 24px 20px 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.05), transparent 55%),
                var(--bg-card-strong);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 14px 36px rgba(0,0,0,0.85);
}

.podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 12px;
    border-radius: 16px 16px 6px 6px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.08), transparent 55%),
                rgba(0,0,0,0.85);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 10px 24px rgba(0,0,0,0.75);
    position: relative;
}

.podium-1 {
    transform: translateY(-8px);
    height: 210px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.12), transparent 55%),
                rgba(0,0,0,0.92);
    border-color: rgba(255,215,0,0.6);
}

.podium-2 {
    height: 180px;
}

.podium-3 {
    height: 170px;
}

.podium-1::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.6);
    opacity: 0.7;
    pointer-events: none;
}

.podium-rank-label {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #ffd766;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.podium-crown {
    position: absolute;
    top: -12px;
    font-size: 30px;
}

.podium-user {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.podium-points {
    font-size: 14px;
    color: var(--accent-primary);
}

.podium-empty {
    font-size: 13px;
    color: var(--text-muted);
}

.leaderboard-table-wrapper {
    margin-top: 10px;
    padding: 16px 18px 12px;
    border-radius: 16px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.leaderboard-table thead tr {
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 8px 6px;
    text-align: left;
}

.leaderboard-table th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.7);
}

.leaderboard-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.03);
}

/* ============================================================
   ADD LISTING PAGE
   ============================================================ */

.add-listing-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 22px 22px;
    border-radius: 18px;
}

.add-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.add-listing-form {
    margin-top: 4px;
}

.form-row-2 {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.form-section {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}

.gold-input {
    width: 100%;
    padding: 9px 11px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.75);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.gold-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px rgba(0,199,211,0.4);
    background: rgba(0,0,0,0.9);
}

.gold-input.textarea {
    resize: vertical;
}

.field-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background:#050505;
}

/* Tabs */

.listing-type-tabs {
    display: inline-flex;
    background: rgba(0,0,0,0.6);
    border-radius: 999px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,0.15);
}

.listing-type-tab {
    border: none;
    outline: none;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.15s ease-out, color 0.15s ease-out, transform 0.1s ease-out;
}

.listing-type-tab.active {
    background: var(--accent-primary);
    color: #000;
    transform: translateY(-1px);
}

/* Pricing / checkboxes */

.pricing-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-bottom: 10px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.custom-checkbox-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.45);
    box-sizing: border-box;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox-circle {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
}

.pricing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
}

.pricing-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.pricing-icon {
    width: 20px;
    height: 20px;
}

/* Or divider */

.or-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 4px;
}

.or-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.15);
}

.or-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.6);
}

/* Autocomplete */

.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: rgba(5,5,5,0.98);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    max-height: 260px;
    overflow-y: auto;
    z-index: 40;
    display: none;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 14px;
}

.autocomplete-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    background:#050505;
}

.autocomplete-item:hover {
    background: rgba(255,255,255,0.06);
}

.add-listing-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.link-muted {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.link-muted:hover {
    color: rgba(255,255,255,0.85);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 16px;
    margin-top: 6px;
}

.option-field {
    min-width: 0;
}

.field-hint {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

/* Chips */

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.item-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    font-size: 12px;
}

.chip-remove {
    cursor: pointer;
    font-size: 12px;
    opacity: 0.7;
}

.chip-remove:hover {
    opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .two-column-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 16px;
        padding: 16px 14px;
        border-radius: 12px;
    }

    .content-container {
        padding: 20px 12px 28px;
    }

    .creature-header-row {
        flex-direction: column;
    }

    .creature-header-left {
        width: 100%;
    }

    .creature-lower-grid {
        grid-template-columns: 1fr;
    }

    .chat-layout {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        max-height: none;
    }

    .chat-main {
        max-height: 65vh;
    }

    .podium-wrapper {
        grid-template-columns: 1fr;
        max-width: 360px;
    }
    .podium-1, .podium-2, .podium-3 {
        height: auto;
        transform: none;
    }
    .podium-crown {
        top: -6px;
    }
}

@media (max-width: 480px) {
    .creature-grid, .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .creature-card, .listing-card {
        padding: 8px;
    }

    .creature-img, .listing-card img {
        height: 120px;
    }

    .search-bar-pill {
        padding: 4px 4px 4px 10px;
    }

    .search-pill-input {
        font-size: 14px;
        padding: 9px 12px;
    }

    .search-pill-button {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .btn-gold {
        width: 100%;
    }

    .trade-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================
   SITE FOOTER
   ============================ */

.site-footer {
    margin-top: 40px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.04), rgba(0,0,0,0.96));
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 18px 0 12px;
    font-size: 13px;
    flex-shrink: 0;
}

.site-footer-inner {
    max-width: 1100px;
    margin: 0 auto 10px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.site-footer-title {
    font-size: 18px;
    margin-bottom: 4px;
}

.site-footer-text {
    opacity: 0.85;
    line-height: 1.4;
}

.site-footer-heading {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.site-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer-links li + li {
    margin-top: 2px;
}

.site-footer-links a {
    color: rgba(255,255,255,0.85);
    font-size: 13px;
}

.site-footer-links a:hover {
    color: var(--accent-primary);
}

.site-footer-bottom {
    max-width: 1100px;
    margin: 6px auto 0;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    opacity: 0.85;
}

.site-footer-note {
    text-align: right;
}

/* ============================
   CREDITS PAGE
   ============================ */

.credits-page {
    max-width: 1100px;
    margin: 32px auto 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.credits-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.credits-icon span {
    font-size: 26px;
}

.credits-header-text h1 {
    margin: 0 0 4px;
    font-size: 24px;
}

.credits-header-text p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.credits-section {
    padding: 12px 16px 16px;
}

.credits-section-header h2 {
    margin: 0 0 2px;
    font-size: 18px;
}

.credits-section-header p {
    margin: 0 0 10px;
    font-size: 13px;
    opacity: 0.9;
}

/* main developer card */
.credits-main-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.08);
}

.credits-main-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.25);
}

.credits-main-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.credits-main-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.credits-main-name {
    margin: 0;
    font-size: 18px;
}

.credits-main-tag {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
}

.credits-main-text {
    font-size: 13px;
    opacity: 0.9;
}

.credits-main-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

/* grid for other contributors */
.credits-grid {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.credits-grid-card {
    width: 210px;
    padding: 8px 9px;
    border-radius: 12px;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    gap: 8px;
}

.credits-grid-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
}

.credits-grid-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.credits-grid-name {
    font-weight: 600;
    font-size: 14px;
}

.credits-grid-role {
    font-size: 11px;
    opacity: 0.9;
}

.credits-grid-text {
    font-size: 12px;
    opacity: 0.9;
}

/* small screen tweaks */
@media (max-width: 768px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
    }
    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .credits-main-card {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */

.notifications-page {
    max-width: 900px;
    margin: 0 auto 32px;
}

.notifications-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-card {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.notification-main {
    flex: 1;
    min-width: 0;
}

.notification-text {
    margin: 0 0 4px;
    color: #f7d98f;
    font-size: 14px;
}

.notif-time {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.notification-actions {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.notif-clear-btn {
    background: #b33;
}

.notif-clear-btn:hover {
    background: #d64545;
}

.notification-empty {
    padding: 14px 16px;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}

/* ============================================================
   CHAT PAGE (CONVERSATION VIEW)
   ============================================================ */

.chat-page {
    margin-bottom: 24px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
}

.chat-sidebar {
    padding: 12px 14px;
}

.chat-main {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-with-title {
    font-size: 18px;
    font-weight: 700;
}

/* trade card at top of chat */

.chat-trade-card {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.06);
}

.chat-trade-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #050505;
}

.chat-trade-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-trade-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.chat-trade-title {
    font-weight: 700;
    font-size: 15px;
}

.chat-trade-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-accepted {
    background: rgba(0,200,120,0.2);
}

/* messages */

.chat-messages {
    flex: 1;
    min-height: 220px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-me {
    align-self: flex-end;
    text-align: right;
}

.chat-them {
    align-self: flex-start;
}

.chat-bubble {
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 14px;
    background: rgba(255,255,255,0.05);
}

.chat-me .chat-bubble {
    background: var(--accent-primary);
    color: #000;
}

.chat-time {
    margin-top: 2px;
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

/* input */

.chat-input-row {
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
}

.chat-send-btn {
    flex-shrink: 0;
}

/* ======================================
   OFFERS DASHBOARD
   ====================================== */

.offers-page {
    margin: 24px auto 40px;
    max-width: 1100px;
}

.offers-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.offers-main-tab {
    position: relative;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    background: rgba(0,0,0,0.6);
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease-out, color 0.15s ease-out, transform 0.1s ease-out, box-shadow 0.16s ease-out;
}

.offers-main-tab::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #00d0ff, #ffd65c);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.offers-main-tab:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.75);
}

.offers-main-tab.active {
    background: #00d0ff;
    color: #000;
    border-color: rgba(0,0,0,0.9);
}

.offers-main-tab.active::after {
    opacity: 1;
    transform: scaleX(1);
}

.offers-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.offers-status-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.offers-status-tab {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: background 0.14s ease-out, border-color 0.14s ease-out, transform 0.1s ease-out;
}

.offers-status-tab:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.offers-status-tab.active {
    background: #000;
    border-color: #00d0ff;
}

.offers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offer-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
}

.offer-left {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.offer-image {
    width: 82px;
    height: 82px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #050505;
}

.offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease-out;
}

.offer-card:hover .offer-image img {
    transform: scale(1.04);
}

.offer-main-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.offer-title {
    font-weight: 700;
    font-size: 15px;
}

.offer-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
}

.offer-line {
    font-size: 13px;
    color: rgba(255,255,255,0.86);
}

.offer-message {
    font-style: italic;
}

.offer-right {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: flex-end;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(255,255,255,0.12);
}

.badge-pending {
    background: rgba(250, 200, 0, 0.25);
}

.badge-accepted {
    background: rgba(0, 200, 120, 0.3);
}

.badge-declined {
    background: rgba(220, 70, 70, 0.3);
}

.btn-small.btn-accept {
    background: #22c55e;
}

.btn-small.btn-decline {
    background: #ef4444;
}

/* ============================================================
   EDIT PROFILE PAGE
   ============================================================ */

.edit-profile-page {
    max-width: 1100px;
    margin: 30px auto 50px;
}

.edit-profile-layout {
    display: flex;
    gap: 24px;
    padding: 20px;
    background: rgba(0,0,0,0.75);
}

.edit-profile-left {
    flex: 0 0 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.edit-profile-avatar-frame {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.edit-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.22s ease-out;
}

.edit-profile-avatar-frame:hover .edit-profile-avatar-img {
    transform: scale(1.04);
}

.edit-profile-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.edit-profile-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px;
}

.edit-profile-form .form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 7px 9px;
    font-size: 13px;
}

.form-input:focus {
    outline: none;
    border-color: #00d0ff;
    box-shadow: 0 0 0 1px rgba(0,208,255,0.4);
}

.form-help {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 3px;
}

.form-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.5);
    color: #fecaca;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 8px;
}

.btn-primary {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    background: #00d0ff;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0,0,0,0.75);
    transition: background 0.16s ease-out, transform 0.12s ease-out, box-shadow 0.16s ease-out;
}

.btn-primary:hover {
    background: #22e0ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.9);
}

/* ============================================================
   SOCIAL PAGE / TIKTOK GRID
   ============================================================ */

.social-page {
    max-width: 1100px;
    margin: 24px auto 40px;
    padding: 20px;
}

.social-title {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.social-subtitle {
    font-size: 18px;
    font-weight: 700;
    margin: 8px 0 16px;
}

.social-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.social-handle {
    font-size: 14px;
    opacity: 0.9;
}

.social-link {
    font-size: 13px;
    color: #ffd65c;
    text-decoration: none;
}

.social-link:hover {
    text-decoration: underline;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.video-card {
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top left, rgba(255,215,0,0.18), rgba(0,0,0,0.9));
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255, 215, 0, 0.25);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    transition: transform 0.1s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}

.video-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.9);
    border-color: rgba(255, 215, 0, 0.7);
}

.video-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
}

.video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.22s ease-out;
}

.video-card:hover .video-thumb {
    transform: scale(1.04);
}

.video-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(90deg, #ff4b2b, #ffdd00);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    animation: pulse-glow 1.8s infinite;
}

.video-body {
    padding: 10px 12px 12px;
}

.video-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.video-meta {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.video-meta-sep {
    opacity: 0.7;
}

/* Small “No TikTok” info text reuse */
.info-empty {
    font-size: 13px;
    color: var(--text-muted);
}

/* Pulse glow animation for badges */
@keyframes pulse-glow {
    0%   { box-shadow: 0 0 0 0 rgba(255, 214, 92, 0.8); }
    70%  { box-shadow: 0 0 0 9px rgba(255, 214, 92, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 214, 92, 0); }
}

.podium-avatar img {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 18px rgba(0,0,0,0.8);
}


.giveaways-page {
    max-width: 1100px;
    margin: 28px auto 40px;
    padding: 0 4px;
}

.giveaways-header {
    margin-bottom: 14px;
}

.giveaways-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 4px;
}

.giveaways-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin: 0;
}

.giveaways-empty {
    padding: 16px 18px;
    font-size: 14px;
    text-align: center;
}

.giveaways-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr);
}

/* Single big centered card for now; easy to expand to multiple columns later */

.giveaway-card {
    padding: 18px 20px 14px;
    margin-top: 6px;
    background: radial-gradient(circle at top left, rgba(255,215,0,0.18), rgba(0,0,0,0.9));
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 16px 32px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.giveaway-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.giveaway-pill-row {
    display: flex;
    justify-content: flex-start;
}

.giveaway-pill {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255,255,255,0.18);
    color: #ffd766;
}

.giveaway-prize {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

.giveaway-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.giveaway-meta-line {
    display: flex;
    gap: 6px;
    align-items: baseline;
}

.giveaway-label {
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.giveaway-value {
    color: rgba(255,255,255,0.9);
}

.giveaway-countdown {
    font-weight: 700;
    color: #00d0ff;
}

.giveaway-footer {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.giveaway-footnote {
    opacity: 0.9;
}

/* small screens */
@media (max-width: 600px) {
    .giveaway-card {
        padding: 14px 14px 12px;
    }
    .giveaway-prize {
        font-size: 18px;
    }
}

.giveaway-footer {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.giveaway-footnote {
    opacity: 0.9;
}

.giveaway-discord-btn {
    padding: 6px 14px;
    border-radius: 999px;
    background: #5865F2; /* Discord blurple */
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    transition: transform 0.12s ease-out, box-shadow 0.16s ease-out, background 0.16s ease-out;
}

.giveaway-discord-btn:hover {
    background: #6d7bff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.8);
}

/* ======================================
   MOBILE BOTTOM NAV
   ====================================== */

.mobile-bottom-nav {
    display: none; /* hidden on desktop by default */
}

@media (max-width: 768px) {
    /* Make room at bottom so content isn't hidden behind nav */
    body {
        padding-bottom: 64px;
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: radial-gradient(circle at top, rgba(255,255,255,0.03), #050505);
        border-top: 1px solid rgba(255,255,255,0.1);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 120;
        backdrop-filter: blur(16px);
    }

    .mobile-nav-item {
        flex: 1;
        text-align: center;
        color: rgba(255,255,255,0.75);
        font-size: 11px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
    }

    .mobile-nav-icon {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-nav-label {
        font-size: 10px;
        text-transform: none;
    }

    .mobile-nav-item:hover {
        color: var(--accent-primary);
    }
}

/* ======================================
   GENERAL MOBILE TWEAKS
   ====================================== */

@media (max-width: 768px) {
    .navbar {
        padding: 8px 10px;
    }

    .logo {
        font-size: 18px;
        gap: 4px;
    }

    .logo-icon {
        width: 24px;
        height: 24px;
    }

    /* Shrink center nav tabs on mobile and allow scroll */
    .nav-center {
        gap: 12px;
        font-size: 13px;
    }

    .nav-item {
        font-size: 13px;
        padding: 2px 0;
    }

    /* Main container tighter padding */
    .content-container {
        padding: 16px 10px 24px;
    }

    /* Search / card blocks more compact */
    .search-bar-pill,
    .search-container {
        margin-bottom: 10px;
    }

    .creature-grid,
    .listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .creature-card,
    .listing-card {
        padding: 8px;
    }

    .values-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .giveaway-card {
        padding: 14px 12px;
    }

    .giveaway-prize {
        font-size: 18px;
    }

    .two-column-layout {
        gap: 14px;
    }

    .sidebar {
        padding: 12px 10px;
    }
}

/* ============================
   MOBILE BOTTOM NAV "TABS"
   ============================ */

.mobile-bottom-nav {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    /* Make space so content isn't hidden behind nav */
    body {
        padding-bottom: 64px;
    }

    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: radial-gradient(circle at top, rgba(255,255,255,0.04), #050505);
        border-top: 1px solid rgba(255,255,255,0.18);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 200;
        backdrop-filter: blur(18px);
    }

    .mobile-nav-item {
        flex: 1;
        text-align: center;
        color: rgba(255,255,255,0.75);
        font-size: 11px;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding-top: 3px;
    }

    .mobile-nav-icon {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-nav-label {
        font-size: 10px;
    }

    .mobile-nav-item:hover {
        color: var(--accent-primary, #ffd766);
    }

    /* Optional: slightly shrink top nav on mobile so it doesn't feel cramped */
    .navbar {
        padding: 8px 10px;
    }
}

/* Highlight current tab (optional)
   If you want, you can add logic to base.html to add .is-active
   to the current page's <a>, then:

.mobile-nav-item.is-active {
    color: var(--accent-primary, #ffd766);
}
.mobile-nav-item.is-active .mobile-nav-icon {
    transform: translateY(-1px);
}
*/



.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-dialog {
  background: #151515;
  border-radius: 12px;
  padding: 18px 20px 16px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-body {
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}