/* Container & Grid */
.tba-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    padding: 20px;
    background: transparent;
}

/* Carousel Layout */
.tba-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
}
.tba-carousel .tba-card {
    flex: 0 0 250px;
    scroll-snap-align: start;
}

/* Card Styling (Your Latest Edits) */
.tba-card {
    background: #0d1719; 
    border-radius: 20px !important;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    border: 1px solid #1a2a2d;
}

.tba-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.tba-img-wrap img {
    width: 100%;
    height: auto;
    border-radius: 15px !important;
    border: 4px solid #ffffff; 
    margin-bottom: 15px;
}

.tba-card h3 {
    color: #e84444; 
    font-size: 1.1rem;
    margin: 5px 0 5px 0;
    font-family: sans-serif;
}

.tba-rank {
    color: #ffffff;
    display: block;
    font-size: 0.73rem;
    margin-bottom: 5px;
    opacity: 1;
}

.tba-short {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.2rem;
}

/* Light Popup Styling */
.tba-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.tba-modal-content {
    background: #ffffff;
    color: #333;
    margin: 5% auto;
    padding: 25px;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.tba-close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 10;
}

.tba-popup-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.tba-popup-left {
    flex: 0 0 40%;
}

.tba-popup-left img {
    width: 100%;
    height: auto;
    border-radius: 20px !important;
    border: 1px solid #ddd;
}

.tba-popup-right {
    flex: 1;
}

.tba-popup-right h2 {
    margin-top: 0;
    color: #e84444;
    font-size: 2rem;
}

.tba-popup-rank {
    display: block;
    font-weight: bold;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.tba-popup-bio {
    background: #f9f9f9;
    padding: 15px;
    border-left: 4px solid #e84444;
    margin-bottom: 20px;
    font-style: italic;
}

.tba-popup-desc {
    line-height: 1.6;
}

@media (max-width: 768px) {
    .tba-popup-flex { flex-direction: column; }
    .tba-popup-left { width: 100%; text-align: center; }
}

/* Admin Sortable Handle */
.tba-sort-handle { cursor: move; color: #ccc; }