/* ============================================================
   CSS VARIABLES — Light Mode (Default)
   Auto-switch ke Dark Mode jika OS preference dark
   ============================================================ */

/* ============================================================
   Global Font — Sans Serif
   ============================================================ */

* {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

:root {
    /* Light Mode (default) */
    --bg-primary:      #ffffff;
    --bg-surface:      #f8f9fa;
    --bg-surface2:     #e9ecef;
    --bg-overlay:      rgba(0, 0, 0, 0.5);

    --text-primary:    #1a1a1a;
    --text-secondary:  #4a4a4a;
    --text-muted:      #6c757d;
    --text-light:      #adb5bd;
    --text-white:      #1a1a1a;        /* di light mode jadi dark */

    --border-dark:     #dee2e6;
    --border-light:    #ced4da;

    --kayou-yellow:    #ffc107;
    --kayou-yellow-dk: #ffb300;
    --accent-blue:     #0d6efd;

    /* Card colors */
    --card-bg:         #ffffff;
    --card-shadow:     0 2px 8px rgba(0, 0, 0, 0.1);

    /* Header */
    --header-bg:       #ffffff;

    /* Modal */
    --modal-overlay:   rgba(0, 0, 0, 0.6);
    --modal-bg:        #ffffff;
}

/* ============================================================
   DARK MODE — Auto-switch jika OS prefer dark
   ============================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary:      #0a0a0a;
        --bg-surface:      #1a1a1a;
        --bg-surface2:     #2a2a2a;
        --bg-overlay:      rgba(0, 0, 0, 0.8);

        --text-primary:    #ffffff;
        --text-secondary:  #cccccc;
        --text-muted:      #888888;
        --text-light:      #aaaaaa;
        --text-white:      #ffffff;

        --border-dark:     #2a2a2a;
        --border-light:    #3a3a3a;

        --kayou-yellow:    #ffd700;
        --kayou-yellow-dk: #e6c200;
        --accent-blue:     #4dabf7;

        --card-bg:         #1a1a1a;
        --card-shadow:     0 2px 8px rgba(0, 0, 0, 0.5);

        --header-bg:       #0a0a0a;

        --modal-overlay: rgba(0, 0, 0, 0.95);
        --modal-bg: #0a0a0a;
    }
}

/* Body styling */
body {
    margin: 0 !important;
    padding: 0 !important;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s, color 0.3s;
}

/* ─── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

/* ─── Container ──────────────────────────────────────────── */
.main-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   HEADER (Kayou Logo + Title)
   ============================================================ */

.kayou-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 10px 0;
    margin: 10px;
}

.kayou-logo {
    background: var(--kayou-yellow);
    color: #000;
    padding: 12px 14px;
    border-radius: 8px;
    text-align: center;
    flex-shrink: 0;
    box-shadow: var(--card-shadow);
}

.kayou-logo-text,
.kayou-logo-fun {
    font-weight: 900;
    font-size: 12px;
    line-height: 1.2;
}

.kayou-title-wrap {
    flex: 1;
}

.kayou-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.kayou-subtitle {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

@media (min-width: 768px) {
    .kayou-title {
        font-size: 26px;
    }
    .kayou-subtitle {
        font-size: 14px;
    }
}

/* ============================================================
   CARD GRID
   ============================================================ */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
    .card-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 1280px) {
    .card-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ============================================================
   CARD ITEM
   ============================================================ */

.card-item {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--card-shadow);
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-img-wrapper {
    position: relative;
    aspect-ratio: 5 / 7;
    background: var(--bg-surface2);
    overflow: hidden;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-name-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: var(--text-primary);                  /* always white di overlay gelap */
    padding: 16px 8px 8px;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.badge-release {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.badge-rarity {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    z-index: 2;
}

.card-info {
    padding: 8px;
}


.card-price {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--text-primary);
    flex-wrap: wrap;
}

.card-price-rp { color: var(--text-muted); }
.card-price-val { color: var(--text-primary); font-weight: 600; }
.card-price-sep { color: var(--text-muted); margin: 0 2px; }



/* ============================================================
   RELEASE SELECTOR & RARITY FILTER
   ============================================================ */

.release-selector {
    position: relative;
    margin-bottom: 16px;
}

.release-btn {
    background: var(--bg-surface);
    border: 2px solid var(--border-dark);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.release-btn:hover {
    border-color: var(--kayou-yellow);
}

.release-btn::after {
    content: '▼';
    font-size: 10px;
    color: var(--text-muted);
}

.release-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    box-shadow: var(--card-shadow);
    display: none;
    z-index: 100;
}

.release-dropdown.show {
    display: block;
}

.release-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-dark);
}

.release-dropdown-item:hover,
.release-dropdown-item.active {
    background: var(--kayou-yellow);
    color: #000;
}

.rarity-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rarity-label {
    color: var(--text-primary);
    font-weight: 600;
}

.rarity-chip {
    background: var(--bg-surface);
    border: 2px solid var(--border-dark);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.rarity-chip:hover {
    border-color: var(--kayou-yellow);
}

.rarity-chip.active {
    background: var(--kayou-yellow);
    color: #000;
    border-color: var(--kayou-yellow);
}

/* ============================================================
   LOAD MORE BUTTON
   ============================================================ */

.load-more-wrap {
    text-align: center;
    margin: 20px 0;
}

.btn-load-more {
    background: var(--kayou-yellow);
    color: #000;
    border: none;
    padding: 12px 40px;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: var(--kayou-yellow-dk);
    transform: translateY(-1px);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   MODAL — Card Detail
   ============================================================ */

.kayou-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay);
    z-index: 9999;
    display: none;
    cursor: pointer;
}

.kayou-modal-overlay.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.kayou-modal-inner {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background: var(--modal-bg);
    cursor: default;
}

@media (min-width: 768px) {
    .kayou-modal-overlay.show {
        padding: 20px 0;
    }
    .kayou-modal-inner {
        max-width: 500px;
        max-height: calc(100vh - 40px);
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
}

/* Modal Header Fade */
.modal-header-fade {
    opacity: 0.3;
    pointer-events: none;
    margin-bottom: 12px;
}

/* Close Bar */
.modal-close-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    user-select: none;
}

.modal-close-text {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-close-btn {
    background: #dc3545;
    color: var(--text-primary);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

/* Modal Card Image */
.modal-card-image-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 20px;
    aspect-ratio: 5 / 7;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-surface2);
}

.modal-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-card-image-wrap .badge-release {
    font-size: 14px;
    padding: 4px 12px;
    top: 0px;
    left: 0px;
}

.badge-rarity-circle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 56px;
    height: 56px;
    background: radial-gradient(circle, #2a2a2a 30%, #000 100%);
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-weight: 900;
    font-size: 18px;
    z-index: 3;
}

.modal-card-code-bar {
    bottom: 8px;
    left: 8px;
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
    z-index: 2;
}

/* Modal Info */
.modal-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.modal-rarity-badge {
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
}

.modal-char-name {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 16px;
}

.modal-meta-tier {
    color: var(--text-primary);
    font-weight: 700;
}

.modal-meta-code {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 13px;
}

.modal-price-row {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-dark);
}

/* Penjual Section */
.penjual-section {
    margin-bottom: 24px;
}

.penjual-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: 8px;
}

.penjual-title-new {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-add-small {
    background: var(--kayou-yellow);
    color: #000;
    padding: 6px 16px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-add-small:hover {
    background: var(--kayou-yellow-dk);
}

/* Penjual Empty State */
.penjual-empty-new {
    text-align: center;
    padding: 32px 16px;
    background: var(--bg-surface);
    border-radius: 12px;
    color: var(--text-muted);
}

.penjual-empty-new p {
    margin: 8px 0 16px;
    color: var(--text-secondary);
}

.btn-add-link {
    background: var(--kayou-yellow);
    color: #000;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
}

.btn-add-link:hover {
    background: var(--kayou-yellow-dk);
}

/* Penjual List Items */
.penjual-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.penjual-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-surface);
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-dark);
    transition: all 0.2s;
}

.penjual-item:hover {
    border-color: var(--kayou-yellow);
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

.penjual-item-number {
    width: 32px;
    height: 32px;
    background: var(--bg-surface2);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.penjual-item-info {
    flex: 1;
    min-width: 0;
}

.penjual-item-mp {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.penjual-item-mp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.bg-tokopedia { background: #03ac0e; }
.bg-shopee    { background: #ee4d2d; }
.bg-tiktok    { background: var(--bg-primary); }
.bg-blibli    { background: #0095da; }

.penjual-item-price {
    color: var(--kayou-yellow-dk);
    font-weight: 700;
    margin-top: 2px;
}

.penjual-item-price-empty {
    color: var(--text-muted);
    font-style: italic;
    font-weight: 400;
    font-size: 13px;
}

.penjual-item-arrow {
    color: var(--text-muted);
    font-size: 24px;
    font-weight: 300;
}

/* Edit Link */
.penjual-edit-link {
    text-align: center;
    margin-top: 16px;
}

.penjual-edit-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}

.penjual-edit-link a:hover {
    color: var(--kayou-yellow-dk);
}

.cdu-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.cdu-link-btn {
    background: var(--bg-surface2);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-dark);
}

.cdu-link-btn:hover {
    border-color: var(--kayou-yellow);
}

.cdu-link-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 800;
}

.cdu-icon-tokopedia { background: #03ac0e; }
.cdu-icon-shopee    { background: #ee4d2d; }
.cdu-icon-tiktok    { background: var(--bg-primary); }
.cdu-icon-blibli    { background: #0095da; }

/* ============================================================
   NAVIGATION BUTTONS (Modal Prev/Next)
   ============================================================ */

.modal-nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-primary);
    border: none;
    width: 44px;
    height: 60px;
    cursor: pointer;
    font-size: 28px;
    font-weight: 300;
    z-index: 10000;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-nav-btn:hover:not(:disabled) {
    background: var(--kayou-yellow);
    color: #000;
}

.modal-nav-prev {
    left: 8px;
}

.modal-nav-next {
    right: 8px;
}

@media (min-width: 768px) {
    .modal-nav-btn {
        width: 56px;
        height: 80px;
        font-size: 36px;
    }
    .modal-nav-prev { left: 20px; }
    .modal-nav-next { right: 20px; }
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ─── Release Dropdown ──────────────────────────────────── */
.release-selector {
  position: relative;
  margin-bottom: 16px;
  margin: 10px;
}

.release-btn {
  width: 100%;
  background: linear-gradient(180deg, #3a3a3a 0%, #1a1a1a 100%);
  border: 1px solid #555;
  border-radius: 30px;
  padding: 10px 50px 10px 24px;
  color: var(--text-white);
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.release-btn:hover { border-color: var(--kayou-yellow); }

.release-btn::after {
  content: '▼';
  font-size: 10px;
  position: absolute;
  right: 24px;
  color: var(--text-white);
  background: transparent;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #666;
  border-radius: 50%;
}

.release-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.release-dropdown.show { display: block; }

.release-dropdown-item {
  padding: 12px 20px;
  cursor: pointer;
  color: var(--text-white);
  font-size: 14px;
  border-bottom: 1px solid var(--border-dark);
  transition: background 0.15s;
}

.release-dropdown-item:last-child { border-bottom: none; }

.release-dropdown-item:hover,
.release-dropdown-item.active {
  background: var(--kayou-yellow);
  color: #000;
  font-weight: 600;
}

/* ─── Rarity Filter ──────────────────────────────────────── */
.rarity-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
  margin: 15px;
  -webkit-overflow-scrolling: touch;
}

.rarity-filter::-webkit-scrollbar { height: 3px; }

.rarity-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  flex-shrink: 0;
  margin-right: 4px;
}

.rarity-chip {
  background: transparent;
  border: 2px solid var(--text-white);
  border-radius: 8px;
  padding: 4px 1px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-white);
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  flex-shrink: 0;
  min-width: 44px;
  text-align: center;
}

.rarity-chip:hover { border-color: var(--kayou-yellow); }

.rarity-chip.active {
  background: var(--kayou-yellow);
  border-color: var(--kayou-yellow);
  color: #000;
}

/* ─── Card Grid ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 24px;
}

/* ─── Card Item ──────────────────────────────────────────── */
.card-item {
        background: var(--card-bg);
    color: var(--text-primary);
  cursor: pointer;
  transition: transform 0.2s;
}

.card-item:active { transform: scale(0.97); }

.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 7;
  background: var(--bg-surface);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0px;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Release Badge — Hitam dengan teks putih */
.badge-release {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.85);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 0 0 6px 0;
  letter-spacing: 0.5px;
  z-index: 2;
}

/* Rarity Badge — Hitam dengan teks putih, kanan atas */
.badge-rarity {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 0 0 0 6px;
  z-index: 2;
}

/* Card Info Below Image */
.card-info {
  text-align: center;
  padding: 0 2px;
}

.card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Nama di overlay bawah gambar (style lain) */
.card-name-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.95));
  padding: 20px 6px 6px;
  color: var(--text-white);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.card-price {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-price-rp,
.card-price-sep {
  color: var(--text-muted);
  font-weight: 400;
}

.card-price-val {
  color: var(--text-white);
  font-weight: 600;
}

/* ─── Load More ──────────────────────────────────────────── */
.load-more-wrap {
  text-align: center;
  padding: 16px 0 32px;
}

.btn-load-more {
  background: var(--kayou-yellow);
  color: #000;
  border: none;
  padding: 10px 28px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: var(--kayou-yellow-dk);
  transform: translateY(-1px);
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── Modal Overlay (Full Screen) ────────────────────────── */
/* ============================================================
   MODAL OVERLAY — Responsive
   ============================================================ */

.kayou-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay);
    z-index: 9999;
    display: none;
    overflow: hidden;
    cursor: pointer;
}

.kayou-modal-overlay.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* Modal Inner — DESKTOP: max-width, MOBILE: full width */
.kayou-modal-inner {
    position: relative;
    width: 100%;
    max-width: 500px;            /* DESKTOP: lebar maksimum */
    height: 100%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1px;
    box-sizing: border-box;
    cursor: default;
    background: var(--modal-bg);    /* HARUS solid, bukan transparent */
}

/* Modal Card Image Wrapper - aspect ratio terjaga */
.modal-card-image-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    aspect-ratio: 5 / 7;          /* aspect ratio kartu Naruto */
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-surface, #1a1a1a);
}

.modal-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;          /* atau cover, sesuai kebutuhan */
    display: block;
}

/* DESKTOP: lebih lebar tapi proporsi terjaga */
@media (min-width: 768px) {
    .kayou-modal-inner {
        max-width: 480px;
        padding: 20px;
        margin-top: 20px;
        max-height: calc(100vh - 40px);
        border-radius: 16px;
    }

    .modal-card-image-wrap {
        max-width: 360px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .kayou-modal-inner {
        max-width: 520px;
    }

    .modal-card-image-wrap {
        max-width: 1024px;
    }
}

/* Pastikan tidak ada padding/margin yang bikin scroll body */
body:has(.kayou-modal-overlay.show) {
    overflow: hidden; /* lock body scroll */
}

/* Header dalam modal */
.modal-header-fade {
  opacity: 0.3;
  pointer-events: none;
  margin-bottom: 16px;
}

/* Tombol Tutup */
.modal-close-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  margin-bottom: 16px;
}

.modal-close-text {
  color: var(--text-white);
  font-size: 16px;
  font-weight: 500;
}

.modal-close-btn {
  background: #dc3545;
  color: var(--text-primary);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Gambar Full di Modal */
.modal-card-image-wrap {
  position: relative;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.modal-card-image-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-card-image-wrap .badge-release {
  font-size: 14px;
  padding: 6px 12px;
}

.modal-card-image-wrap .badge-rarity-circle {
  position: absolute;
  top: 0px;
  right: 0px;
  width: 40px;
  height: 20px;
  background: radial-gradient(circle, #2a2a2a 0%, #000 100%);
  border-radius: 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-primary);
  border: 2px solid #444;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  z-index: 3;
  padding: 1px 1px;
}

/* ============================================
   1. CODE BAR — paling kiri
   ============================================ */
.modal-card-code-bar {
    color: var(--text-primary) !important;
    padding: 0.25em 0.65em !important;
    font-size: 1.075em !important;
    border-radius: 0.25em !important;
    flex-shrink: 0 !important;
    order: 1 !important;
}


/* Info Detail Section */
.modal-info {
  margin-bottom: 24px;
}

.modal-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0px;
}

.modal-rarity-badge {
  background: #fff;
  color: #000;
  font-weight: 900;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  flex-shrink: 0;
}

.modal-char-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.modal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-dark);
  margin-bottom: 12px;
}

.modal-meta-tier {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-meta-code {
  font-size: 14px;
  color: var(--text-muted);
  font-family: monospace;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 18px;
  color: var(--text-muted);
}

.modal-price-val {
  font-weight: 700;
  color: var(--text-white);
}

/* Penjual Section */
.modal-penjual-title {
  text-align: center;
  font-size: 16px;
  color: var(--text-white);
  margin: 16px 0 12px;
  font-weight: 500;
}

.penjual-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.penjual-slot {
  aspect-ratio: 1;
  border: 1px solid #444;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #555;
  background: rgba(0,0,0,0.3);
}

.penjual-slot.filled {
  background: var(--bg-surface2);
  color: var(--text-white);
  border-color: var(--kayou-yellow);
  cursor: pointer;
}

/* Empty State */
.penjual-empty {
  text-align: center;
  padding: 16px;
  color: var(--text-white);
  font-size: 15px;
  line-height: 1.5;
}

.penjual-empty a {
  color: #4dabf7;
  text-decoration: underline;
}

.cdu-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cdu-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.cdu-link-btn:hover { opacity: 0.7; }

.cdu-link-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--text-primary);
}

.cdu-icon-tokopedia { background: #22c55e; }
.cdu-icon-shopee    { background: #ee4d2d; }
.cdu-icon-tiktok    { background: var(--bg-primary); border: 1px solid #fff; }
.cdu-icon-blibli    { background: #0095da; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 380px) {
  .card-grid { gap: 8px; }
  .kayou-title { font-size: 18px; }
  .release-btn { font-size: 14px; padding: 12px 50px 12px 20px; }
}

@media (min-width: 600px) {
  .main-container { max-width: 720px; }
  .card-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  .main-container { max-width: 1000px; }
  .card-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ─── Loading ───────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  aspect-ratio: 5 / 7;
  margin-bottom: 8px;
}

/* ─── Toast ─────────────────────────────────────────────── */
.toast-container-custom {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  min-width: 240px;
  max-width: 320px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease;
}

.toast-item.success { background: #198754; color: var(--text-primary); }
.toast-item.error   { background: #dc3545; color: var(--text-primary); }
.toast-item.info    { background: #0dcaf0; color: #000; }

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ============================================================
   PUBLIC FORMS — Edit Request, Verify, etc
   ============================================================ */

.form-page-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
}

.form-page-header {
  text-align: center;
  margin-bottom: 24px;
}

.form-page-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.form-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 8px;
}

.form-page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
}

.form-input {
  width: 90%;
  background: var(--bg-surface2);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-white);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--kayou-yellow);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.15);
}

.form-input::placeholder {
  color: #666;
}

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.form-help strong {
  color: var(--text-light);
}

.form-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.form-alert-info {
  background: rgba(13, 202, 240, 0.1);
  border: 1px solid rgba(13, 202, 240, 0.3);
  color: #4dabf7;
}

.form-alert-warning {
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

.form-alert-danger {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #f48a92;
}

.form-alert-success {
  background: rgba(25, 135, 84, 0.1);
  border: 1px solid rgba(25, 135, 84, 0.3);
  color: #75d99a;
}

.form-btn-group {
  display: grid;
  gap: 10px;
}

.form-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}

.form-btn-primary {
  background: var(--kayou-yellow);
  color: #000;
}

.form-btn-primary:hover {
  background: var(--kayou-yellow-dk);
  transform: translateY(-1px);
}

.form-btn-outline-primary {
  background: transparent;
  color: #4dabf7;
  border: 2px solid #4dabf7;
}

.form-btn-outline-primary:hover {
  background: #4dabf7;
  color: #000;
}

.form-btn-outline-danger {
  background: transparent;
  color: #f48a92;
  border: 2px solid #f48a92;
}

.form-btn-outline-danger:hover {
  background: #f48a92;
  color: #000;
}

.form-back-link {
  text-align: center;
  margin-top: 16px;
}

.form-back-link a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.form-back-link a:hover {
  color: var(--kayou-yellow);
}

.required-mark::after {
  content: ' *';
  color: #f48a92;
}

/* ─── Modal Empty State (No Sellers) ────────────────────── */
.penjual-empty {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
  margin: 16px 0;
  color: var(--text-white);
  font-size: 15px;
}

.penjual-empty p {
  margin-bottom: 16px;
  line-height: 1.6;
}

.btn-add-link {
  display: inline-block;
  background: var(--kayou-yellow);
  color: #000;
  padding: 12px 24px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-add-link:hover {
  background: var(--kayou-yellow-dk);
  transform: translateY(-1px);
}

/* Modal info ketika kosong (tanpa harga) */
.modal-info {
  margin-bottom: 1px;
}

.modal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1px 0;
  border-bottom: 1px solid var(--border-dark);
}

/* Pastikan meta row tampil rapi tanpa price */
.modal-info .modal-meta-row:last-child {
  border-bottom: none;
}



/* ─── Form Card Preview ─────────────────────────────────── */
.form-card-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 16px;
}

.form-card-img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.form-card-info {
  flex: 1;
  min-width: 0;
}

.form-card-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.badge-release-form {
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-rarity-form {
  color: var(--text-primary);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.form-card-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-white);
  margin: 0 0 4px;
}

.form-card-code {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  margin: 0;
}

/* ─── TnC Toggle ─────────────────────────────────────────── */
.form-tnc-toggle {
  background: var(--bg-surface2);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--kayou-yellow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  border: 1px solid var(--border-dark);
  transition: all 0.2s;
}

.form-tnc-toggle:hover {
  border-color: var(--kayou-yellow);
}

.form-tnc-content {
  background: var(--bg-surface2);
  padding: 16px;
  border-radius: 8px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-light);
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-dark);
}

.form-tnc-content ol,
.form-tnc-content ul {
  margin: 0;
  padding-left: 20px;
}

.form-tnc-content li {
  margin-bottom: 6px;
}

/* ─── Checkbox ───────────────────────────────────────────── */
.form-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-surface2);
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
  user-select: none;
  border: 1px solid var(--border-dark);
  transition: all 0.2s;
}

.form-checkbox-label:hover {
  border-color: var(--kayou-yellow);
}

.form-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--kayou-yellow);
}

.form-checkbox-label span {
  font-size: 13px;
  color: var(--text-white);
}

/* ============================================================
   PENJUAL SECTION - REVISED
   ============================================================ */

.penjual-section {
  margin-top: 24px;
  margin-bottom: 24px;
}

.penjual-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border: 1px solid var(--border-dark);
}

.penjual-title-new {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.penjual-title-new::before {
  content: '🏪';
  font-size: 18px;
}

.btn-add-small {
  background: var(--kayou-yellow);
  color: #000;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-add-small:hover {
  background: var(--kayou-yellow-dk);
  transform: translateY(-1px);
}

/* Empty State */
.penjual-empty-new {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
}

.penjual-empty-new p {
  margin: 0 0 16px;
  color: var(--text-light);
  font-size: 14px;
}

/* Penjual List */
.penjual-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.penjual-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text-white);
  transition: all 0.2s;
  cursor: pointer;
}

.penjual-item:hover {
  border-color: var(--kayou-yellow);
  background: var(--bg-surface2);
  transform: translateX(2px);
}

.penjual-item-number {
  width: 32px;
  height: 32px;
  background: var(--bg-surface2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--kayou-yellow);
  flex-shrink: 0;
}

.penjual-item-info {
  flex: 1;
  min-width: 0;
}

.penjual-item-mp {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.penjual-item-mp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 900;
  color: var(--text-primary);
}

.penjual-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--kayou-yellow);
  margin: 2px 0 0;
}

.penjual-item-price-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

.penjual-item-arrow {
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

/* Edit Link */
.penjual-edit-link {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-dark);
}

.penjual-edit-link a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.penjual-edit-link a:hover {
  color: var(--kayou-yellow);
}

/* Marketplace Icons */
.bg-tokopedia { background: #22c55e; }
.bg-shopee    { background: #ee4d2d; }
.bg-tiktok    { background: var(--bg-primary); border: 1px solid #fff; }
.bg-blibli    { background: #0095da; }


/* ============================================================
   SELLER VIEW PAGE
   ============================================================ */

.seller-view-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 16px;
}

.seller-view-mp {
  display: flex;
  align-items: center;
  gap: 12px;
}

.seller-view-mp-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
}

.seller-view-mp-label {
  font-size: 11px;
  color: var(--text-muted);
}

.seller-view-price {
  text-align: right;
}

.seller-view-price-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.seller-view-price-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--kayou-yellow);
}

/* Visit Store Button */
.btn-visit-store {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--kayou-yellow);
  color: #000;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  margin: 16px 0;
  transition: all 0.2s;
  width: 100%;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.btn-visit-store:hover {
  background: var(--kayou-yellow-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.3);
}

/* Action Buttons */
.seller-view-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.btn-action-flag,
.btn-action-edit {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  color: var(--text-white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  text-align: left;
}

.btn-action-flag:hover,
.btn-action-edit:hover {
  border-color: var(--kayou-yellow);
  background: var(--bg-surface2);
}

/* CDU Section in View Page */
.seller-view-cdu {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  padding: 16px;
  margin-top: 24px;
}

.seller-view-cdu-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 12px;
}

.seller-view-cdu-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.seller-view-cdu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface2);
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-white);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  border: 1px solid var(--border-dark);
}

.seller-view-cdu-link:hover {
  border-color: var(--kayou-yellow);
}

/* ─── Report Modal ──────────────────────────────────────── */
.report-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.report-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.report-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-dark);
}

.report-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--text-white);
}

.report-modal-close {
  background: transparent;
  border: none;
  color: var(--text-white);
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

.report-modal-close:hover {
  background: var(--bg-surface2);
}

.report-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
  font-size: 20px;
  color: var(--text-white);
  font-weight: 700;
}

.modal-price-row span {
  display: inline-block;
}

.modal-price-row > span:nth-child(2) {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

/* ============================================================
   MODAL NAVIGATION ANIMATIONS
   ============================================================ */

@keyframes fadeInOut {
    0%   { opacity: 0; transform: translateX(-50%) translateY(10px); }
    20%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    80%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Visual cursor untuk overlay (klik di luar = close) */
.kayou-modal-overlay {
    cursor: pointer;
}

.kayou-modal-overlay .kayou-modal-inner {
    cursor: default;
}

/* Hint navigasi (visual cue di mobile) */
.modal-nav-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0.7;
}

/* Smooth transition saat ganti card */
#modalContent {
    transition: opacity 0.2s ease;
}

/* Cursor pointer untuk close bar */
.modal-close-bar {
    cursor: pointer;
}

.modal-close-bar:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .d-none-mobile { display: none; }
    .d-mobile-only { display: inline; }
}
@media (min-width: 769px) {
    .d-none-mobile { display: inline; }
    .d-mobile-only { display: none; }
}

/* Pull-to-Navigate Indicator */
#pullIndicator {
    animation: bounce 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateX(-50%) translateY(0); }
    to   { transform: translateX(-50%) translateY(-5px); }
}


/* ============================================================
   CARD ITEM — Light/Dark compatible
   ============================================================ */

.card-item {
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-info {
    padding: 8px 10px;
    background: var(--card-bg);
}

.card-code {
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 4px;
    font-size: clamp(0.65em, 10cqw, 0.95em);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-price {
    color: var(--text-primary);
    font-size: 11px;
}



/* ============================================================
   LIGHT MODE OVERRIDE — Force semua elemen ke warna terang
   Tambahkan di PALING AKHIR app.css supaya override rule lama
   ============================================================ */

/* Light mode (default) */
:root {
    --bg-primary:      #f5f5f5;
    --bg-surface:      #ffffff;
    --bg-surface2:     #f0f0f0;
    --bg-surface3:     #e5e5e5;
    --text-primary:    #1a1a1a;
    --text-secondary:  #333333;
    --text-muted:      #777777;
    --text-white:      #1a1a1a;
    --border-dark:     #e0e0e0;
    --border-light:    #cccccc;
    --card-bg:         #ffffff;
    --card-shadow:     0 2px 8px rgba(0, 0, 0, 0.08);
    --kayou-yellow:    #f5a623;
    --kayou-yellow-dk: #e09520;
    --accent-blue:     #0066cc;
    --modal-overlay:   rgba(0, 0, 0, 0.6);
    --modal-bg:        #ffffff;
}

/* Dark mode auto-switch */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary:      #0a0a0a;
        --bg-surface:      #1a1a1a;
        --bg-surface2:     #252525;
        --bg-surface3:     #333333;
        --text-primary:    #f0f0f0;
        --text-secondary:  #cccccc;
        --text-muted:      #888888;
        --text-white:      #ffffff;
        --border-dark:     #333333;
        --border-light:    #444444;
        --card-bg:         #1a1a1a;
        --card-shadow:     0 2px 8px rgba(0, 0, 0, 0.4);
        --kayou-yellow:    #ffd700;
        --kayou-yellow-dk: #e6c200;
        --accent-blue:     #4dabf7;
        --modal-overlay:   rgba(0, 0, 0, 0.92);
        --modal-bg:        #0a0a0a;
    }
}

/* ─── BODY ──────────────────────────────────────────────── */
body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: background 0.3s, color 0.3s;
}

/* ─── HEADER ────────────────────────────────────────────── */
.kayou-header {
    background: transparent;
}

.kayou-title {
    color: var(--text-primary) !important;
}

.kayou-subtitle {
    color: var(--text-muted) !important;
}

.kayou-logo {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
}

/* ─── CONTAINER ─────────────────────────────────────────── */
.main-container {
    background: transparent;
}

/* ─── RELEASE DROPDOWN ──────────────────────────────────── */
.release-btn {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.release-btn::after {
    color: var(--text-muted) !important;
}

.release-dropdown {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
    box-shadow: var(--card-shadow) !important;
}

.release-dropdown-item {
    color: var(--text-primary) !important;
    border-bottom-color: var(--border-dark) !important;
}

.release-dropdown-item:hover,
.release-dropdown-item.active {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
}

/* ─── RARITY FILTER ─────────────────────────────────────── */
.rarity-label {
    color: var(--text-primary) !important;
}

.rarity-chip {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.rarity-chip.active {
    background: var(--kayou-yellow) !important;
    border-color: var(--kayou-yellow) !important;
    color: #000 !important;
}

/* ─── CARD ITEM ─────────────────────────────────────────── */
.card-item {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-dark) !important;
    box-shadow: var(--card-shadow);
    container-type: inline-size;
}

.card-img-wrapper {
    background: var(--bg-surface2) !important;
}

.card-info {
    background: var(--card-bg) !important;
    padding: 8px 0px;
}

.card-code {
    color: var(--text-muted) !important;
}

.card-price,
.card-price-val {
    color: var(--text-primary) !important;
}

.card-price-rp,
.card-price-sep {
    color: var(--text-muted) !important;
}



/* Nama overlay tetap putih (di atas gambar gelap) */
.card-name-overlay {
    color: #ffffff !important;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
}

/* Badge tetap gelap */
.badge-release,
.badge-rarity {
    background: rgba(0, 0, 0, 0.8) !important;
    color: #fff !important;
}

/* ─── LOAD MORE ─────────────────────────────────────────── */
.btn-load-more {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
    box-shadow: var(--card-shadow);
}

/* ─── MODAL ─────────────────────────────────────────────── */
.kayou-modal-overlay {
    background: var(--modal-overlay) !important;
}

.kayou-modal-inner {
    background: var(--modal-bg) !important;
    color: var(--text-primary);
}

.modal-close-text {
    color: var(--text-primary) !important;
}

.modal-info-header .modal-rarity-badge {
    background: var(--text-primary) !important;
    color: var(--bg-primary) !important;
}

.modal-char-name {
    color: var(--text-primary) !important;
}

.modal-meta-row {
    border-color: var(--border-dark) !important;
}

.modal-meta-tier {
    color: var(--text-primary) !important;
}

.modal-meta-code {
    color: var(--text-muted) !important;
}

.modal-price-row {
    color: var(--text-primary) !important;
    border-color: var(--border-dark) !important;
}

.modal-card-image-wrap {
    background: var(--bg-surface2) !important;
}

.modal-header-fade {
    opacity: 1;
}

/* ─── PENJUAL SECTION (Modal) ───────────────────────────── */
.penjual-section-header {
    background: var(--bg-surface) !important;
}

.penjual-title-new {
    color: var(--text-primary) !important;
}

.penjual-empty-new {
    background: var(--bg-surface) !important;
    color: var(--text-secondary) !important;
}

.penjual-item {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.penjual-item:hover {
    border-color: var(--kayou-yellow) !important;
}

.penjual-item-number {
    background: var(--bg-surface2) !important;
    color: var(--text-primary) !important;
}

.penjual-item-mp {
    color: var(--text-primary) !important;
}

.penjual-item-price {
    color: var(--kayou-yellow-dk) !important;
}

.penjual-item-price-empty {
    color: var(--text-muted) !important;
}

.penjual-item-arrow {
    color: var(--text-muted) !important;
}

.penjual-edit-link a {
    color: var(--text-muted) !important;
}

/* ─── CDU SECTION ───────────────────────────────────────── */


.cdu-title {
    color: var(--text-primary) !important;
}

.cdu-link-btn {
    background: var(--bg-surface2) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-dark) !important;
}


/* ─── NAV BUTTONS ───────────────────────────────────────── */
.modal-nav-btn {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
}

.modal-nav-btn:hover:not(:disabled) {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
}

/* ─── FORM PAGES ────────────────────────────────────────── */
.form-page-container {
    color: var(--text-primary);
}

.form-page-title {
    color: var(--text-primary) !important;
}

.form-page-subtitle {
    color: var(--text-muted) !important;
}

.form-card {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
}

.form-input {
    background: var(--bg-surface2) !important;
    border-color: var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.form-label {
    color: var(--text-secondary) !important;
}

.form-help {
    color: var(--text-muted) !important;
}

.form-card-preview {
    background: var(--bg-surface) !important;
    border-color: var(--border-dark) !important;
}

.form-card-name {
    color: var(--text-primary) !important;
}

.form-card-code {
    color: var(--text-muted) !important;
}

/* ─── SKELETON LOADING ──────────────────────────────────── */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface2) 25%,
        var(--bg-surface) 50%,
        var(--bg-surface2) 75%
    ) !important;
    background-size: 200% 100%;
}

/* ─── SCROLLBAR (Light Mode) ────────────────────────────── */
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
}

/* ─── NO DATA ───────────────────────────────────────────── */
.no-data {
    color: var(--text-muted) !important;
}

/* ============================================================
   CDU IMAGE — FORCE FIX: Jangan potong gambar!
   ============================================================ */

.cdu-section {
    display: none;
    align-items: flex-start !important;
    gap: 16px !important;
    background: var(--bg-surface) !important;
    padding: 16px !important;
    border-radius: 12px !important;
    margin-top: 16px !important;
    flex-wrap: nowrap !important;
}



.cdu-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.cdu-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}


/* ============================================================
   FIX: Modal Card Image — Margin Lebih Lebar
   ============================================================ */

.modal-card-image-wrap {
    max-width: 100% !important;
    margin: 0 auto 10px !important;
}

@media (min-width: 480px) {
    .modal-card-image-wrap {
        max-width: 100% !important;
    }
}

@media (min-width: 768px) {
    .modal-card-image-wrap {
        max-width: 100% !important;
    }
}

/* ============================================================
   FIX: CDU Image — Tidak Kepotong (Square OK)
   ============================================================ */

.cdu-section {
    display: none;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    background: var(--bg-surface) !important;
    padding: 16px !important;
    border-radius: 12px !important;
    margin-top: 16px !important;
}

.cdu-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.cdu-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-bottom: 10px !important;
    color: var(--text-primary) !important;
}

.cdu-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.cdu-link-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: var(--bg-surface2) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-dark) !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.cdu-link-logo {
    width: 20em;
    height: 3em;object-fit: contain;
flex: 0 0 20px;
}

/* Kalau mau icon-only, sembunyikan label: */
.cdu-link-label { display: none; }

.cdu-name { font-weight: 700; }



.cdu-link-btn:hover {
    border-color: var(--kayou-yellow) !important;
    background: var(--bg-surface) !important;
}

.cdu-link-icon {
    width: 24px !important;
    height: 24px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
}

/* ============================================================
   FIX: Seller View Page — Light/Dark Mode
   ============================================================ */

.form-page-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px;
    color: var(--text-primary);
}

/* Card Preview */
.form-card-preview {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 14px !important;
}

.form-card-img {
    width: 70px !important;
    height: 98px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

.form-card-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.form-card-name {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
    margin: 0 0 4px !important;
}

.form-card-code {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    font-family: monospace !important;
    margin: 0 !important;
}

.form-card-badges {
    display: flex !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
}

.badge-release-form {
    background: #000 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.badge-rarity-form {
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

/* Seller View Card (Marketplace + Price) */
.seller-view-card {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin: 16px 0 !important;
}

.seller-view-mp {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.seller-view-mp-name {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
}

.seller-view-mp-label {
    font-size: 11px !important;
    color: var(--text-muted) !important;
}

.seller-view-price {
    text-align: right !important;
}

.seller-view-price-label {
    font-size: 11px !important;
    color: var(--text-muted) !important;
}

.seller-view-price-value {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--kayou-yellow-dk) !important;
}

/* Visit Store Button */
.btn-visit-store {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: var(--kayou-yellow) !important;
    color: #000 !important;
    padding: 14px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    margin: 16px 0 !important;
    transition: all 0.2s !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.btn-visit-store:hover {
    background: var(--kayou-yellow-dk) !important;
    transform: translateY(-1px) !important;
}

/* Action Buttons (Laporkan + Perbaiki) */
.seller-view-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin: 16px 0 !important;
}

.btn-action-flag,
.btn-action-edit {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 16px !important;
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: all 0.2s !important;
}

.btn-action-flag:hover,
.btn-action-edit:hover {
    border-color: var(--kayou-yellow) !important;
    background: var(--bg-surface2) !important;
}

/* CDU Section di View Page */
.seller-view-cdu {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    margin-top: 20px !important;
}

.seller-view-cdu-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    margin: 0 0 12px !important;
}

.seller-view-cdu-links {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.seller-view-cdu-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: var(--bg-surface2) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-dark) !important;
    padding: 8px 14px !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.seller-view-cdu-link:hover {
    border-color: var(--kayou-yellow) !important;
}

/* Form Alerts — Light/Dark */
.form-alert {
    padding: 12px 16px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
}

.form-alert-info {
    background: rgba(13, 110, 253, 0.08) !important;
    border: 1px solid rgba(13, 110, 253, 0.2) !important;
    color: var(--accent-blue) !important;
}

.form-alert-warning {
    background: rgba(255, 193, 7, 0.08) !important;
    border: 1px solid rgba(255, 193, 7, 0.2) !important;
    color: var(--kayou-yellow-dk) !important;
}

.form-alert-danger {
    background: rgba(220, 53, 69, 0.08) !important;
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
}

.form-alert-success {
    background: rgba(25, 135, 84, 0.08) !important;
    border: 1px solid rgba(25, 135, 84, 0.2) !important;
    color: #198754 !important;
}

/* Report Modal */
.report-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.7) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.report-modal-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 16px !important;
    max-width: 500px !important;
    width: 100% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.report-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--border-dark) !important;
    color: var(--text-primary) !important;
}

.report-modal-body {
    padding: 20px !important;
    color: var(--text-primary) !important;
}

/* Page Header + Subtitle */
.form-page-icon {
    font-size: 48px !important;
    margin-bottom: 12px !important;
}

.form-page-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--text-primary) !important;
}

.form-page-subtitle {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
}

/* Back Link */
.form-back-link {
    text-align: center !important;
    margin-top: 16px !important;
}

.form-back-link a {
    color: var(--text-muted) !important;
    text-decoration: none !important;
    font-size: 13px !important;
}

.form-back-link a:hover {
    color: var(--kayou-yellow-dk) !important;
}

/* ============================================================
   FIX: Modal overlay di atas card grid — lebih opaque
   ============================================================ */

.kayou-modal-overlay {
    background: var(--modal-overlay) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}


/* ============================================================
   FIX: Report Modal — Full width form + close button
   ============================================================ */

.report-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.75) !important;
    z-index: 10000 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
}

.report-modal-overlay[style*="display: flex"],
.report-modal-overlay.show {
    display: flex !important;
}

.report-modal-box {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 480px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.report-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid var(--border-dark) !important;
}

.report-modal-header h3 {
    margin: 0 !important;
    font-size: 16px !important;
    color: var(--text-primary) !important;
}

.report-modal-close {
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    color: var(--text-primary) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
}

.report-modal-close:hover {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
}

.report-modal-body {
    padding: 20px !important;
}

/* Form inputs di report modal — FULL WIDTH */
.report-modal-body .form-group {
    margin-bottom: 16px !important;
}

.report-modal-body .form-label {
    display: block !important;
    margin-bottom: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
}

.report-modal-body input[type="text"],
.report-modal-body input[type="email"],
.report-modal-body select,
.report-modal-body textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: var(--text-primary) !important;
    font-size: 14px !important;
}

.report-modal-body input:focus,
.report-modal-body select:focus,
.report-modal-body textarea:focus {
    border-color: var(--kayou-yellow) !important;
    outline: none !important;
}

.report-modal-body button[type="submit"] {
    width: 100% !important;
    background: var(--kayou-yellow) !important;
    color: #000 !important;
    border: none !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    cursor: pointer !important;
}

/* ============================================================
   FIX: Add Link Form — Full Width Inputs
   ============================================================ */

.form-card {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

.form-group {
    margin-bottom: 16px !important;
}

.form-input,
.form-card input,
.form-card select,
.form-card textarea {
    /* width: 100% !important;*/
    box-sizing: border-box !important;
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    color: var(--text-primary) !important;
    font-size: 14px !important;
}

.form-input:focus,
.form-card input:focus,
.form-card select:focus {
    border-color: var(--kayou-yellow) !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.15) !important;
}

.form-input::placeholder {
    color: var(--text-muted) !important;
}

.form-label {
    display: block !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 6px !important;
}

.form-help {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    margin-top: 6px !important;
    line-height: 1.5 !important;
}

.form-btn {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    display: block !important;
    text-decoration: none !important;
    border: none !important;
    transition: all 0.2s !important;
}

.form-btn-primary {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
}

.form-btn-primary:hover {
    background: var(--kayou-yellow-dk) !important;
}

.form-btn-outline-primary {
    background: transparent !important;
    color: var(--accent-blue) !important;
    border: 2px solid var(--accent-blue) !important;
}

.form-btn-outline-danger {
    background: transparent !important;
    color: #dc3545 !important;
    border: 2px solid #dc3545 !important;
}

.form-btn-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.form-checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px !important;
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: var(--text-primary) !important;
}

.form-tnc-toggle {
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    color: var(--kayou-yellow-dk) !important;
    cursor: pointer !important;
    font-size: 13px !important;
    display: flex !important;
    justify-content: space-between !important;
}

.form-tnc-content {
    background: var(--bg-surface2) !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    padding: 16px !important;
    margin-top: 8px !important;
    font-size: 13px !important;
    color: var(--text-secondary) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* ============================================================
   CDU Card di Grid — Landscape image
   ============================================================ */

.card-item[data-item-type="cdu"] .card-img-wrapper {
    aspect-ratio: auto !important;
}

.card-item[data-item-type="cdu"] .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}



/* ============================================================
   FIX: CDU Modal Image — No black space, auto height
   ============================================================ */

.modal-card-image-wrap.cdu-mode {
    aspect-ratio: auto !important;
    max-height: none !important;
    height: auto !important;
}

.modal-card-image-wrap.cdu-mode img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    max-height: 350px !important;
}

/* ============================================================
   FIX: Seller View Page — Simetris, Full Width
   ============================================================ */

.form-page-container {
    max-width: 600px !important;
    margin: 0 auto !important;
    padding: 20px 16px !important;
}

.form-page-container > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Card Preview */
.form-card-preview {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Alert boxes */
.form-page-container .form-alert,
.form-page-container .form-alert-info,
.form-page-container .form-alert-warning,
.form-page-container .form-alert-danger,
.form-page-container .form-alert-success {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Seller view card (marketplace + price) */
.seller-view-card {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Visit store button */
.btn-visit-store {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Info text */
.form-page-container > p {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

/* Action buttons */
.seller-view-actions {
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-action-flag,
.btn-action-edit {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* CDU section */
.seller-view-cdu {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Report modal inputs */
#reportModal input,
#reportModal select,
#reportModal textarea {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Form inputs everywhere */
.form-input {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ============================================================
   CDU MODE — Section "Beli box ini di:" sebagai MAIN content
   ============================================================ */

/* Saat CDU section jadi main content (bukan sub-section) */
.cdu-section {
    border-radius: 12px !important;
    padding: 20px !important;
    background: var(--bg-surface) !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
}



.cdu-section .cdu-title {
    font-size: 12px !important;
    font-weight: 800 !important;
    margin-bottom: 12px !important;
}

.cdu-section .cdu-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.cdu-section .cdu-link-btn {
    padding: 10px 16px !important;
    font-size: 14px !important;
}

/* ============================================================
   FIX 1: Rarity Filter — Horizontal Scroll (Tidak Wrap)
   ============================================================ */

.rarity-filter {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    gap: 8px !important;
    padding-bottom: 4px !important;
}

.rarity-filter::-webkit-scrollbar {
    display: none !important;
}

.rarity-label {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

.rarity-chip {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* ============================================================
   FIX 2: Card Name Auto-Shrink (Fit Text)
   ============================================================ */

.card-name-overlay {
    font-size: clamp(9px, 2.5vw, 13px) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 16px 6px 6px !important;
}

/* Kalau layar kecil, font lebih kecil */
@media (max-width: 480px) {
    .card-name-overlay {
        font-size: clamp(8px, 2.2vw, 11px) !important;
    }
}

/* ============================================================
   FIX 3: Text Line di Bawah Rarity Filter
   ============================================================ */

.filter-info-line {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: 8px;
    margin-left: 12px;
    margin-right: 12px;
    line-height: 1.5;
}

.filter-info-line a {
    color: var(--kayou-yellow);
    text-decoration: none;
}

.filter-info-line a:hover {
    text-decoration: underline;
}


/* ============================================================
   Card Name — Auto Fit (font mengecil agar muat)
   ============================================================ */

.card-name-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
    color: #fff !important;
    padding: 16px 6px 6px !important;
    text-align: center !important;
    font-weight: 700 !important;
    white-space: wrap !important;
    overflow: hidden !important;
    line-height: 1.3 !important;
    z-index: 2 !important;
}

/* ============================================================
   Modal Description
   ============================================================ */

.modal-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    padding: 0px 10px;
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 0px;
}

/* ============================================================
   Penjual Grid — Angka 5 Kolom
   ============================================================ */

.penjual-grid-numbers {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 8px !important;
    margin-left: 1em !important;
}

.penjual-slot {
    aspect-ratio: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--text-muted) !important;
    background: var(--bg-surface) !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    cursor: default !important;
}

.penjual-slot.filled {
    color: var(--text-primary) !important;
    border-color: var(--kayou-yellow) !important;
    cursor: pointer !important;
}

.penjual-slot.filled:hover {
    background: var(--kayou-yellow) !important;
    color: #000 !important;
    transform: scale(1.05) !important;
}

/* ============================================
   MODAL INFO — Container
   ============================================ */
.modal-info {
    position: relative !important;
}

/* ============================================
   HEADER — Grid 3 kolom sama lebar
   ============================================ */
.modal-info-header {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    align-items: center !important;
    gap: 0.5em !important;
    padding: 0.85em 1em !important;
    position: relative !important;
}

/* ============================================
   1. CODE BAR — baris 1, kolom 1 (kiri)
   ============================================ */
.modal-card-code-bar {
    font-family:sans-serif;
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    color: var(--text-primary) !important;
    padding: 0.35em 0em !important;
    font-size: 0.75em !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
}

/* ============================================
   2. TIER — baris 1, kolom 2 (TENGAH)
   ============================================ */
.modal-meta-tier {
    font-family:sans-serif;
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: center !important;
    text-align: center !important;
    font-size: 1em !important;
    letter-spacing: 0.1em !important;
}

/* ============================================
   3. RARITY BADGE — baris 1, kolom 3 (kanan)
   ============================================ */
.modal-rarity-badge {
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    padding: 0.35em 0.85em !important;
    border-radius: 1em !important;
    font-size: 0.8em !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    background: linear-gradient(135deg, #4a90e2, #357abd) !important;
    color: #fff !important;
    border: none !important;
}

/* ============================================
   4. CHAR NAME — baris 2, span semua kolom (tengah)
   ============================================ */
.modal-char-name {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    text-align: center !important;
    font-size: 1.6em !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin: 0.4em 0 0.2em 0 !important;
    letter-spacing: 0.02em !important;
}

/* Deskripsi */
.modal-description {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    padding: 0 0 12px !important;
    margin-bottom: 1px !important;
    margin-left: 1em !important;
    border-bottom: 1px solid var(--border-dark) !important;
}

/* Harga */
.modal-price-row {
    justify-content: center !important;
    gap: 12px !important;
    padding: 12px 0 !important;
    margin-bottom: 16px !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    border-bottom: 1px solid var(--border-dark) !important;
}

/* Penjual Section */
.penjual-section {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
}


.penjual-section-header {
    margin-bottom: 12px !important;
    padding: 10px 14px !important;
}


/* ============================================================
   Modal Image — Tampil Natural Size, Tidak Di-Resize Browser
   ============================================================ */

.modal-card-image-wrap {
    max-width: 100% !important;
    width: auto !important;
    margin: 0 auto 1px !important;
    display: flex !important;
    justify-content: center !important;
    aspect-ratio: auto !important;
}

.modal-card-image-wrap img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 80vh !important;
    object-fit: contain !important;
    display: block !important;
}


/* ============================================================================
   22. FOOTER OVERRIDE - SAMA PERSIS UNTUK SEMUA HALAMAN
   ============================================================================
   Tambahkan ini di PALING BAWAH setelah section 21
   ============================================================================ */

/* ===========================================
   FOOTER - BASE (Semua ukuran)
   =========================================== */
.footer {
    background: #1f2937 !important;
    color: #d1d5db !important;
    padding: rem 0 1.5rem !important;
    margin-top: 4rem !important;
}

.footer .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
}

/* Grid Layout */
.footer__grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 4rem !important;
    max-width: 800px !important;
    margin: 0 auto 0.5rem !important;
    align-items: start !important;
}

/* Footer Section - UKURAN SAMA */
.footer__section h3 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: #e5e7eb !important;
    margin: 0 0 1rem !important;
    text-transform: none !important;
}

.footer__section p,
.footer__section address,
.footer__section a,
.footer__section strong {
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
}

.footer__section p {
    color: #9ca3af !important;
    margin: 0 0 1rem !important;
}

.footer__section address {
    font-style: normal !important;
    color: #9ca3af !important;
}

.footer__section strong {
    color: #e5e7eb !important;
    font-weight: 600 !important;
    display: block !important;
    margin-top: 1rem !important;
    margin-bottom: 0.375rem !important;
}

.footer__section a {
    color: #9ca3af !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    word-break: break-word !important;
}

.footer__section a:hover {
    color: var(--primary) !important;
    text-decoration: underline !important;
}

/* Social Media */
.footer__social {
    display: flex !important;
    gap: 0.875rem !important;
    flex-wrap: wrap !important;
    margin-top: 1rem !important;
}

.footer__social a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: #d1d5db !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
}

.footer__social a:hover {
    background: var(--primary) !important;
    color: #000 !important;
    transform: translateY(-3px) !important;
    text-decoration: none !important;
}

.footer__social svg {
    width: 20px !important;
    height: 20px !important;
}

/* Footer Bottom */
.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding-top: 1.75rem !important;
    text-align: center !important;
}

.footer__bottom p {
    margin: 0 !important;
    font-size: 0.875rem !important;
    color: #9ca3af !important;
}

/* Back to Top */
.back-to-top {
    position: fixed !important;
    bottom: 2rem !important;
    right: 2rem !important;
    width: 48px !important;
    height: 48px !important;
    background: dodgerblue !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s !important;
    z-index: 999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #000 !important;
}

.back-to-top.show {
    opacity: 1 !important;
    visibility: visible !important;
}

.back-to-top:hover {
    background: #e6c200 !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.back-to-top svg {
    width: 24px !important;
    height: 24px !important;
}

/* Harga di card grid — center */
.card-price {
    text-align: center !important;
    justify-content: center !important;
}



.card-code {
    text-align: center !important;
}


/* ============================================================
   Rarity Filter — Scroll Indicator Kanan
   ============================================================ */

.rarity-filter-wrapper {
    position: relative;
}

/* Gradient fade + arrow di sisi kanan */
.rarity-filter-wrapper::after {
    content: '›';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 3;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    font-size: 20px;
    font-weight: 700;
    color: var(--kayou-yellow);
    background: linear-gradient(to right, transparent, var(--bg-primary) 60%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s;
}

/* Hide indicator kalau sudah scroll mentok kanan */
.rarity-filter-wrapper.scrolled-end::after {
    opacity: 0;
}

/* Rarity filter padding kanan untuk space indicator */
.rarity-filter {
    padding-right: 30px !important;
}

/* ============================================================
   Sticky Footer — Selalu di Bawah
   ============================================================ */

html {
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

body {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.main-container {
    flex: 1 !important;
}

.footer {
    margin-top: auto !important;
}

/* Logo Image */
.kayou-logo-link {
    flex-shrink: 0;
    display: block;
}

.kayou-logo-img {
    height: 50px;
    width: auto;
    border-radius: 8px;
    display: block;
}

@media (min-width: 768px) {
    .kayou-logo-img {
        height: 60px;
    }
}






/* Container ga boleh melar dari body */
.main-container {
    width: 100% !important;
    max-width: 70% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Rarity filter scrollable horizontal kalau chip banyak */
.rarity-filter-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    box-sizing: border-box;
    scrollbar-width: thin;
}

.rarity-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4em;
    white-space: nowrap;
    padding: 0.5em;
}

.rarity-chip {
    flex-shrink: 0;
}

/* Scrollbar styling (opsional) */
.rarity-filter-wrapper::-webkit-scrollbar {
    height: 4px;
}
.rarity-filter-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.rarity-filter-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}


/* ============================================
   RARITY FILTER WRAPPER — Container scrollable
   ============================================ */
.rarity-filter-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* wrapper hidden, inner yang scroll */
    box-sizing: border-box;
    margin: 0.5em 0;
}

/* ============================================
   RARITY FILTER — Inner scrollable
   ============================================ */
.rarity-filter {
    display: flex;
    font-family: sans-serif !important;
    flex-wrap: nowrap;
    align-items: center;      /* ✅ SEJAJAR VERTIKAL */
    gap: 0.5em;
    padding: 0.5em 2em 0.5em 0.5em; /* padding kanan buat space arrow */
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;    /* Firefox */
    -ms-overflow-style: none; /* IE */
    white-space: nowrap;
}

.rarity-filter::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* ============================================
   RARITY LABEL — "Rarity:"
   ============================================ */
.rarity-label {
    flex-shrink: 0;
    font-weight: 600;
    padding-right: 0.3em;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

/* ============================================
   RARITY CHIP
   ============================================ */
.rarity-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35em 0.75em;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.05);
    border-radius: 0.4em;
    font-weight: 700;
    color: var(--text-primary, #fff);
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.rarity-chip:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}

.rarity-chip.active {
    background: var(--accent, #ffd700);
    color: #000;
    border-color: var(--accent, #ffd700);
}

/* ============================================
   SCROLL ARROW INDICATOR — Fixed di kanan
   ============================================ */
.rarity-filter-wrapper::after {
    content: '›';
    position: absolute;
    top: 50%;
    right: 0.3em;
    transform: translateY(-50%);
    font-size: 1.5em;
    font-weight: 700;
    color: #ffd700; /* atau var(--accent) */
    pointer-events: none;
    z-index: 2;
    line-height: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
    /* Gradient fade dari transparan biar chip di bawahnya terlihat lembut */
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.2) 100%);
    padding: 0.5em 0.4em 0.5em 1em;
}

/* Kalau sudah scroll ke ujung, sembunyikan panah */
.rarity-filter-wrapper.scrolled-end::after {
    opacity: 0;
}


/* ============================================
   MAIN CONTAINER — Responsive
   ============================================ */
.main-container {
    width: 100% !important;
    max-width: 1200px !important;  /* ✅ Batasi di desktop */
    margin: 0 auto !important;      /* ✅ Center horizontal */
    padding: 0 1em !important;      /* Space kiri-kanan */
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

/* Mobile — full width, padding lebih kecil */
@media (max-width: 768px) {
    .main-container {
        max-width: 100% !important;
        padding: 0 0em !important;
    }
}

/* Tablet — sedikit lebih kecil */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-container {
        max-width: 960px !important;
    }
}


/* === CDU SECTION LAYOUT === */
.cdu-section {
  display: grid !important;
  grid-template-columns: 8.5em 1fr !important; /* kiri gambar, kanan konten */
  gap: 1em !important;
  align-items: stretch !important; /* bikin kiri-kanan sama tinggi */
  padding: 1em !important;
  border-radius: 1em !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}

/* KIRI: gambar box */


/* KANAN: konten */
.cdu-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
}

.cdu-title {
  font-weight: 800 !important;
  font-size: 1.05em !important;
  line-height: 1.25 !important;
  margin: 0 0 0.8em 0 !important;
  text-align: left !important;
}

.cdu-title .cdu-name {
  font-weight: 900 !important;
}

/* tombol marketplace */
.cdu-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75em !important;
}

.cdu-link-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important; /* <-- rata kiri */
  gap: 0.7em !important;
  width: 100% !important;

  padding: 0.8em 1em !important;
  border-radius: 1em !important;

  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;

  color: var(--text-primary, #fff) !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

.cdu-link-btn:hover {
  background: rgba(255,255,255,0.10) !important;
}

/* logo marketplace rata kiri */
.cdu-link-logo {
  width: 22em !important;
  height: 2em !important;
  object-fit: contain !important;
  flex: 0 0 2em !important;
}

.cdu-link-label {
  font-weight: 800 !important;
  font-size: 1em !important;
  line-height: 1.1 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* CDU SECTION: selalu 2 kolom */
.cdu-section{
  display: grid !important;
  grid-template-columns: clamp(6.5em, 1vw, 1em) minmax(0, 1fr) !important;
  gap: 1em !important;
  align-items: stretch !important;
  padding: 1em !important;
  border-radius: 1em !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-sizing: border-box !important;
  margin-right: 16px !important;
}

/* KANAN: konten */
.cdu-content{
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
}

.cdu-title{
  font-weight: 800 !important;
  font-size: 1.05em !important;
  line-height: 1.25 !important;
  margin: 0 0 .8em 0 !important;
  text-align: left !important;

  /* biar judul panjang tidak bikin layout “aneh” */
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

.cdu-links{
  display: flex !important;
  flex-direction: column !important;
  gap: .75em !important;
}

/* tombol marketplace rata kiri */
.cdu-link-btn{
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: .7em !important;
  width: 95% !important;
  box-sizing: border-box !important;

  padding: .8em 1em !important;
  border-radius: 1em !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #fff !important;
  text-decoration: none !important;
}

.cdu-link-logo{
  width: 22em !important;
  height: 2em !important;
  object-fit: contain !important;
  flex: 0 0 2em !important;
}

.cdu-link-label{
  font-weight: 800 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* kotak gambar CDU */
.cdu-image{
  padding: 0 !important;                 /* ✅ hilangin jarak */
  background: transparent !important;    /* ✅ jangan ada bg hitam */
  border-radius: 0.9em !important;       /* samakan dengan desainmu */
  overflow: hidden !important;           /* ✅ biar gambar kepotong sesuai radius */
  display: block !important;
}

/* gambar CDU mentok sampai border */
.cdu-image img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;          /* ✅ full nutup area, tanpa sisi hitam */
  border-radius: inherit !important;     /* ✅ radius ikut container */
}

@media (prefers-color-scheme: light){
  #cduSection, .cdu-section{
    background:#fff !important;
    border:1px solid rgba(0,0,0,0.12) !important;
    box-shadow:0 8px 22px rgba(0,0,0,0.08) !important;
  }
  .cdu-image{
    border:1px solid rgba(0,0,0,0.15) !important;
    background:#fff !important;
  }
  .cdu-link-btn{
    background:#f7f7f8 !important;
    border:1px solid rgba(0,0,0,0.12) !important;
    color:#111 !important;
  }
}

/* === CDU CENTER LAYOUT: hanya saat CDU mode === */
#cardModal.is-cdu-mode #cduSection.cdu-section{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1em !important;

  width: 100% !important;
  max-width: 28em !important;
  margin: 1em auto !important;
  padding: 1.2em !important;

  border-radius: 1.2em !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  box-sizing: border-box !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-image{
  width: 100% !important;
  max-width: 16em !important;
  aspect-ratio: 3 / 4 !important;
  border-radius: 1em !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-image img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-content{
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.8em !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-title{
  text-align: center !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-links{
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.8em !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-link-btn{
  width: 100% !important;
  max-width: 18em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.7em !important;

  padding: 0.85em 1em !important;
  border-radius: 1em !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-link-logo{
  width: 10em !important;
  height: 3em !important;
  object-fit: contain !important;
  flex: 0 0 2em !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-link-label{
  font-weight: 800 !important;
}

/* Overlay nutup konten tanpa mengubah layout */
.modal-skeleton{
  position: absolute;
  inset: 0;
  padding: 1em;
  border-radius: inherit;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(1px);
  z-index: 50;
}

/* efek shimmer */
.modal-skeleton .sk-img,
.modal-skeleton .sk-pill,
.modal-skeleton .sk-title,
.modal-skeleton .sk-block{
  background: linear-gradient(90deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.16),
    rgba(255,255,255,0.08)
  );
  background-size: 200% 100%;
  animation: skShimmer 1.1s linear infinite;
  border-radius: .8em;
}

@keyframes skShimmer{
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* bentuk-bentuk placeholder */
.modal-skeleton .sk-img{
  width: 100%;
  aspect-ratio: 63/88;      /* rasio kartu */
  border-radius: 1em;
  margin-bottom: 1em;
}

.modal-skeleton .sk-row{
  display:flex;
  gap:.6em;
  margin-bottom: .9em;
}

.modal-skeleton .sk-pill{
  width: 5.5em;
  height: 2.1em;
  border-radius: 999px;
}

.modal-skeleton .sk-title{
  width: 70%;
  height: 2.2em;
  margin: .6em auto 1em auto;
}

.modal-skeleton .sk-block{
  width: 100%;
  height: 4em;
  margin-bottom: .8em;
}
.modal-skeleton .sk-block.small{
  height: 2.8em;
}

.modal-card-image-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 63 / 88;  /* rasio kartu */
  border-radius: 1em;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.modal-card-image-wrap::before{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.05)
  );
  background-size:200% 100%;
  animation: modalShimmer 1.1s linear infinite;
  z-index:1;
  opacity:1;
  transition: opacity .15s ease;
}

.modal-card-image-wrap.is-loaded::before{
  opacity:0;
  animation:none;
}

#modalImg{
  position:absolute; inset:0;
  width:100%;
  height:100%;
  object-fit: contain; /* atau cover */
  display:block;
  z-index:2;
  opacity:0;
  transition: opacity .15s ease;
}

.modal-card-image-wrap.is-loaded #modalImg{ opacity:1; }

@keyframes modalShimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}

.modal-card-image-wrap{ position:relative; width:100%; aspect-ratio:63/88; overflow:hidden; }
.modal-card-image-wrap::before{ content:''; position:absolute; inset:0; /* shimmer bg */ }
.modal-card-image-wrap.is-loaded::before{ opacity:0; animation:none; }
#modalImg{ position:absolute; inset:0; width:100%; height:100%; opacity:0; }
.modal-card-image-wrap.is-loaded #modalImg{ opacity:1; }


.modal-card-image-wrap{
  position: relative !important;
  width: 100% !important;
  aspect-ratio: 63 / 88 !important;   /* FIX tinggi */
  min-height: 18em !important;        /* fallback kalau aspect-ratio tidak kebaca */
  border-radius: 1em !important;
  overflow: hidden !important;
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

/* shimmer */
.modal-card-image-wrap::before{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.12),
    rgba(255,255,255,0.05)
  ) !important;
  background-size:200% 100% !important;
  animation: modalShimmer 1.1s linear infinite !important;
  z-index:1 !important;
  opacity:1 !important;
  transition: opacity .15s ease !important;
}

.modal-card-image-wrap.is-loaded::before{
  opacity:0 !important;
  animation:none !important;
}

#modalImg{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  object-fit: contain !important;  /* ganti cover kalau mau mentok */
  display:block !important;
  z-index:2 !important;
  opacity:0 !important;
  transition: opacity .15s ease !important;
}

.modal-card-image-wrap.is-loaded #modalImg{ opacity:1 !important; }

@keyframes modalShimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}

.modal-card-image-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 63/88;
  min-height: 18em;
  border-radius: 1em;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.modal-card-image-wrap::before{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(90deg, rgba(255,255,255,0.05), rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  background-size:200% 100%;
  animation: modalShimmer 1.1s linear infinite;
  z-index:1;
  opacity:1;
  transition: opacity .15s ease;
}
.modal-card-image-wrap.is-loaded::before{ opacity:0; animation:none; }
#modalImg{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit: contain; /* cover kalau mau mentok */
  display:block;
  z-index:2;
  opacity:0;
  transition: opacity .15s ease;
}
.modal-card-image-wrap.is-loaded #modalImg{ opacity:1; }
@keyframes modalShimmer{ 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* image selalu kelihatan (placeholder juga kelihatan) */
#modalImg{
  opacity: 1 !important;
}

/* shimmer di atas image, hilang saat loaded */
.modal-card-image-wrap::before{
  z-index: 3 !important;     /* shimmer di atas image */
  opacity: 1;
}
.modal-card-image-wrap.is-loaded::before{
  opacity: 0;
  animation: none;
}

/* pastikan img di bawah shimmer */
#modalImg{ z-index: 2 !important; }

/* Saat CDU mode: hilangkan seluruh kotak gambar utama (jadi nggak ada placeholder) */
#cardModal.is-cdu-mode .modal-card-image-wrap {
  display: none !important;
}
#cardModal.is-cdu-mode #modalImg {
  display: none !important;
}

/* Biar frame kotak gambar tidak beda warna (tidak belang) */
.modal-card-image-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}


/* Transparan full: hilangkan frame + shimmer */
#cardModal .modal-card-image-wrap{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* matikan shimmer layer */
#cardModal .modal-card-image-wrap::before{
  content: none !important;
}

/* =========================================================
   CDU MODE: FIT 1 LAYAR (NO SCROLL)
   ========================================================= */

/* Matikan scroll di modal saat CDU mode */
#cardModal.is-cdu-mode .kayou-modal-inner{
  height: 100dvh !important;      /* mobile safe */
  max-height: 100dvh !important;
  overflow: hidden !important;
}

/* Pastikan konten modal ngisi tinggi */
#cardModal.is-cdu-mode #modalContent{
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* CDU section jadi “container” utama yang di-fit */
#cardModal.is-cdu-mode #cduSection{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  /* ngikut tinggi viewport, dikurangi area close bar */
  max-height: calc(100dvh - 4.5rem) !important;

  overflow: hidden !important;
  box-sizing: border-box !important;

  width: min(92vw, 30em) !important;
  margin: 0 auto !important;
  padding: clamp(.6rem, 2vh, 1rem) !important;
  gap: clamp(.5rem, 1.6vh, .9rem) !important;
}

/* Gambar ikut mengecil & dibatasi tinggi supaya muat 1 layar */
#cardModal.is-cdu-mode #cduSection .cdu-image{
  width: min(78vw, 18em) !important;
  aspect-ratio: 4 / 5 !important;

  /* batas tinggi supaya tidak mendorong tombol keluar layar */
  max-height: 42dvh !important;

  border-radius: 1em !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-image img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;   /* full, mentok border */
  display: block !important;
}

/* Judul: WRAP (tidak dipotong) + font mengecil otomatis */
#cardModal.is-cdu-mode #cduSection .cdu-title{
  width: 100% !important;
  text-align: center !important;

  font-size: clamp(.9rem, 2.2vh, 1.05rem) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  margin: 0 !important;

  white-space: normal !important;
  word-break: break-word !important;
  overflow: visible !important;
}

/* Tombol marketplace: ikut mengecil */
#cardModal.is-cdu-mode #cduSection .cdu-links{
  width: 100% !important;
  max-width: min(86vw, 22em) !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: clamp(.45rem, 1.5vh, .75rem) !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-link-btn{
  width: 100% !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: clamp(.55rem, 1.8vh, .85rem) 1rem !important;
  border-radius: 1em !important;
  box-sizing: border-box !important;
}

#cardModal.is-cdu-mode #cduSection .cdu-link-logo{
  width: clamp(10rem, 3vh, 12rem) !important;
  height: clamp(1.6rem, 3vh, 3rem) !important;
  object-fit: contain !important;
}