.card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    border: 1px solid #21262d;
    background-color: #191b22;
    background-size: cover;
    background-position: center;
    font-family: 'Montserrat', sans-serif;
}

.mod-actions {
    display: none;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.mod-actions.visible { display: flex; }

.mod-edit-btn, .mod-delete-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    border: 1px solid;
    text-align: center;
}
.mod-edit-btn {
    background: rgba(75,146,255,0.12);
    border-color: rgba(75,146,255,0.4);
    color: #4b92ff;
}
.mod-delete-btn {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.35);
    color: #ef4444;
}

.card-bg-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10,12,18,0.90) 0%, rgba(10,12,18,0.65) 40%, rgba(10,12,18,0.80) 100%);
    pointer-events: none;
    z-index: 0;
}

.card-inner, .accordion { position: relative; z-index: 1; }

.card-inner {
    display: flex;
    min-height: 150px;
    cursor: pointer;
}

.thumb-side {
    flex-shrink: 0;
    width: 266px;
    background: #000;
    align-self: stretch;
}
.thumb-side a { display: block; height: 100%; }
.thumb-side img { width: 100%; height: 100%; object-fit: cover; display: block; }

.content {
    flex: 1;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}

.title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }

.rank       { color: #4b92ff; font-weight: 800; font-size: 1.6rem; flex-shrink: 0; }
.level-name { color: #fff;    font-weight: 700; font-size: 1.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator    { color: #8b949e; font-size: 0.88rem; }

.badge-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end; }

.badge {
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    vertical-align: super;
    transform: translateY(-3px);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.badge-nong      { background: rgba(75,146,255,0.15); color:#4b92ff; border:1px solid rgba(37,99,235,0.6); }
.badge-creative  { background: rgba(87,255,75,0.15);  color:#4bff51; border:1px solid rgba(37,235,50,0.6); }
.badge-ft1       { background: rgba(255,252,75,0.15); color:#f3ff4b; border:1px solid rgba(235,232,37,0.6); }
.badge-removal   { background: rgba(255,75,75,0.15);  color:#ff4b4b; border:1px solid rgba(235,37,37,0.6); }
.badge-historical{ background: rgba(255,75,237,0.15); color:#ff4bf0; border:1px solid rgba(235,37,189,0.6); }

.stats {
    flex-shrink: 0;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 220px;
    gap: 2px;
}

.stat-big { color: #fff;    font-weight: 700; font-size: 1rem;  text-align: right; word-break: break-all; }
.stat-big sup { font-size: 0.65em; }
.stat-sub { color: #8b949e; font-size: 0.8rem; text-align: right; }

.toggle-btn {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
    margin-top: 10px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.toggle-btn:hover { color: #fff; }

.chevron { display: inline-block; transition: transform 0.25s ease; }
.card.expanded .chevron { transform: rotate(180deg); }

.accordion { height: 0; overflow: hidden; transition: height 0.35s ease; }

.accordion-inner {
    display: flex;
    align-items: stretch;
    height: 380px;
    border-top: 1px solid #21262d;
}

.yt-wrap { flex: 1; background: #000; min-width: 0; }
.yt-wrap iframe { width: 100%; height: 100%; display: block; border: none; }

.info-table {
    flex-shrink: 0;
    width: 360px;
    padding: 18px 26px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);
    background: rgba(10, 12, 18, 0.60);
}

.info-title {
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    margin-bottom: 2px;
}

.info-row {
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 16px;
}
.info-row:last-child { border-bottom: none; }

.info-key {
    color: #5b6877;
    min-width: 95px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.info-val  { color: #c9d1d9; word-break: break-word; }
.info-link { color: #4b92ff; text-decoration: none; font-weight: 600; }
.info-link:hover { text-decoration: underline; }

.history-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.07); }
.history-title { color: #fff; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; }

.history-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    padding: 4px 0;
    color: #8b949e;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.history-entry:last-child { border-bottom: none; }
.history-current { color: #c9d1d9; }
.history-rank { color: #4b92ff; font-weight: 700; min-width: 32px; }
.history-current .history-rank { color: #fff; }
.history-date { flex: 1; }
.history-tag {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(75,146,255,0.12);
    color: #4b92ff;
    border: 1px solid rgba(37,99,235,0.4);
}

/* History row editor (PPLL admin modal) */
.m-history-row {
    display: grid;
    grid-template-columns: 68px 1fr 28px;
    gap: 6px;
    align-items: center;
    margin-bottom: 5px;
}
.m-history-row input {
    padding: 6px 10px;
    background: #12171f;
    border: 1px solid #2a2f38;
    border-radius: 5px;
    color: #c9d1d9;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    -moz-appearance: textfield;
}
.m-history-row input::-webkit-outer-spin-button,
.m-history-row input::-webkit-inner-spin-button { -webkit-appearance: none; }
.m-history-row input:focus { border-color: #4b92ff; }
.m-history-row input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.45); cursor: pointer; }
.m-history-del {
    background: none;
    border: 1px solid rgba(239,68,68,0.3);
    color: #ef4444;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    font-family: inherit;
}
.m-history-del:hover { background: rgba(239,68,68,0.12); }

/* Loading state */
.list-loading {
    color: #8b949e;
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}
