/* ==========================================================================
   CLASS TOPPERS & BEST STUDENTS PUBLIC SHOWCASE STYLES
   ========================================================================== */

.toppers-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #172554 100%);
    color: #ffffff;
    border-bottom: 4px solid #f59e0b;
    position: relative;
    overflow: hidden;
}

.toppers-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0) 70%);
    border-radius: 50%;
}

.hero-stat-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50rem;
    padding: 0.45rem 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
}

/* Filter Navigation */
.toppers-filter-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.filter-btn {
    padding: 0.6rem 1.25rem;
    border-radius: 50rem;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-decoration: none;
}

.filter-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.filter-btn.active {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #ffffff;
    border-color: #1e40af;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.topper-year-select {
    width: auto !important;
    min-width: 190px !important;
    max-width: 220px !important;
    cursor: pointer;
}

/* Star Topper Profile Cards */
.topper-card {
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden !important;
    position: relative !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.topper-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.09) !important;
    border-color: #cbd5e1 !important;
}

/* Card Header Glows based on medal */
.card-medal-gold { border-top: 5px solid #f59e0b !important; }
.card-medal-silver { border-top: 5px solid #94a3b8 !important; }
.card-medal-bronze { border-top: 5px solid #b45309 !important; }
.card-medal-special { border-top: 5px solid #8b5cf6 !important; }

/* Rank Ribbons */
.rank-ribbon {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 50rem !important;
    font-size: 0.78rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 2 !important;
}

.ribbon-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
}

.ribbon-silver {
    background: linear-gradient(135deg, #94a3b8, #64748b) !important;
    color: #ffffff !important;
}

.ribbon-bronze {
    background: linear-gradient(135deg, #b45309, #78350f) !important;
    color: #ffffff !important;
}

.ribbon-special {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    color: #ffffff !important;
}

/* Avatar Showcase */
.topper-avatar-box {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 1rem auto !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    background: #f8fafc !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.topper-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s ease;
}

.topper-card:hover .topper-avatar-box img {
    transform: scale(1.08);
}

/* Percentage Circle Badge */
.pct-display-pill {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-weight: 800;
    font-size: 1.15rem;
    padding: 0.4rem 1rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Quote Box */
.topper-quote-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 0.9rem 1.15rem;
    border-left: 3px solid #f59e0b;
    font-style: italic;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.6;
    position: relative;
}

/* Future Goal Tag */
.goal-tag {
    display: inline-block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
}

/* Bottom Call to Action */
.topper-cta-box {
    background: linear-gradient(135deg, #1e3a8a, #0284c7);
    border-radius: 20px;
    color: #ffffff;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Modal and Interactive Enhancements */
#topperDetailModal .modal-content {
    border-radius: 24px !important;
    overflow: hidden !important;
}

.modal-topper-avatar-box {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 1rem auto !important;
    border: 4px solid #f59e0b !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25) !important;
    background: #ffffff !important;
    display: block !important;
    position: relative !important;
}

.modal-topper-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

#topperSearchInput:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15) !important;
}

@media print {
    body * {
        visibility: hidden;
    }
    #topperDetailModal, #topperDetailModal * {
        visibility: visible;
    }
    #topperDetailModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    .modal-footer, .btn-close {
        display: none !important;
    }
}

.topper-card {
    border-radius: 20px !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
}
.topper-card .topper-avatar-box {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 1rem auto !important;
    display: block !important;
    flex-shrink: 0 !important;
    position: relative !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}
.topper-card .topper-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
.modal-topper-avatar-box {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 auto 1rem auto !important;
    border: 4px solid #f59e0b !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25) !important;
    background: #ffffff;
    position: relative;
}
.modal-topper-avatar-box img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

