
:root {
    --bg-body: #030712;
    --card-bg: rgba(15, 23, 42, 0.6);
    --card-bg-hover: rgba(30, 41, 59, 0.75);
    --card-border: rgba(255, 255, 255, 0.05);
    --card-border-hover: rgba(56, 189, 248, 0.4);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    
    --absensi-color: #f43f5e;
    --absensi-glow: rgba(244, 63, 94, 0.5);
    
    --inventory-color: #3b82f6;
    --inventory-glow: rgba(59, 130, 246, 0.5);
}

* {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* === BACKGROUND EFFECTS === */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    background: radial-gradient(circle at center, #0B1120 0%, #030712 100%);
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
    z-index: 1;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.15;
    animation: float-glow 20s infinite alternate ease-in-out;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--absensi-color);
    top: -100px;
    left: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: var(--inventory-color);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float-glow {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, 30px) scale(1.1); }
    66% { transform: translate(-30px, 80px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Pulsing Core */
.pulsing-core-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.1;
}

.core-layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.core-outer {
    width: 100%;
    height: 100%;
    animation: core-pulse 8s infinite cubic-bezier(0.1, 0, 0.9, 1);
    box-shadow: inset 0 0 50px rgba(56,189,248,0.2), 0 0 50px rgba(56,189,248,0.2);
}

.core-middle {
    width: 70%;
    height: 70%;
    animation: core-pulse 5s infinite cubic-bezier(0.1, 0, 0.9, 1) reverse;
    box-shadow: inset 0 0 30px rgba(56,189,248,0.4), 0 0 30px rgba(56,189,248,0.4);
}

.core-inner {
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(56,189,248,0.4) 0%, transparent 70%);
    animation: core-pulse 3s infinite alternate;
}

@keyframes core-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8) rotate(0deg); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.1) rotate(180deg); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(0.8) rotate(360deg); opacity: 0.3; }
}

/* === MAIN PORTAL UI === */
.portal-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1000px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
}

.portal-header {
    text-align: center;
    animation: fade-in-down 1s ease-out;
}

.logo-title-container h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.subtitle {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* CARDS */
.apps-grid {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
}

.app-card {
    flex: 1;
    min-width: 320px;
    max-width: 450px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 40px 30px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fade-in-up 1s ease-out backwards;
}

.absensi-card {
    animation-delay: 0.2s;
}

.inventory-card {
    animation-delay: 0.4s;
}

.app-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    transition: all 0.4s ease;
}

.absensi-card::before { background: var(--absensi-color); }
.inventory-card::before { background: var(--inventory-color); }

.app-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: var(--card-bg-hover);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.absensi-card:hover {
    border-color: var(--absensi-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 30px var(--absensi-glow);
}

.inventory-card:hover {
    border-color: var(--inventory-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 30px var(--inventory-glow);
}

.card-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s ease;
}

.absensi-card .card-icon-wrapper { color: var(--absensi-color); }
.inventory-card .card-icon-wrapper { color: var(--inventory-color); }

.app-card:hover .card-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255,255,255,0.1);
}

.absensi-card:hover .card-icon-wrapper { box-shadow: 0 0 20px var(--absensi-glow); }
.inventory-card:hover .card-icon-wrapper { box-shadow: 0 0 20px var(--inventory-glow); }

.card-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.card-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.card-action {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.absensi-card .card-action { color: var(--absensi-color); }
.inventory-card .card-action { color: var(--inventory-color); }

.app-card:hover .card-action {
    gap: 15px;
}

.card-action i {
    transition: transform 0.3s ease;
}

.app-card:hover .card-action i {
    transform: translateX(5px);
}

/* Footer */
.portal-footer {
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.4);
    animation: fade-in-up 1s ease-out 0.6s backwards;
}

/* Animations */
@keyframes fade-in-down {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .apps-grid {
        flex-direction: column;
    }
    .app-card {
        min-width: 100%;
    }
    .logo-title-container h1 {
        font-size: 1.8rem;
    }
}


