:root {

    --light-blue: #e8f4ff;
    --dark-badge: #1a1a1a;
    --text-main: #212529;
    --text-muted: #6c757d;
    --bg-white: #ffffff;
    --card-gradient: linear-gradient(135deg, #1B8A5A 0%, #147349 100%);
    --shadow-soft: 0 6px 20px rgba(27, 138, 90, 0.3), 0 2px 6px rgba(20, 115, 73, 0.2);
    --shadow-hover: 0 24px 48px rgba(27, 138, 90, 0.4), 0 10px 20px rgba(20, 115, 73, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.student-stars-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.student-stars-container {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-white);
    color: var(--text-main);
    overflow-x: hidden;
}

.stars-section {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    gap: 30px;
    flex-wrap: wrap;
}

.title {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    cursor: default;
    transition: color 0.3s ease;
    background: linear-gradient(90deg, black, #075b27);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


.empty-stars {
    border: 1px dashed #cfe2ff;
    border-radius: 14px;
    padding: 28px;
    color: var(--text-muted);
    background: #f8fbff;
    font-weight: 600;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), #00c6ff);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.title:hover::after {
    width: 100%;
}

.title:hover {
    filter: brightness(1.15);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

.sparkle {
    display: inline-block;
    animation: sparkle-anim 2s infinite ease-in-out;
}

@keyframes sparkle-anim {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
}

.filter-group {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 6px;
    border-radius: 40px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn.active {
    background: var(--light-blue);
    color: var(--primary-blue);
}

.filter-btn:hover:not(.active) {
    color: var(--primary-blue);
}

/* Slider / Swiper Styling */
.stars-slider {
    padding: 20px 0 60px 0 !important;
    overflow: visible !important;
    cursor: grab;
    touch-action: pan-y;
}

.stars-slider .swiper-wrapper {
    transition-timing-function: linear !important;
}

.stars-slider:active {
    cursor: grabbing;
}

.star-card {
    background: var(--card-gradient);
    border-radius: 18px;
    display: flex;
    overflow: hidden;
    height: 190px;
    border: 2px solid #1B8A5A;
    box-shadow: var(--shadow-soft);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        border-color 0.35s ease;
    position: relative;
    cursor: pointer;
}

.star-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.06);
}

.image-box {
    position: relative;
    width: 150px;
    height: 100%;
    flex-shrink: 0;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #eef6ff;
}


.content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
    word-break: break-word;
}

.course {
    font-size: 12px;
    line-height: 1.4;
    color: #e2e8f0;
}

.result {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-box {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.label {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

.value {
    font-size: 28px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.star-card:hover .arrow {
    background: var(--primary-blue);
    color: #fff;
    transform: translateX(5px);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 800px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e9ecef;
    color: #000;
    transform: rotate(90deg);
}

.modal-content {
    display: flex;
    flex-direction: row;
}

.modal-image {
    width: 40%;
    background: #f0f7ff;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.modal-details {
    flex: 1;
    padding: 40px;
    min-width: 0;
}

.modal-header2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    padding-right: 40px;
}

.modal-header2 h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    word-break: break-word;
    margin: 0;
}

.modal-rank-badge,
.m-rank-badge {
    background: var(--light-blue);
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.modal-course-text {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 30px;
    font-weight: 500;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.info-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    color: #adb5bd;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.info-item p {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-about p {
    font-size: 15px;
    line-height: 1.6;
    color: #495057;
}

/* Swiper Pagination Styling */
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d1d1d1;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--primary-blue);
    width: 20px;
    border-radius: 10px;
}

/* ======================= */
/* Responsive Design       */
/* ======================= */

/* Tablet */
@media (max-width: 768px) {
    .stars-section {
        padding: 50px 0;
    }

    .header2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 28px;
    }

    .title {
        font-size: 30px;
    }

    .filter-group {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
        padding: 5px;
        gap: 6px;
    }

    .filter-group::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .star-card {
        height: 170px;
        border-radius: 14px;
    }

    .image-box {
        width: 120px;
    }

    .content {
        padding: 16px;
    }

    .name {
        font-size: 16px;
    }

    .course {
        font-size: 11px;
    }

    .value {
        font-size: 24px;
    }

    .arrow {
        width: 28px;
        height: 28px;
    }

    /* Modal responsive */
    .modal-container {
        width: 95%;
        border-radius: 18px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-content {
        flex-direction: column;
    }

    .modal-image {
        width: 100%;
        height: 280px;
        flex-shrink: 0;
        background: #f0f7ff;
    }

    .modal-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        background: #f0f7ff;
    }

    .modal-details {
        padding: 24px;
    }

    .modal-header2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .modal-header2 h2 {
        font-size: 22px;
    }

    .modal-info-grid {
        gap: 16px;
    }

    .modal-close {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .stars-section {
        padding: 36px 0;
    }

    .container {
        padding: 0 14px;
    }

    .title {
        font-size: 26px;
    }

    .star-card {
        height: 155px;
        border-radius: 12px;
    }

    .image-box {
        width: 105px;
    }



    .content {
        padding: 12px;
    }

    .name {
        font-size: 15px;
    }

    .course {
        font-size: 10px;
    }

    .value {
        font-size: 22px;
    }

    .label {
        font-size: 11px;
    }

    .arrow {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    /* Modal small phone */
    .modal-image {
        height: 240px;
    }

    .modal-details {
        padding: 18px;
    }

    .modal-header2 h2 {
        font-size: 20px;
    }

    .modal-rank-badge {
        font-size: 12px;
        padding: 5px 12px;
    }

    .modal-course-text {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 20px;
    }

    .info-item p {
        font-size: 14px;
    }

    .modal-about p {
        font-size: 13px;
    }

    .info-label {
        font-size: 11px;
    }

    .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
    }

    .swiper-pagination-bullet-active {
        width: 16px;
    }
}

/* Extra-small phone (e.g. 320px-360px) */
@media (max-width: 360px) {
    .title {
        font-size: 22px;
    }

    .filter-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    .star-card {
        height: 140px;
    }

    .image-box {
        width: 90px;
    }

    .content {
        padding: 10px;
    }

    .name {
        font-size: 14px;
    }

    .value {
        font-size: 20px;
    }

    .modal-image {
        height: 150px;
    }

    .modal-details {
        padding: 14px;
    }

    .modal-header2 h2 {
        font-size: 18px;
    }
}