/* ===========================
   Mystic Gens - Ranks Page
   Match Rules page styling
   =========================== */

.container{
    width:100%;
    max-width:1150px;
}

/* Controls card */

.controls{
    width:100%;
    max-width:1150px;
    margin:0 auto 18px auto;
    padding:16px;
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    align-items:center;

    border:1px solid var(--ring);
    border-radius:14px;
    background:rgba(255,255,255,0.03);
    box-shadow:none;
    backdrop-filter:none;
}

.search-box{
    flex:1;
    min-width:260px;
    position:relative;
}

.search-box i{
    position:absolute;
    left:12px;
    top:50%;
    transform:translateY(-50%);
    font-size:14px;
    color:var(--muted);
    pointer-events:none;
}

.search-box input{
    width:100%;
    padding:11px 12px 11px 36px;
    border-radius:12px;
    border:1px solid var(--ring);
    background:rgba(0,0,0,0.12);
    color:var(--text);
    font-size:14px;
    outline:none;
    transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.search-box input::placeholder{
    color:var(--muted);
}

.search-box input:focus{
    border-color:rgba(138,92,246,0.7);
    box-shadow:0 0 0 3px rgba(138,92,246,0.18);
    background:rgba(0,0,0,0.16);
}

.filter-buttons{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
}

.filter-btn{
    display:inline-flex;
    align-items:center;

    padding:8px 12px;
    border-radius:999px;
    border:1px solid var(--ring);
    background:rgba(255,255,255,0.03);

    color:var(--muted);
    font-size:12px;
    font-weight:700;
    letter-spacing:.06em;
    text-transform:uppercase;

    cursor:pointer;
    transition:background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}

.filter-btn i{
    font-size:12px;
}

.filter-btn:hover{
    background:rgba(255,255,255,0.05);
    color:var(--text);
    transform:translateY(-1px);
}

.filter-btn.active{
    color:#fdfbff;
    border-color:rgba(138,92,246,0.75);
    background:linear-gradient(135deg,rgba(138,92,246,0.30),rgba(255,183,3,0.14));
}

/* Table wrapper matches rules table wrapper */

.table-wrapper{
    width:100%;
    max-width:1150px;
    margin:0 auto;
    border-radius:12px;
    border:1px solid var(--ring);
    overflow:auto;
    background:rgba(255,255,255,0.02);
}

.comparison-table{
    min-width:980px;
}

/* Base table */

table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
    background:rgba(0,0,0,0.12);
}

thead{
    position:sticky;
    top:0;
    z-index:20;
}

.rank-header{
    background:linear-gradient(90deg,rgba(138,92,246,0.55),rgba(255,183,3,0.45));
}

th,
td{
    padding:10px 12px;
    text-align:center;
    border-bottom:1px solid rgba(255,255,255,0.06);
    white-space:nowrap;
}

/* First column sticky like before, but blended with rules style */

th:first-child,
td:first-child{
    text-align:left;
    position:sticky;
    left:0;
    z-index:21;
    background: rgba(22, 17, 32, 0.92);
    border-right:1px solid rgba(255,255,255,0.06);
}

/* Header cells */

th{
    font-size:12px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.06em;
    color:#fdfbff;
    vertical-align:top;
}

th:first-child{
    color:#fdfbff;
}

/* Rank header content */

.rank-name{
    display:block;
    font-size:13px;
    font-weight:900;
    text-transform:none;
    letter-spacing:0;
    margin-bottom:2px;
    color:#fdfbff;
}

.rank-price{
    display:block;
    font-size:12px;
    font-weight:700;
    color:rgba(253,251,255,0.80);
    margin-bottom:8px;
}

.rank-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    position:absolute;
    top:8px;
    left:50%;
    transform:translateX(-50%);

    padding:4px 10px;
    border-radius:999px;

    font-size:11px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;

    border:1px solid rgba(31,191,191,0.7);
    background:linear-gradient(135deg,rgba(31,191,191,0.20),rgba(31,191,191,0));
    color:#fdfbff;
    white-space:nowrap;
}

th{
    position:relative;
    padding-top:40px;
}

.rank-badge.popular{
    border-color:rgba(255,183,3,0.85);
    background:linear-gradient(135deg,rgba(255,183,3,0.22),rgba(255,183,3,0));
}

.rank-badge.best-value{
    border-color:rgba(34,197,94,0.85);
    background:linear-gradient(135deg,rgba(34,197,94,0.20),rgba(34,197,94,0));
}

/* Buy button */

.buy-btn{
    width:100%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    padding:8px 10px;
    border-radius:10px;
    border:1px solid rgba(255,255,255,0.10);

    background:rgba(255,255,255,0.08);
    color:#fdfbff;

    font-family:inherit;
    font-size:12px;
    font-weight:800;
    letter-spacing:.06em;
    text-transform:uppercase;

    cursor:pointer;
    transition:background .15s ease, border-color .15s ease, transform .1s ease;
}

.buy-btn:hover{
    background:rgba(255,255,255,0.12);
    border-color:rgba(255,255,255,0.18);
    transform:translateY(-1px);
}

/* Body rows */

tbody tr{
    transition:background .15s ease;
    background:rgba(255,255,255,0.05);
}

tbody tr:nth-child(even):not(.section-header-row){
    background:rgba(255,255,255,0.03);
}

tbody tr:hover:not(.section-header-row){
    background:rgba(255,255,255,0.04);
}

tbody tr.hidden{
    display:none;
}

/* Section headers */

.section-header-row td{
    padding: 10px;
    border-bottom:1px solid rgba(255,255,255,0.06);
}

.section-header{
    padding:12px 12px;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#fdfbff;

    background:radial-gradient(circle at left,rgba(138,92,246,0.22),transparent);
    border-top:1px solid rgba(138,92,246,0.35);
}

.section-header i{
    margin-right:8px;
    opacity:.95;
}

/* Cell text + icons */

td{
    color:var(--muted);
    font-size:13px;
}

td:first-child{
    color:var(--text);
    font-weight:700;
}

.feature-text{
    color:var(--text);
    font-weight:700;
}

.check{
    color:rgba(34,197,94,1);
    font-size:16px;
}

.cross{
    color:rgba(239,68,68,0.65);
    font-size:16px;
}

/* Tooltip */

.tooltip-wrapper{
    position:relative;
    display:inline-block;
    cursor:help;
}

.tooltip-icon{
    margin-left:6px;
    color:var(--muted);
    font-size:11px;
}

.tooltip-content{
    visibility:hidden;
    opacity:0;

    position:absolute;
    left:50%;
    bottom:130%;
    transform:translateX(-50%);

    width:220px;
    padding:10px 12px;

    border-radius:12px;
    border:1px solid var(--ring);
    background:rgba(15,12,22,0.96);

    color:var(--text);
    font-size:12px;
    line-height:1.45;

    box-shadow:none;
    transition:opacity .15s ease, transform .15s ease, visibility .15s ease;
    z-index:200;
}

.tooltip-wrapper:hover .tooltip-content{
    visibility:visible;
    opacity:1;
    transform:translateX(-50%) translateY(-2px);
}

/* No results */

.no-results{
    display:none;
    text-align:center;
    padding:28px 16px;
    color:var(--muted);
    font-size:13px;
}

.no-results i{
    display:block;
    margin-bottom:8px;
    font-size:18px;
    color:var(--muted);
}

/* Responsive */

@media (max-width:960px){
    .controls{
        padding:14px;
    }

    .filter-btn{
        padding:8px 10px;
    }
}
