/* =======================================
   GLOBAL VARIABLES
======================================= */

:root {
    --bg: #f5f7fb;
    --bg-card: #ffffff;
    --bg-accent: #f8faff;
    --bg-soft: #fcfdff;

    --border: #e7e9f0;
    --border-soft: #e9eefb;

    --text: #1f2430;
    --text-muted: #7d8597;

    --link-hover: #3b6ef5;

    --hover-bg: #e9f0ff;
    --hover-bg-strong: #dbe4ff;

    --shadow: rgba(9, 30, 66, 0.03);

    --badge-bg: #edf2ff;

    --item-gradient-1: #ffffff;
    --item-gradient-2: #fbfdff;

    --quick-gradient-1: #ffffff;
    --quick-gradient-2: #fcfdff;

    --header-bg: #ffffffcc;
    --header-border: #e4e6ef;

    --model-bg: #f8fafc;

    --btn-3d-1: #4863f8;
    --btn-3d-2: #2b4bf3;

    --btn-3d-red-1: #ff6b6b;
    --btn-3d-red-2: #ff5252;

    --common-rarity: linear-gradient(180deg, #c7cbd9, #aeb4c9);
    --uncommon-rarity: linear-gradient(180deg, #9fe3b6, #7fd39f);
    --rare-rarity: linear-gradient(180deg, #9fd4f2, #7fbfe6);
    --epic-rarity: linear-gradient(180deg, #e7a6d8, #d88ec6);
    --legendary-rarity: linear-gradient(180deg, #f6c76a, #e8a94f);

    /* New variables for consistency */
    --primary-color: #3b6ef5;
    --danger-color: #ff6b6b;
    --success-color: #51cf66;
    --warning-color: #ff922b;
}

html.dark {
    --bg: #101010;
    --bg-card: #1a1a1a;
    --bg-accent: #1e1e1e;
    --bg-soft: #181818;

    --border: #333;
    --border-soft: #444;

    --text: #e5e5e5;
    --text-muted: #9aa0ac;

    --link-hover: #6d8fff;

    --hover-bg: #252b33;
    --hover-bg-strong: #2f3642;

    --shadow: rgba(0,0,0,0.45);

    --badge-bg: #2a2e36;

    --item-gradient-1: #1a1a1a;
    --item-gradient-2: #202020;

    --quick-gradient-1: #1a1a1a;
    --quick-gradient-2: #202020;

    --header-bg: #1a1a1acc;
    --header-border: #333;

    --model-bg: #1e1e1e;

    --btn-3d-1: #3b5ad1;
    --btn-3d-2: #2b47ad;

    --btn-3d-red-1: #c44747;
    --btn-3d-red-2: #b63535;

    --common-rarity: linear-gradient(180deg, #7c849e, #606781);
    --uncommon-rarity: linear-gradient(180deg, #4fbf7a, #3da766);
    --rare-rarity: linear-gradient(180deg, #4aa8d8, #3b8fc0);
    --epic-rarity: linear-gradient(180deg, #c26ab1, #a95497);
    --legendary-rarity: linear-gradient(180deg, #d79a34, #b87c20);
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------
 SIDEBAR (GitBook modern)
------------------------------------------------------------------- */

.sidebar {
    width: 260px;
    background: var(--bg-card);
    padding: 1.5rem 1rem;
    border-right: 1px solid var(--border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 200;
}

.sidebar-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-title {
    font-size: .75rem;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    opacity: 0.8;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all .2s ease;
    color: var(--text);
}

.nav-link .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: inherit;
    opacity: 0.7;
}

.nav-link .icon svg {
    width: 20px;
    height: 20px;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--link-hover);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--hover-bg-strong);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active .icon {
    opacity: 1;
    color: var(--primary-color);
}

/* -------------------------------------------------------------------
 GLOBAL HEADER
------------------------------------------------------------------- */

.global-header {
    left: 0 !important;
    position: fixed;
    top: 0;
    right: 0;
    height: 55px;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    border-bottom: 1px solid var(--header-border);
    justify-content: space-between;
    z-index: 80;
}

.header-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.header-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.header-btn {
    border: none;
    background: var(--badge-bg);
    padding: .45rem .75rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: .15s;
}

.header-btn:hover {
    background: var(--hover-bg-strong);
    transform: translateY(-1px);
}

/* -------------------------------------------------------------------
 MAIN CONTENT
------------------------------------------------------------------- */

.main {
    padding: 5rem 2rem 2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.header {
    margin-bottom: 1.5rem;
}

.card {
    padding: 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    margin-bottom: 1.4rem;
    box-shadow: 0 6px 18px var(--shadow);
}

/* -------------------------------------------------------------------
 MOBILE HEADER + RESPONSIVE SIDEBAR
------------------------------------------------------------------- */

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.7rem;
    padding: .3rem;
    cursor: pointer;
    color: var(--text);
}

.sidebar-overlay {
    display: none;
}

body.sidebar-open .sidebar {
    transform: translateX(0);
}

/* Overlay */
.sidebar-overlay {
    display: none;
}

body.sidebar-open .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 150;
}

/* -------------------------------------------------------------------
 CARDS / GRIDS
------------------------------------------------------------------- */

.stats-grid {
    align-items: center;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--item-gradient-1), var(--item-gradient-2));
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 6px 18px rgba(18, 40, 70, 0.05);
}

.stat-number {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--btn-3d-2);
}

/* Quick Links */
.quick-links {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.quick-link {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: linear-gradient(135deg, var(--quick-gradient-1), var(--quick-gradient-2));
    text-decoration: none;
    color: inherit;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 4px 14px rgba(39,56,120,0.03);
}

.quick-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(39, 56, 120, 0.08);
    border-color: var(--primary-color);
}

.quick-link span {
    font-size: 1.6rem;
    /*color: var(--primary-color);*/
}

/* -------------------------------------------------------------------
 LEGAL
------------------------------------------------------------------- */

.legal h1 {
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 10px;
    border-bottom: 3px solid #3182ce;
    padding-bottom: 10px;
}

.legal h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-top: 20px;
}

/* Paragraf dan Teks */
.legal p {
    margin-bottom: 15px;
    font-size: 1rem;
}

/* Styling untuk Tanggal (Last Updated) */
.legal p:first-of-type {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* List/Daftar Definisi */
.legal ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.legal li {
    margin-bottom: 12px;
}

.legal li strong {
    color: var(--text);
}

/* Link */
.legal a {
    color: #3182ce;
    text-decoration: none;
    transition: color 0.2s;
}

.legal a:hover {
    text-decoration: underline;
    color: #2c5282;
}

/* Card Pengembang */
.dev-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px;
}

.dev-container .dev-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

/* Avatar/Gambar */
.dev-container .dev-avatar img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--btn-3d-1);
    padding: 3px;
}

/* Info & Nickname */
.dev-container .dev-info {
    display: flex;
    flex-direction: column;
}

.dev-container .dev-info .nickname {
    font-size: 1.3rem;
    color: var(--text);
}

.dev-container .dev-info .role {
    margin: 0 0 15px 0;
    color: var(--text);
    opacity: 0.8;
}

.dev-container .dev-info .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dev-container .dev-info .social-links .social-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dev-container .dev-info .social-links .social-item:hover {
    background: var(--btn-3d-1);
    color: white;
    border-color: var(--btn-3d-1);
    transform: translateY(-2px);
}

.dev-container .dev-info .social-links .social-item .icon {
    margin-right: 6px;
}

/* Responsif Mobile */
@media (max-width: 500px) {
    .dev-container .dev-card {
        flex-direction: column;
        text-align: center;
    }
    .dev-container .dev-info .social-links {
        justify-content: center;
    }
}

/* -------------------------------------------------------------------
 HOME
------------------------------------------------------------------- */

.card-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.referral-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(127, 127, 127, 0.1);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 12px 0;
    border: 1px solid var(--border-soft);
}

.reward-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 1.2rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 12px;
}

.reward-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-container {
    position: relative;
    width: 100%;
    max-width: 60px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.img-container:hover {
    transform: scale(1.1) rotate(3deg);
}

.img-container img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    display: block;
}

.reward-qty {
    position: absolute;
    top: -4px;
    right: -4px;
    background: grey;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 0.5px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.btn-chainers {
    display: block;
    background: linear-gradient(135deg, #4863f8, #2b4bf3);
    color: white !important;
    text-decoration: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 1.2rem;
    transition: all 0.3s;
    box-shadow: 0 4px 0px #1a32a8;
    text-align: center;
}

.btn-chainers:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0px #1a32a8;
    filter: brightness(1.1);
}

.btn-chainers:active {
    transform: translateY(2px);
    box-shadow: 0 0px 0px #1a32a8;
}

/* -------------------------------------------------------------------
 TABLE
------------------------------------------------------------------- */

.table-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    overflow: auto;
    box-shadow: 0 6px 18px var(--shadow);
}

.table-compact {
    width: 100%;
}

.table-compact th,
.table-compact td {
    padding: .6rem .85rem;
    font-size: .92rem;
}

.common {
    background: var(--common-rarity);
    color: #ffffff;
    text-align: center;
}

.uncommon {
    background: var(--uncommon-rarity);
    color: #ffffff;
    text-align: center;
}

.rare {
    background: var(--rare-rarity);
    color: #ffffff;
    text-align: center;
}

.epic {
    background: var(--epic-rarity);
    color: #ffffff;
    text-align: center;
}

.legendary {
    background: var(--legendary-rarity);
    color: #ffffff;
    text-align: center;
}

.BioP {
    height: 1em;
    vertical-align: middle;
}

/* =======================================
   PINNED SEEDS SECTION
======================================= */

/* Title */
.pinned-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Minimize button */
.pinned-toggle {
    background: var(--bg-soft);
    border: 1px solid var(--border-soft);
    padding: .25rem .6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: .15s;
}

.pinned-toggle:hover {
    background: var(--hover-bg);
    border-color: var(--hover-bg-strong);
    color: var(--text);
}

/* Wrapper around table */
.pinned-wrapper {
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    box-shadow: 0 6px 18px var(--shadow);
}

.pinned-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    overflow: auto;
    box-shadow: 0 6px 18px var(--shadow);
}

/* -------------------------------------------------------------------
 BEST SEEDS FILTER BAR
------------------------------------------------------------------- */

.seeds-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(10, 20, 40, 0.04);
}

/* count text */
.items-count {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.filter-select {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    width: 100%;
}

/* search input */
.search-input {
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    width: 100%;
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border .15s, box-shadow .15s;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 110, 245, 0.2);
}

.filter-select {
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    border-radius: 8px;
    font-size: .95rem;
    cursor: pointer;
}

/* rarity select */
.filter-select select {
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: .95rem;
    background: var(--bg-card);
    color: var(--text);
    width: 100%;
    outline: none;
    transition: border .15s, box-shadow .15s;
}

.filter-select select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 110, 245, 0.2);
}

.export-import-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
}

.export-btn,
.import-btn {
    text-align: center;
    padding: 0.4rem 0.8rem;
    background: var(--primary-color); 
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s ease;
    width: 100%;
}

.import-btn {
    position: relative;
    display: inline-block;
}

.export-btn:hover,
.import-btn:hover {
    background: var(--btn-3d-2);
}

.clear-pinned-btn {
    padding: .45rem .9rem;
    background: var(--btn-3d-red-1);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    flex-direction: column;
    gap: .8rem;
    width: 100%;
}

.clear-pinned-btn:hover {
    background: var(--btn-3d-red-2);
    transform: translateY(-1px);
}

.pin-btn,
.unpin-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pin-btn { 
    background: var(--primary-color); 
    color: white; 
}

.pin-btn:hover {
    background: var(--btn-3d-2);
    transform: translateY(-1px);
}

.unpin-btn { 
    background: var(--text-muted); 
    color: white; 
}

.unpin-btn:hover {
    background: var(--text);
    transform: translateY(-1px);
}

.hidden-row-group {
    display: none !important;
}

/* -------------------------------------------------------------------
 SEEDS & FOODS PAGE
------------------------------------------------------------------- */

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    overflow-x: auto;
}

/* -------------------------------------------------------------------
 REWARD POOLS
------------------------------------------------------------------- */

.rp-result {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 1.2rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    overflow-x: auto
}

.rp-container-table {
    display: flex;
    flex-wrap: wrap; 
    gap: 15px;
    width: 100%;
    overflow-x: visible; 
}

.rp-column {
    flex: 1;
    min-width: 300px; 
}

@media (max-width: 600px) {
    .rp-column {
        flex: 1 1 100%;
    }
}

.rp-column p {
    text-transform: uppercase;
    text-align: center;
    margin: 15px 0 10px 0;
    color: var(--warning-color);
    font-weight: bold;
    border: 1px solid var(--border-soft);
}

.rp-column p img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 5px auto;
}

.rp-result table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
}

.rp-result th {
    background: var(--bg-accent);
    color: var(--text);
    font-size: 0.75rem;
    padding: 8px;
    border: 1px solid var(--border-soft);
}

.rp-result td {
    padding: 8px;
    font-size: 0.85rem;
    color: #F5F5F5;
    text-align: center;
    border: 1px solid var(--border-soft);
}

.rp-result td.active {
    background: rgba(16, 185, 129, 0.45);
    color: rgba(16, 185, 129, 1);
}

.rp-result td.inactive {
    background: rgba(245, 158, 11, 0.45);
    color: rgba(245, 158, 11, 1);
}

.rp-result td.completed {
    background: rgba(100, 116, 139, 0.45);
    color: rgba(100, 116, 139, 1);
    filter: grayscale(0.5);
}

.rp-result .row-latest td {
    border-bottom: 2px solid #666;
    font-weight: bold;
}

.rp-result .row-history td {
    opacity: 0.8;
    font-size: 0.9em;
}

/* -------------------------------------------------------------------
 PROGRESSIVE EVENT
------------------------------------------------------------------- */

.pe-result {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 1.2rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}

.pe-stat-label {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pe-stat-label img {
    width: 100%;
    border-radius: 8px;
    margin: 5px 0;
}

.pe-stat-label h2 {
    text-transform: uppercase;
    text-align: center;
    color: var(--warning-color);
}

.pe-stat-label p {
    text-align: center;
    margin: 0 0 5px 0;
}

.pe-stat-label span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.pe-stat-label span img {
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    object-fit: contain;
}

.pe-stat-label ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin: 10px 0 0 0;
    list-style: none;
}

.pe-stat-label li {
    background: var(--bg-accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
}

.pe-container-table {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    width: 100%;
}

.pe-column {
    flex: 1;
    min-width: fit-content;
}

.pe-column p {
    text-transform: uppercase;
    text-align: center;
    margin: 15px 0 10px 0;
    color: var(--warning-color);
    font-weight: bold;
    border: 1px solid var(--border-soft);
}

.pe-result table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
}

.pe-result th {
    background: var(--bg-accent);
    color: var(--text);
    font-size: 0.75rem;
    padding: 8px;
    border: 1px solid var(--border-soft);
}

.pe-result td {
    padding: 8px;
    font-size: 0.85rem;
    color: var(--text);
    text-align: center;
    border: 1px solid var(--border-soft);
}

.pe-result select {
    text-align: center;
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border-soft);
    font-size: 0.8rem;
    padding: 2px;
}

.pe-result th img,
.pe-result td img {
    width: 32px; height: 32px; border-radius: 6px; object-fit: cover; margin-right: 2px;
}

.pe-result .non-active {
    filter: grayscale(1);
    opacity: 0.5;
    color: gray;
}

/* -------------------------------------------------------------------
 INVENTORY PAGE
------------------------------------------------------------------- */

.inventory-input {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(10, 20, 40, 0.04);
}

.inv-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: var(--bg-accent);
    color: var(--text);
    resize: vertical;
    font-size: 0.9rem;
    transition: border 0.3s;
}

.inv-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.input-btn:hover {
    opacity: 0.9;
}

.inventory-result {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    overflow: auto;
    padding: 1.2rem;
    box-shadow: 0 6px 18px var(--shadow);
}

.stat-label {
    margin-bottom: 0.5rem;
}

.stat-label h3 {
    color: var(--warning-color);
}

.stat-label span {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}


.container-table {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.column {
    flex: 1;
}

.inventory-result table {
    width: 100%;
    background: var(--bg-card);
    overflow: auto;
    border-collapse: collapse;
    margin-top: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 6px 18px var(--shadow);
}

.inventory-result th {
    background: var(--bg-accent);
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--text);
}

.inventory-result th,
.inventory-result td {
    padding: .6rem .85rem;
    font-size: .92rem;
}

.inventory-result table thead tr td {
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-align: center;
}

.inventory-result table tbody tr td {
    text-align: center;
}

/* -------------------------------------------------------------------
 DETAILS
------------------------------------------------------------------- */

.details-container {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.details-container::-webkit-scrollbar {
    display: none;
}

.cat-link {
    text-decoration: none;
    padding: 0.6rem 1rem;
    background: var(--bg-accent);
    color: var(--text);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;

    flex: 1 1 calc(30% - 0.8rem);
    min-width: 100px;
    text-align: center;
}

.cat-link:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.cat-link:active {
    transform: scale(0.95);
}

@media (max-width: 400px) {
    .cat-link {
        flex: 1 1 calc(45% - 0.8rem);
    }
}

@media (max-width: 600px) {
    .details-container {
        justify-content: flex-start;
        padding-left: 1.4rem;
        padding-right: 1.4rem;
    }
}

/* -------------------------------------------------------------------
 DETAILS — ITEM CARDS
------------------------------------------------------------------- */

.items-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
}

.item-card {
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 16px rgba(0,0,0,.05);
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.item-card-image {
    position: relative;
    background: var(--bg-accent);
    padding: 1rem;
}

.item-card-image img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
}

.item-rarity {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: .3rem .65rem;
    border-radius: 6px;
    font-size: .75rem;
    color: white;
    font-weight: 600;
}

.item-card-content {
    padding: 1.1rem 1.25rem 1.3rem;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    color: var(--text-muted);
    margin: .5rem 0 1rem;
}

.item-stats {
    display: flex;
    gap: .5rem;
    margin-bottom: 1rem;
}

.item-stat {
    padding: .35rem .6rem;
    background: var(--badge-bg);
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
}

.item-link {
    display: inline-block;
    padding: .45rem .8rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--btn-3d-1), var(--btn-3d-2));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    margin-top: .5rem;
}

.item-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 110, 245, 0.3);
}

/* -------------------------------------------------------------------
 DETAILS — ITEM DETAIL
------------------------------------------------------------------- */

.item {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.item-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding-bottom: 1.2rem;
    width: 100%;
}

.image-wrapper {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.item-image {
    max-height: 260px;
    width: 100%;
    border-radius: 12px;
    object-fit: contain;
    display: block;
}

.media-actions {
    width: 45%;
    display: block;
}

.media-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: .45rem .8rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--btn-3d-1), var(--btn-3d-2));
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    margin-top: .5rem;
}

.media-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 110, 245, 0.3);
}

.item-link-3d {
    background: linear-gradient(135deg, var(--btn-3d-red-1), var(--btn-3d-red-2));
}

.item-link-3d:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--btn-3d-red-1);
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.content-section {
    width: 100%;
}

.content-section h2 {
    margin: 0 0 0.8rem 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-soft);
    word-wrap: break-word;
}

.text-content {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
}

.text-content::-webkit-scrollbar {
    height: 6px;
}

.text-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.text-content::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 3px;
}

.text-content p,
.text-content ul {
    margin: 0;
    min-width: min-content;
}

.text-content ul {
    padding-left: 1.2rem;
    list-style-type: none;
}

.text-content li {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
    line-height: 1.5;
    word-wrap: break-word;
}

.text-content li:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

@media (max-width: 768px) {
    .item {
        gap: 1.2rem;
    }

    .item-image-container {
        gap: 0.8rem;
        padding-bottom: 1rem;
    }

    .image-wrapper {
        max-width: 250px;
    }

    .item-image {
        max-height: 220px;
    }

    .item-content {
        gap: 1.2rem;
    }

    .content-section h2 {
        font-size: 1.1rem;
        margin-bottom: 0.7rem;
    }

    .text-content {
        font-size: 0.95rem;
    }
}

@media (max-width: 565px) {
    .item {
        gap: 1rem;
    }

    .item-image-container {
        gap: 0.6rem;
        padding-bottom: 0.8rem;
    }

    .image-wrapper {
        max-width: 200px;
    }

    .item-image {
        max-height: 180px;
    }

    .item-content {
        gap: 1rem;
    }

    .content-section h2 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .text-content {
        font-size: 0.9rem;
    }

    .text-content li {
        font-size: 0.9rem;
        padding: 0.4rem 0;
        margin-bottom: 0.6rem;
    }
}

@media (max-width: 375px) {
    .image-wrapper {
        max-width: 170px;
    }

    .item-image {
        max-height: 150px;
    }

    .content-section h2 {
        font-size: 1rem;
    }
}

/* -------------------------------------------------------------------
 MODEL VIEWER
------------------------------------------------------------------- */

model-viewer {
    width:100%;
    height:350px;
    border-radius:10px;
    background: var(--model-bg);
    border: 1px solid var(--border);
}

.model-controls {
    overflow-x: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .8rem;
    background: var(--model-bg);
    padding: 1rem 0;
    border-radius: 12px;
    margin-top: 1rem;
    width: 100%;
}

.model-btn {
    padding: .6rem 1.1rem;
    font-size: .9rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    cursor: pointer;
    transition: background .15s, transform .15s;
}

.model-btn:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.model-btn:active {
    transform: scale(0.98);
}

.model-info {
    margin-top:1rem;
    padding:1.2rem;
    border: 1px solid var(--border-soft);
    border-radius:12px;
    background: var(--bg-card);
}

.info-grid {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
    gap:.8rem;
}

.info-item {
    padding:.8rem;
    border-radius:8px;
    background: var(--bg-accent);
    border: 1px solid var(--border-soft);
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.info-value {
    font-weight: 600;
    color: var(--text);
}

/* -------------------------------------------------------------------
 LOADING
------------------------------------------------------------------- */

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader-container.hide {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    /* Warna utama */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: 1px;
}

.error-loading-text {
    color: var(--danger-color);
    font-weight: 500;
    letter-spacing: 1px;
}

/* -------------------------------------------------------------------
 FOOTER
------------------------------------------------------------------- */

.footer {
    text-align: center;
    padding: 2.5rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--text-primary);
}

.footer-ad-card {
    width: 100%;
    min-width: 300px;
    max-width: 970px;
    margin: 0 auto 2.5rem auto;
    box-sizing: border-box;
    padding: 15px;
    min-height: 90px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-ad-card::before {
    content: "Advertisement";
    font-size: 11px;
    color: var(--text-muted);
    position: absolute;
    z-index: 0;
}

.footer-ad-card ins {
    width: 100% !important;
    height: 90px !important;
}

.footer-ad-card:has(ins[data-ad-status="filled"])::before {
    display: none;
}

.footer-ad-card:has(ins[data-ad-status="filled"]) {
    border-style: solid;
    padding: 0;
}

.footer-disclaimer {
    opacity: 0.7;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.footer-disclaimer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}
