/* Layout Container - Scoped Root */
.page-list-packs {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background-color: var(--color-background);
    /* Ensure child elements inherit these font settings */
    font-family: "Lexend Deca", sans-serif;
    color: var(--color-on-background);
}

/* --- 1. HORIZONTAL PACK NAV --- */
.page-list-packs .packs-nav {
    background-color: var(--color-background);
    border-bottom: 2px solid var(--color-border);
    padding: 0 1rem;
    flex-shrink: 0;
    z-index: 10;
}

.page-list-packs .packs-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
}

.page-list-packs .pack-tab {
    flex-shrink: 0;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 4px 4px 0 0;
    color: var(--color-on-background);
    font-family: "Lexend Deca", sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
    text-transform: uppercase;
    position: relative;
    border-bottom: 3px solid transparent;
}

.page-list-packs .pack-tab:hover {
    background-color: var(--color-background-hover);
}

.page-list-packs .pack-tab.active {
    background-color: var(--color-background-hover);
    border-bottom-color: var(--pack-color) !important;
    color: var(--pack-color);
}

/* --- 2. MAIN CONTENT GRID --- */
.page-list-packs .pack-content-grid {
    display: grid;
    grid-template-columns: minmax(20rem, 1fr) 3fr;
    flex: 1;
    overflow: hidden;
}

/* --- Left Column: Levels List --- */
.page-list-packs .list-container {
    border-right: 2px solid var(--color-border);
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.1);
    border-radius: 0 0 1rem 1rem;
}

.page-list-packs .pack-meta-header {
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
    background: var(--color-background);
}

.page-list-packs .pack-meta-header h2 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.page-list-packs .pack-reward {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* List Table Styles (Scoped) */
.page-list-packs .list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.page-list-packs .list tr {
    transition: background 0.1s;
}

.page-list-packs .list tr:hover {
    background: var(--color-background-hover);
}

.page-list-packs .list .rank {
    text-align: center;
    width: 3rem;
    color: var(--color-text-secondary);
    font-weight: 700;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.1rem;
}

.page-list-packs .list .level {
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--color-border);
}

.page-list-packs .list .level button {
    width: 100%;
    background-color: transparent;
    color: var(--color-on-background);
    border: none;
    padding: 1.2rem 1rem;
    text-align: start;
    cursor: pointer;
    font-weight: 600;
    font-family: "Lexend Deca", sans-serif;
    font-size: 1rem;
    display: block;
}

.page-list-packs .list .level.active {
    background-color: var(--color-background-hover);
    border-left: 4px solid var(--color-primary);
}

.page-list-packs .list .level.active button {
    color: var(--color-primary);
}

/* --- Right Column: Level Details --- */
.page-list-packs .level-container {
    overflow-y: auto;
    padding: 3rem 4rem;
}

.page-list-packs .level {
    max-width: 60rem;
    margin: 0 auto;
}

/* --- TYPOGRAPHY (Strictly Scoped) --- */

.page-list-packs .level h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
    line-height: 1.1;
    font-weight: 700;
    color: var(--color-on-background);
}

.page-list-packs .level h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--color-on-background);
    font-weight: 700;
}

.page-list-packs .level-qualify-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--color-on-background);
    opacity: 0.9;
}

/* Stats Grid */
.page-list-packs .stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
    gap: 1rem;
    list-style: none;
    padding: 1.5rem 0;
    margin: 2rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.page-list-packs .type-title-sm {
    color: var(--color-text-secondary);
    -webkit-font-smoothing: subpixel-antialiased;

    text-transform: uppercase;
    font-size: 17.1428571429px;
    font-weight: 700;
    color: var(--color-text-highlight);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}


.page-list-packs .stats p {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* Records Table */
.page-list-packs .records {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.page-list-packs .record td {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.1rem;
}

.page-list-packs .record .user { 
    width: 100%; 
    padding-left: 1.5rem; 
    font-weight: 700;
}

.page-list-packs .record .percent { 
    font-weight: 700; 
}

.page-list-packs .record .hz { 
    text-align: right; 
    color: var(--color-text-secondary); 
    font-size: 0.9rem; 
}

.page-list-packs .record a { 
    text-decoration: none; 
    color: var(--color-on-background); 
}

.page-list-packs .record a:hover { 
    text-decoration: underline; 
    color: var(--color-primary); 
}

.page-list-packs .warning-lable {
    color: #ff4444;
    font-weight: bold;
    margin: 1rem 0;
    display: block;
}

.page-list-packs .video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Scrollbars - Scoped */
.page-list-packs ::-webkit-scrollbar { width: 8px; height: 8px; }
.page-list-packs ::-webkit-scrollbar-thumb { background: var(--color-primary); border-radius: 4px; }
.page-list-packs ::-webkit-scrollbar-track { background: var(--color-background-hover); }