/* Cinematic Aura Hub (Model 14: Darker & Floating Symbols) */
:root {
    --primary: #60a5fa;
    --primary-glow: rgba(96, 165, 250, 0.4);
    --bg-dark: #020617;
    --bg-slate: #0f172a;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --glass-dark: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --elastic-hub: cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

body.portal-layout {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    min-height: 100vh;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Cinematic Background FX --- */
.cinematic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, var(--bg-slate), var(--bg-dark));
}

.aura-bloom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.08), transparent 70%);
    filter: blur(80px);
    animation: bloomPulse 10s infinite alternate ease-in-out;
}

@keyframes bloomPulse {
    from {
        opacity: 0.3;
        scale: 1;
    }

    to {
        opacity: 0.7;
        scale: 1.3;
    }
}

/* --- Floating Symbols (Buku, Toga, QR, Surat) --- */
.flying-symbols {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.symbol-item {
    position: absolute;
    color: var(--primary);
    opacity: 0.08;
    font-size: 5rem;
    filter: blur(3px);
    animation: symbolDrift 25s infinite linear;
}

.s1 {
    top: 10%;
    left: 10%;
    animation-duration: 30s;
}

.s2 {
    top: 60%;
    left: 80%;
    animation-duration: 35s;
    animation-delay: -5s;
    color: #10b981;
}

.s3 {
    top: 80%;
    left: 20%;
    animation-duration: 25s;
}

.s4 {
    top: 20%;
    left: 70%;
    animation-duration: 40s;
    animation-delay: -10s;
}

.s5 {
    top: 50%;
    left: 40%;
    animation-duration: 45s;
}

.s6 {
    top: 15%;
    left: 85%;
    animation-duration: 38s;
    animation-delay: -2s;
}

.s7 {
    top: 75%;
    left: 5%;
    animation-duration: 42s;
    animation-delay: -7s;
}

.s8 {
    top: 40%;
    left: 90%;
    animation-duration: 29s;
}

.s9 {
    top: 85%;
    left: 60%;
    animation-duration: 33s;
    animation-delay: -12s;
}

.s10 {
    top: 30%;
    left: 5%;
    animation-duration: 40s;
    animation-delay: -15s;
}

@keyframes symbolDrift {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(100px, 50px) rotate(15deg);
    }

    66% {
        transform: translate(-50px, 120px) rotate(-10deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* --- Main Container --- */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 100px;
    /* Pushed lower */
    z-index: 10;
}

.app-header {
    text-align: center;
    margin-top: 50px;
}

.app-header h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -4px;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.app-header p {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.app-header .portal-logo {
    max-height: 100px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 25px rgba(96, 165, 250, 0.4));
}

/* --- Moving Buttons (Role Grid) --- */
.role-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    /* Tighter gap */
    width: 100%;
}

.role-card {
    width: 150px;
    /* Shrunk */
    height: 150px;
    /* Shrunk */
    background: var(--glass-dark);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.5s var(--elastic-hub);

    /* Self-Moving Animation */
    animation: floatingCard 7s infinite ease-in-out;
    animation-delay: var(--float-delay);
}

@keyframes floatingCard {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    33% {
        transform: translateY(-20px) rotate(3deg);
    }

    66% {
        transform: translateY(10px) rotate(-2deg);
    }
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-30px) scale(1.1) !important;
    box-shadow: 0 40px 90px rgba(96, 165, 250, 0.3);
    border-color: var(--primary);
}

.role-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    transition: all 0.4s;
}

.role-card:hover .role-icon {
    background: var(--primary);
    color: #fff;
    transform: rotateY(180deg);
    box-shadow: 0 0 40px var(--primary-glow);
}

.role-card h3 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-white);
    margin: 0;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}


@media (max-width: 768px) {
    .role-card {
        width: 140px;
        height: 140px;
        border-radius: 35px;
    }

    .role-icon {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .app-header h1 {
        font-size: 2.8rem;
    }
}

/* --- Premium Animated Border (Pendaftar Only) --- */
.pendaftar-animated {
    position: relative;
    overflow: hidden;
    border: none !important;
    background: var(--glass-dark);
}

.pendaftar-animated::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(transparent 0deg,
            transparent 300deg,
            #2563eb 340deg,
            #60a5fa 360deg);
    animation: beamRotate 3s linear infinite;
    z-index: 0;
}

.pendaftar-animated::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #0f172a;
    /* Match --bg-slate */
    border-radius: 33px;
    z-index: 1;
    transition: background 0.4s;
}

.pendaftar-animated:hover::after {
    background: rgba(255, 255, 255, 0.08);
}

.pendaftar-animated .role-icon,
.pendaftar-animated h3 {
    position: relative !important;
    z-index: 10 !important;
}

@keyframes beamRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* --- Premium Animated Border (Lulus) --- */
.lulus-animated {
    position: relative;
    overflow: hidden;
    border: none !important;
    background: var(--glass-dark);
}

.lulus-animated::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(transparent 0deg,
            transparent 300deg,
            #10b981 340deg,
            #34d399 360deg);
    animation: beamRotate 3s linear infinite;
    z-index: 0;
}

.lulus-animated::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #0f172a;
    border-radius: 33px;
    z-index: 1;
    transition: background 0.4s;
}

.lulus-animated:hover::after {
    background: rgba(255, 255, 255, 0.08);
}

.lulus-animated .role-icon,
.lulus-animated h3 {
    position: relative !important;
    z-index: 10 !important;
}

.lulus-animated:hover .role-icon {
    background: #10b981 !important;
    color: #fff !important;
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.4) !important;
}

.pendaftar-animated:hover .role-icon {
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.4) !important;
}

/* --- Role Group Submenu Overlay --- */
.submenu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Added to clip floating symbols */
}

.submenu-overlay .cinematic-bg,
.submenu-overlay .flying-symbols {
    z-index: 1;
    /* Place above overlay BG */
}

.submenu-overlay .symbol-item {
    opacity: 0.15;
    /* Slightly more visible on dark overlay */
    filter: blur(2px);
    /* Sharper than main bg icons */
}

.submenu-overlay .submenu-header,
.submenu-overlay .submenu-grid {
    position: relative;
    z-index: 10;
    /* Place above symbols */
}

.submenu-overlay .btn-close-submenu {
    z-index: 100;
    /* Higher priority close button */
}

.submenu-overlay.active {
    display: flex;
    opacity: 1;
}

.submenu-header {
    text-align: center;
    margin-bottom: 50px;
}

.submenu-header h2 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.submenu-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 10px;
}

.submenu-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
}

.btn-close-submenu {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s;
}

.btn-close-submenu:hover {
    background: var(--primary);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

.role-card.group-card {
    border: 1px dashed var(--glass-border);
}

.role-card.group-card::after {
    content: "\f0fe";
    /* fas fa-plus-circle indicator */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.8rem;
    color: var(--primary);
    opacity: 0.6;
}