@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&family=Tajawal:wght@400;700&display=swap');

/* ng-cloak support */
[ng-cloak],
.ng-cloak {
    display: none !important;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, #ffffff 0%, #f0f9ff 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Subtle background accent to match theme */
.splash-screen::before,
.splash-screen::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: -1;
    animation: splashAuraFloat 15s infinite alternate ease-in-out;
}

.splash-screen::before {
    width: 60vw;
    height: 60vw;
    background: var(--primary);
    top: -20%;
    left: -10%;
}

.splash-screen::after {
    width: 50vw;
    height: 50vw;
    background: #2CD4A2;
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes splashAuraFloat {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(5%, 5%) scale(1.1);
    }
}

.splash-logo {
    height: 200px;
    /* Slightly larger */
    filter: drop-shadow(0 15px 40px rgba(36, 194, 214, 0.4));
    filter: drop-shadow(0 15px 40px var(--primary-glow));
    animation: commonPulse 3s infinite ease-in-out;
    position: relative;
    z-index: 10;
}

@keyframes commonPulse {

    0%,
    100% {
        transform: scale(0.95);
        filter: drop-shadow(0 10px 20px rgba(36, 194, 214, 0.4));
        filter: drop-shadow(0 10px 20px var(--primary-glow));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 30px 60px rgba(36, 194, 214, 0.4));
        filter: drop-shadow(0 30px 60px var(--primary-glow));
    }
}

:root {
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);

    --primary: #24C2D6;
    --primary-glow: rgba(36, 194, 214, 0.4);
    --secondary: #1B1642;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-pill: rgba(255, 255, 255, 0.9);
    --text-main: #1B1642;
    --text-muted: #575A7B;
    /* CallTech Gray */
    /* Slate 500 */

    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --card-radius: 16px;
    --transition-speed: 0.3s;

    --font-primary: 'Outfit', sans-serif;
    --font-secondary: 'Tajawal', sans-serif;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base styling */
body {
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
    background-color: #f8fafc;
    color: #1B1642;
    color: var(--text-main);
    overflow: hidden !important;
    /* Force no scroll */
    height: 100vh !important;
    width: 100vw !important;
    position: relative;
}

/* Breathing Aura Background Elements */
.aura {
    position: fixed;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    -webkit-filter: blur(100px);
    filter: blur(100px);
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    -webkit-animation: auraFloat 20s infinite alternate ease-in-out;
    animation: auraFloat 20s infinite alternate ease-in-out;
}

.aura-1 {
    background: radial-gradient(circle, #24C2D6, transparent);
    background: radial-gradient(circle, var(--primary), transparent);
    top: -15vw;
    left: -15vw;
}

.aura-2 {
    background: radial-gradient(circle, #2CD4A2, transparent);
    bottom: -15vw;
    right: -15vw;
    -webkit-animation-delay: -10s;
    animation-delay: -10s;
}

@keyframes auraFloat {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.2;
    }

    50% {
        transform: translate(5%, 5%) scale(1.1) rotate(10deg);
        opacity: 0.3;
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.2;
    }
}

/* Breathing Idle for Cards */
@keyframes cardFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0);
    }
}

#sampleVideo {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: 100;
    opacity: 1 !important;
    background: #000;

    /* HD Optimizations */
    -webkit-filter: contrast(1.1) saturate(1.1) brightness(1.05) sharpen(0.5);
    filter: contrast(1.1) saturate(1.1) brightness(1.05);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    /* Hardware acceleration */
}

.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 101;
    overflow: hidden;
    display: none;
}

.video-active .video-container {
    display: block !important;
}

/* Hero Text Enhancement */
.video-active .hero-name {
    filter: drop-shadow(0 0 15px rgba(36, 194, 214, 0.9));
    animation: heroGlow 1.5s infinite alternate ease-in-out, shimmer 12s infinite linear;
}

@keyframes heroGlow {
    from {
        filter: drop-shadow(0 0 8px rgba(36, 194, 214, 0.6));
    }

    to {
        filter: drop-shadow(0 0 25px rgba(36, 194, 214, 1));
    }
}



.modern-container {
    height: 100vh !important;
    max-height: 100vh !important;
    background: rgba(248, 250, 252, 0.95);
    background: rgba(248, 250, 252, 0.85);
    -webkit-backdrop-filter: blur(40px);
    backdrop-filter: blur(40px);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1rem;
    padding: clamp(1rem, 2vh, 2.5rem) 1.5rem 1rem;
    position: relative;
    z-index: 10;
    overflow: hidden !important;
    /* Prevent any container scroll */
}

.video-active .modern-container {
    display: none !important;
}

.video-active .aura {
    display: none !important;
}

/* HERO CALL SECTION */
.hero-call-wrapper {
    background: rgba(255, 255, 255, 0.9);
    background: var(--glass-pill);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border-radius: 2.5rem;
    padding: 1rem 2rem !important;
    /* Slimmer vertical padding to prevent ballooning */
    margin-top: 0.5rem;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    width: 95%;
    /* Fill more horizontal space */
    max-width: 1300px;
    /* Increased for better spread on wide screens */
    border-bottom: 5px solid #24C2D6;
    border-bottom: 5px solid var(--primary);
    position: relative;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    overflow: visible;
    z-index: 10;
}

.hero-call-wrapper>* {
    margin-bottom: 0.4rem;
}

.hero-call-wrapper>*:last-child {
    margin-bottom: 0;
}

.list-meta .badge-text {
    font-size: 0.8rem;
    color: #24C2D6;
    color: var(--primary);
    background: rgba(36, 194, 214, 0.12);
    padding: 0.15rem 0.6rem;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(36, 194, 214, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.hero-banner {
    background: transparent;
    height: 180px;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 0 4rem;
    /* Enforced horizontal gap for all resolutions */
    position: relative;
    z-index: 20;
}

.hero-banner>* {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
}

.hero-banner>*:first-child {
    margin-left: 0;
}

.hero-banner>*:last-child {
    margin-right: 0;
}


.hero-call-wrapper.has-hero-pic {
    -webkit-flex-direction: row;
    flex-direction: row;
    padding: 1rem 2rem;
    padding: 1rem clamp(1.5rem, 3vw, 3rem);
    width: 75%;
    width: clamp(500px, 75%, 1400px);
    -webkit-align-items: center;
    align-items: center;
    border-bottom: 8px solid #24C2D6;
    border-bottom: 8px solid var(--primary);
}

.hero-call-wrapper.has-hero-pic>* {
    margin-right: 2rem;
    margin-right: clamp(1rem, 3vw, 3rem);
}

.hero-call-wrapper.has-hero-pic>*:last-child {
    margin-right: 0;
}

.student-avatar-hero {
    width: 130px;
    width: clamp(100px, 15vh, 160px);
    height: 130px;
    height: clamp(100px, 15vh, 160px);
    border-radius: 50%;
    border: 8px solid #fff;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 30px rgba(36, 194, 214, 0.4);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 30px var(--primary-glow);
    background: #fff;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    overflow: hidden;
    -webkit-animation: cardFloat 6s infinite alternate ease-in-out;
    animation: cardFloat 6s infinite alternate ease-in-out;
}

.student-avatar-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-call-wrapper.has-hero-pic .hero-content {
    -webkit-align-items: flex-start;
    align-items: flex-start;
    text-align: left;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
}

.hero-call-wrapper.has-hero-pic .hero-name {
    font-size: 2.2rem;
    font-size: clamp(1.4rem, 4vw, 3rem);
    text-align: left;
}

.hero-content {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding-top: 0;
    overflow: hidden;
}

.hero-name-row {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0.2rem;
}

.has-hero-pic .hero-name-row {
    justify-content: flex-start;
}

.hero-call-wrapper::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    background: radial-gradient(circle, rgba(36, 194, 214, 0.4), transparent 70%);
    background: radial-gradient(circle, var(--primary-glow), transparent 70%);
    z-index: -1;
    opacity: 0.4;
    -webkit-animation: auraPulse 4s infinite ease-in-out;
    animation: auraPulse 4s infinite ease-in-out;
}

/* Impact Burst on Entrance */
.hero-call-wrapper.ng-enter::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 2.5rem;
    box-shadow: 0 0 100px 30px rgba(36, 194, 214, 0.4);
    box-shadow: 0 0 100px 30px var(--primary-glow);
    -webkit-animation: impactBurst 0.8s ease-out forwards;
    animation: impactBurst 0.8s ease-out forwards;
    z-index: -2;
}

@keyframes impactBurst {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes auraPulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.banner-left,
.banner-right {
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    /* Don't grow, don't shrink */
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    position: relative;
    z-index: 10;
    min-width: 180px;
}

.banner-left>*,
.banner-right>* {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.banner-left>*:first-child,
.banner-right>*:first-child {
    margin-left: 0;
}

.banner-left>*:last-child,
.banner-right>*:last-child {
    margin-right: 0;
}

.banner-right {
    justify-content: flex-end;
}

.banner-left img,
.banner-right img {
    height: 45px;
    height: clamp(30px, 4vh, 60px);
    width: auto;
    transition: all 0.3s ease;
}

.banner-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 0;
}

/* Images */
.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.top-logo {
    height: 80px !important;
    width: auto !important;
    max-width: 250px !important;
    object-fit: contain !important;
}

.clock-text {
    /* Layout Container */
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    position: relative;
    padding-left: 2rem;
    margin-left: 4rem;
    /* Mandatory safety gap to prevent overlap */
    border-left: 4px solid #24C2D6;
    border-left: 4px solid var(--primary);
}

#clock {
    font-size: 3.5rem;
    font-weight: 900;
    color: #1B1642;
    color: var(--secondary);
    letter-spacing: -3px;
    line-height: 0.9;
}

#date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1B1642;
    color: var(--secondary);
    margin-top: 4px;
    opacity: 0.9;
    letter-spacing: 0;
}

/* LTR Fix: Move divider to right side for English */
[dir="ltr"] .clock-text {
    border-left: none;
    padding-left: 0;
    margin-left: 2rem;
    border-right: 4px solid #24C2D6;
    border-right: 4px solid var(--primary);
    padding-right: 2rem;
    margin-right: 4rem;
}

.banner-right div,
.banner-left div {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    /* Removed max-width to prevent clock cropping */
}

/* Hero Master Motion: Cinematic Slide & Zoom */
.hero-name {
    font-size: 2rem !important;
    font-size: clamp(1rem, 3vw, 2.2rem) !important;
    /* More aggressive scaling for smaller screens */
    font-weight: 950;
    letter-spacing: 0;
    line-height: 1.2;
    color: #24C2D6;
    color: var(--primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin: 0;
    /* Limit to 2 lines max to prevent card height growth */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    max-width: 95%;
    background: linear-gradient(135deg,
            #1B1642 10%,
            #24C2D6 40%,
            #ffffff 50%,
            #24C2D6 60%,
            #1B1642 90%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-animation: shimmer 12s infinite linear;
    animation: shimmer 12s infinite linear;
    -webkit-transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

@media screen and (max-width: 1400px) {

    .banner-left,
    .banner-right {
        flex: 0 0 auto !important;
        min-width: 180px !important;
        z-index: 100;
    }

    /* Fixed clock cropping (exempt from ellipsis) */
    .banner-left div.clock-text,
    .banner-right div.clock-text {
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        display: block !important;
        min-width: 150px !important;
    }

    .megaphone-icon {
        max-width: 80px !important;
        height: auto !important;
    }

    #clock {
        font-size: 2.5rem !important;
    }

    .hero-name {
        font-size: clamp(1.4rem, 4vw, 2.5rem) !important;
        padding: 0.1rem 0 !important;
        line-height: 1.1 !important;
        max-height: none !important;
    }

    .modern-footer {
        padding: 0 4rem !important;
        height: 75px !important;
    }

    .stats-container {
        gap: 2.2rem !important;
    }
}

@media screen and (max-width: 1024px) {

    .banner-left,
    .banner-right {
        flex: 0 0 240px !important;
        min-width: 240px !important;
    }

    #clock {
        font-size: 2.2rem !important;
    }

    .hero-name {
        font-size: 1.4rem !important;
        /* Smaller for shorter screens */
        padding: 0.2rem 0 !important;
        line-height: 1.2 !important;
        margin-top: 0.8rem !important;
        /* Increased for top clearance on short screens */
    }

    .hero-call-wrapper {
        padding: 1.5rem 1rem !important;
        min-height: 140px !important;
    }
}

/* Specific scaling for "short" screens (low height) */
@media screen and (max-height: 850px) {
    .hero-call-wrapper {
        padding-top: 1.8rem !important;
        padding-bottom: 1.2rem !important;
        min-height: 150px !important;
    }

    .hero-name {
        font-size: clamp(1.2rem, 3vw, 2.1rem) !important;
        margin-top: 1.2rem !important;
        /* Better top clearance */
    }

    .hero-banner {
        margin-bottom: 1rem !important;
    }
}

@media screen and (max-height: 720px) {
    .hero-call-wrapper {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem !important;
        min-height: 130px !important;
    }

    .hero-name {
        font-size: 1.3rem !important;
        margin-top: 1rem !important;
    }

    .modern-container {
        padding: 0.2rem 0.5rem !important;
    }
}


/* Entrance: Zoom & Slide up from bottom */
@media screen and (max-width: 1400px) {
    #audioUnlockOverlay>div {
        right: 15vw !important;
        /* Shift left to avoid clock overlap */
    }
}

.hero-name.ng-enter {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
}

.hero-name.ng-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Exit: Slide up and out to top */
.hero-name.ng-leave {
    opacity: 1;
    transform: translateY(0) scale(1);
    position: absolute;
    width: 100%;
    left: 0;
    text-align: center;
}

.hero-name.ng-leave-active {
    opacity: 0;
    transform: translateY(-50px) scale(1.1);
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    background: rgba(27, 22, 66, 0.03) !important;
    padding: 0.4rem 1.2rem !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    border-radius: 2rem;
    margin-top: 0.5rem;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.15s;
    width: auto;
    max-width: 100%;
    overflow: visible;
}

.hero-meta>* {
    flex-shrink: 0 !important;
}

.has-hero-pic .hero-meta {
    justify-content: flex-start;
    padding-left: 3rem !important;
}

/* Staggered Metadata Effect */
.hero-name.ng-enter+.hero-meta {
    opacity: 0;
    transform: translateY(20px);
}

.hero-name.ng-enter-active+.hero-meta {
    opacity: 1;
    transform: translateY(0);
}

.hero-meta .meta-badge {
    font-size: 1rem;
    opacity: 0.85;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Announce time should be 2X larger */
.hero-meta .announce-time {
    font-size: 1.5rem;
}

.hero-meta .meta-divider {
    width: 6px;
    height: 6px;
}

.meta-badge {
    font-size: 0.8rem;
    font-size: clamp(0.5rem, 1.1vw, 0.95rem);
    /* Adaptive scaling - vw-based like old UI */
    color: #575A7B;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.meta-divider {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #24C2D6;
    background: var(--primary);
    border-radius: 50%;
    opacity: 1;
    margin: 0 0.4rem;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    vertical-align: middle;
}

/* === CONTENT GRID === */
.content-area {
    -webkit-flex: 1;
    flex: 1;
    padding: 1rem 3rem;
    overflow: hidden !important;
    /* NO SCROLL */
}

.content-area::-webkit-scrollbar {
    display: none;
}

.student-grid {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Text-only: rows auto-size to content */
    height: 100%;
    /* Fill available content area */
    -ms-grid-row-align: start;
    align-content: start;
}

.student-grid>* {
    margin-bottom: 1.2rem;
}

/* Responsive Grid columns */
@media screen and (max-width: 1200px) {
    .student-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 800px) {
    .student-grid {
        grid-template-columns: 1fr;
    }
}

/* More breathing room for TextPic mode */
.text-pic-mode .content-area {
    padding-top: 5rem;
    padding-bottom: 120px;
}

.text-pic-mode .student-grid {
    gap: 2rem;
}

/* Student Cards (Sleek 2.0 with Idle) */
.student-item {
    background: rgba(255, 255, 255, 0.7);
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 1.2rem;
    padding: 1.2rem 2rem;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    -webkit-transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    -webkit-animation: cardFloat 6s infinite ease-in-out;
    animation: cardFloat 6s infinite ease-in-out;
}

.student-item.has-pic {
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-align-items: center;
    align-items: center;
    padding: 1.2rem 2rem;
    padding: clamp(1rem, 2vh, 1.5rem) clamp(1.5rem, 3vw, 2.5rem);
    min-height: 140px;
    min-height: clamp(120px, 15vh, 160px);
}

.student-item.has-pic>* {
    margin-right: 1.8rem;
}

.student-item.has-pic>*:last-child {
    margin-right: 0;
}

.student-avatar {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    width: 80px;
    width: clamp(55px, 8vw, 100px);
    height: 80px;
    height: clamp(55px, 8vw, 100px);
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.student-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-item.has-pic .list-info {
    -webkit-flex: 1;
    flex: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-justify-content: center;
    justify-content: center;
    /* Ensure vertical centering */
    min-width: 0;
    /* Critical for flex-shrink text truncation */
}

.student-item.has-pic .list-name {
    font-size: 1.2rem;
    font-size: clamp(0.85rem, 1.4vw, 1.6rem);
    margin-bottom: 0.2rem;
    /* 2-line limit instead of ellipsis - text adjusts, not crops */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2;
}



.student-item:nth-child(even) {
    animation-delay: -3s;
}

/* Smart Accent Bar */
.student-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 6px;
    background: #24C2D6;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    opacity: 0.8;
}

[dir="rtl"] .student-item::after {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

.list-meta {
    display: -webkit-inline-flex !important;
    display: inline-flex !important;
    -webkit-align-items: center !important;
    align-items: center !important;
    -webkit-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    background: rgba(27, 22, 66, 0.03) !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 2rem !important;
    max-width: 100%;
    margin-top: 0.1rem !important;
    overflow: visible;
}

.list-meta>* {
    margin-right: 0.2rem;
}

.list-meta>*:last-child {
    margin-right: 0;
}

.list-meta>* {
    -webkit-flex-shrink: 0 !important;
    flex-shrink: 0 !important;
}

.list-meta .meta-badge {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Announce time reduced to fit on one line */
.list-meta .announce-time {
    font-size: 1.125rem;
}

.list-meta .meta-divider {
    width: 5px;
    height: 5px;
}

/* ngAnimate Transitions */
.student-item.ng-enter {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.student-item.ng-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.student-item.ng-leave {
    opacity: 1;
    transform: scale(1);
}

.student-item.ng-leave-active {
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
}

.student-item.ng-move {
    transition: all 0.5s ease;
}

/* Staggered entry for grid items */
.student-item.ng-enter-stagger {
    animation-delay: 50ms;
    transition-delay: 50ms;
}

/* Removed Hover Effects for TV/Large Screens */

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Staggered animation for grid items */
.student-item:nth-child(1) {
    animation-delay: 0.1s;
}

.student-item:nth-child(2) {
    animation-delay: 0.15s;
}

.student-item:nth-child(3) {
    animation-delay: 0.2s;
}

.student-item:nth-child(4) {
    animation-delay: 0.25s;
}

.student-item:nth-child(5) {
    animation-delay: 0.3s;
}

.student-item:nth-child(6) {
    animation-delay: 0.35s;
}

.student-item:nth-child(7) {
    animation-delay: 0.4s;
}

.student-item:nth-child(8) {
    animation-delay: 0.45s;
}

.student-item:nth-child(9) {
    animation-delay: 0.5s;
}

.student-item:nth-child(10) {
    animation-delay: 0.55s;
}

/* Removed student-item hover */

/* Status Colors */
.student-item.urgent {
    border-left: 6px solid #ef4444;
    border-left: 6px solid var(--danger);
    background: #fef2f2;
}

.student-item.subscribed {
    border-left: 6px solid #1B1642;
    border-left: 6px solid var(--secondary);
    background: #eef2ff;
}

.student-item.new-entry {
    border-left: 6px solid #10b981;
    border-left: 6px solid var(--success);
}

.student-item.exit-no-announce {
    border-left: 6px solid #f59e0b;
    border-left: 6px solid var(--warning);
    background: #fffbeb;
}

.list-name {
    font-size: 1.2rem;
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);
    font-weight: 700;
    color: #1B1642;
    color: var(--text-main);
    /* 2-line limit with responsive font scaling */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
    width: 100%;
}



/* === FOOTER === */
.modern-footer {
    height: 60px;
    /* Slimmer footer */
    background: #fff;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    border-top: 1px solid var(--card-border);
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    padding: 0 2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.stats-container {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex: 1;
    flex: 1;
    overflow: hidden;
    -webkit-flex-wrap: nowrap !important;
    flex-wrap: nowrap !important;
    /* Single line stats as well */
}

.stats-container>* {
    margin-left: 0.75rem;
    margin-right: 0.75rem;
}

.stats-container>*:first-child {
    margin-left: 0;
}

.stats-container>*:last-child {
    margin-right: 0;
}

.stat-item {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    white-space: nowrap;
    font-weight: 600;
    font-size: 1rem;
    color: #575A7B;
    color: var(--text-muted);
}

.stat-item>* {
    margin-right: 0.5rem;
}

.stat-item>*:last-child {
    margin-right: 0;
}

.footer-screen-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
    line-height: 1.2;
    opacity: 0.6;
    text-align: inherit;
}

.screen-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1B1642;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen-custom {
    font-size: 0.75rem;
    font-weight: 500;
    color: #24C2D6;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-item b {
    color: #24C2D6;
    color: var(--primary);
    font-size: 1.2rem;
}

.nav-logout-btn {
    height: 55px !important;
    width: 55px !important;
    cursor: pointer !important;
    opacity: 1 !important;
    padding: 12px !important;
    background: #e2e8f0 !important;
    /* Clearly visible light blue-grey */
    border: 2px solid #cbd5e1 !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

/* Removed logout-btn hover */

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
/* Already handled in consolidated section above */

/* === Large Screen / TV / Whiteboard Responsiveness === */

@media screen and (max-width: 1600px) {
    .clock-text {
        font-size: 3rem;
        margin-left: 2rem;
    }

    .hero-name {
        font-size: clamp(1.2rem, 3vw, 2.2rem) !important;
    }
}

@media screen and (max-width: 1366px) {
    .modern-container {
        padding: 0.8rem 1rem;
    }

    .hero-banner {
        padding: 0 1.5rem;
        gap: 1rem;
        height: 150px;
        min-height: auto;
    }

    .banner-left,
    .banner-right {
        min-width: 140px;
        gap: 0.8rem;
    }

    .clock-text {
        font-size: 2.2rem;
        margin-left: 1rem;
        padding-left: 0.8rem;
    }

    .hero-call-wrapper {
        padding: 0.8rem 1.5rem !important;
        gap: 0.3rem;
    }

    .hero-name {
        font-size: clamp(1.2rem, 2.5vw, 2rem) !important;
    }

    .hero-meta {
        margin-top: 0.3rem;
        padding: 0.3rem 0.8rem !important;
        gap: 0.2rem;
    }

    .hero-meta .meta-badge {
        font-size: 0.8rem;
    }

    .hero-meta .announce-time {
        font-size: 1.1rem;
    }

    .list-meta .meta-badge {
        font-size: 0.65rem;
    }

    .list-meta .announce-time {
        font-size: 0.95rem;
    }

    .meta-divider {
        width: 4px;
        height: 4px;
        margin: 0 0.2rem;
    }

    .modern-footer {
        height: 50px;
        padding: 0 1.5rem;
    }

    .stats-container {
        gap: 1.2rem;
    }

    .top-logo {
        height: 55px !important;
    }
}

@media screen and (max-width: 1024px) {

    /* Small PC / Whiteboard / Landscape Tablet */
    .modern-container {
        padding: 0.5rem 0.8rem;
    }

    .hero-banner {
        padding: 0 1rem;
        gap: 0.8rem;
        height: 130px;
    }

    .banner-left,
    .banner-right {
        min-width: 100px !important;
        gap: 0.5rem;
    }

    .hero-name {
        font-size: clamp(1rem, 2.2vw, 1.5rem) !important;
    }

    .top-logo {
        height: 35px !important;
    }

    .clock-text {
        font-size: 1.6rem;
        margin-left: 0.3rem;
        padding-left: 0.3rem;
    }

    .hero-call-wrapper {
        padding: 0.5rem 1rem !important;
        gap: 0.2rem;
    }

    .hero-meta {
        padding: 0.2rem 0.6rem !important;
        gap: 0.15rem !important;
        margin-top: 0.2rem;
    }

    .hero-meta .meta-badge {
        font-size: 0.65rem;
    }

    .hero-meta .announce-time {
        font-size: 0.9rem;
    }

    .meta-badge {
        font-size: 0.6rem;
    }

    .meta-divider {
        width: 3px;
        height: 3px;
        margin: 0 0.15rem;
    }

    .list-name {
        font-size: 0.85rem;
    }

    .list-meta .meta-badge {
        font-size: 0.55rem;
    }

    .list-meta .announce-time {
        font-size: 0.8rem;
    }

    .list-meta .meta-divider {
        width: 3px;
        height: 3px;
        margin: 0 0.1rem;
    }

    .content-area {
        padding: 0.5rem 1rem;
    }

    .student-item {
        padding: 0.8rem 1.2rem;
        border-radius: 0.8rem;
    }

    .stats-container {
        gap: 0.6rem;
    }

    .stat-item {
        font-size: 0.7rem;
    }

    .footer-screen-info {
        display: none;
        /* More space for stats */
    }

    .modern-footer {
        height: 45px;
        padding: 0 1rem;
    }
}

/* More aggressive scaling for very narrow desktop/laptop windows */
@media screen and (max-width: 900px) {
    .modern-container {
        padding: 0.3rem 0.5rem;
    }

    .hero-banner {
        padding: 0 0.5rem;
        height: 110px;
    }

    .hero-name {
        font-size: 1rem !important;
    }

    .hero-meta .meta-badge {
        font-size: 0.55rem;
    }

    .hero-meta .announce-time {
        font-size: 0.75rem;
    }

    .student-grid {
        gap: 0.6rem;
    }
}

/* RTL Support for Icons */
/* Only flip directional icons, not logos */
[dir="rtl"] .megaphone-icon,
[dir="rtl"] .nav-logout-btn {
    transform: scaleX(-1);
}

/* Ensure profile images and logos don't get flipped */
[dir="rtl"] .list-avatar {
    transform: none;
}