/* ============================================================
   RESET & GLOBAL
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    position: relative;
    overflow-x: hidden;
    background: #0a1628;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   ANIMASI BACKGROUND
   ============================================================ */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.gradient-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        #0a1628 0%, 
        #1a3a5c 25%, 
        #0d2847 50%, 
        #1a4a6e 75%, 
        #0a1628 100%);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.particle-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(100, 200, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.2);
    animation: particleFloat linear infinite;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-duration: 12s; animation-delay: 0s; width: 5px; height: 5px; }
.particle:nth-child(2) { left: 20%; top: 80%; animation-duration: 15s; animation-delay: 1s; width: 3px; height: 3px; }
.particle:nth-child(3) { left: 30%; top: 40%; animation-duration: 18s; animation-delay: 2s; width: 6px; height: 6px; }
.particle:nth-child(4) { left: 40%; top: 10%; animation-duration: 14s; animation-delay: 0.5s; width: 4px; height: 4px; }
.particle:nth-child(5) { left: 50%; top: 70%; animation-duration: 20s; animation-delay: 3s; width: 5px; height: 5px; }
.particle:nth-child(6) { left: 60%; top: 30%; animation-duration: 16s; animation-delay: 1.5s; width: 3px; height: 3px; }
.particle:nth-child(7) { left: 70%; top: 90%; animation-duration: 22s; animation-delay: 0.8s; width: 7px; height: 7px; }
.particle:nth-child(8) { left: 80%; top: 50%; animation-duration: 13s; animation-delay: 2.5s; width: 4px; height: 4px; }
.particle:nth-child(9) { left: 90%; top: 15%; animation-duration: 19s; animation-delay: 1.2s; width: 5px; height: 5px; }
.particle:nth-child(10) { left: 15%; top: 60%; animation-duration: 17s; animation-delay: 3.5s; width: 3px; height: 3px; }
.particle:nth-child(11) { left: 45%; top: 85%; animation-duration: 21s; animation-delay: 0.3s; width: 6px; height: 6px; }
.particle:nth-child(12) { left: 75%; top: 25%; animation-duration: 14s; animation-delay: 4s; width: 4px; height: 4px; }
.particle:nth-child(13) { left: 5%; top: 45%; animation-duration: 16s; animation-delay: 1.8s; width: 5px; height: 5px; }
.particle:nth-child(14) { left: 55%; top: 5%; animation-duration: 23s; animation-delay: 2.2s; width: 3px; height: 3px; }
.particle:nth-child(15) { left: 35%; top: 95%; animation-duration: 18s; animation-delay: 0.7s; width: 6px; height: 6px; }

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0.2; }
    25% { transform: translateY(-60px) translateX(20px) scale(1.3); opacity: 0.7; }
    50% { transform: translateY(-120px) translateX(-15px) scale(0.7); opacity: 0.4; }
    75% { transform: translateY(-180px) translateX(25px) scale(1.4); opacity: 0.8; }
    100% { transform: translateY(-240px) translateX(0) scale(1); opacity: 0.2; }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    animation: orbFloat 20s ease-in-out infinite alternate;
    pointer-events: none;
}

.glow-orb-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
    background: radial-gradient(circle, rgba(0, 150, 255, 0.35), transparent 70%);
    animation-duration: 22s;
}

.glow-orb-2 {
    width: 350px;
    height: 350px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(100, 0, 255, 0.25), transparent 70%);
    animation-duration: 25s;
    animation-delay: 3s;
}

.glow-orb-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(0, 200, 200, 0.15), transparent 70%);
    animation-duration: 18s;
    animation-delay: 5s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    33% { transform: translate(30px, -20px) scale(1.15); opacity: 0.35; }
    66% { transform: translate(-20px, 25px) scale(0.85); opacity: 0.25; }
    100% { transform: translate(15px, -35px) scale(1.05); opacity: 0.3; }
}

.floating-elements {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.015);
    animation: floatAnim 22s infinite alternate ease-in-out;
}
.floating-element:nth-child(1) {
    width: 200px;
    height: 200px;
    top: 5%;
    left: -6%;
    animation-duration: 26s;
}
.floating-element:nth-child(2) {
    width: 300px;
    height: 300px;
    bottom: -10%;
    right: -8%;
    animation-duration: 32s;
    background: rgba(255, 255, 255, 0.01);
}
.floating-element:nth-child(3) {
    display: none;
}

@keyframes floatAnim {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(25px, -30px) scale(1.08) rotate(8deg); }
}

.bubble {
    position: fixed;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 0;
    animation: bubbleFloat 16s infinite alternate;
}
.bubble:nth-of-type(1) {
    width: 100px;
    height: 100px;
    bottom: 8%;
    left: 8%;
    animation-duration: 20s;
}
.bubble:nth-of-type(2) {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 5%;
    animation-duration: 13s;
    animation-delay: 2s;
}
.bubble:nth-of-type(3) {
    display: none;
}

@keyframes bubbleFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0.2; }
    100% { transform: translate(-20px, -30px) scale(1.15); opacity: 0.4; }
}

.wave {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.01) 0px,
            rgba(255, 255, 255, 0.01) 15px,
            transparent 15px,
            transparent 30px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    animation: waveMove 8s ease-in-out infinite alternate;
}

@keyframes waveMove {
    0% { transform: translateX(0) scaleX(1); }
    100% { transform: translateX(20px) scaleX(1.03); }
}

/* ============================================================
   KARTU UTAMA
   ============================================================ */
.container {
    position: relative;
    z-index: 10;
    max-width: 1300px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 20px 16px 28px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: containerIn 0.6s ease-out;
}

@keyframes containerIn {
    0% { opacity: 0; transform: scale(0.97) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   HEADER - FOKUS UTAMA PADA "APLIKASI SIMRS"
   ============================================================ */
.header {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.logo-header {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 6px;
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
    border-radius: 14px;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* ============================================================
   JUDUL UTAMA - BESAR, CENTER, FOKUS
   ============================================================ */
.main-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.1;
    margin-bottom: 2px;
    text-align: center;
    width: 100%;
}

.text-gradient {
    background: linear-gradient(135deg, #f0f9ff 0%, #7ec8e8 40%, #aad8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 50px rgba(80, 200, 255, 0.15);
    display: inline-block;
}

/* ============================================================
   SUB JUDUL - TULISAN BERGERAK
   ============================================================ */
.sub-title {
    margin-bottom: 4px;
    text-align: center;
    width: 100%;
}

.moving-text {
    display: inline-block;
    font-size: 1.2rem;
    font-weight: 500;
    background: linear-gradient(135deg, #4cd9b2, #00b4d8, #4cd9b2);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 4s ease-in-out infinite, textFloat 3s ease-in-out infinite;
    letter-spacing: 3px;
}

@keyframes textShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes textFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.02); }
}

.header p {
    color: rgba(210, 235, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.3s both;
    text-align: center;
    width: 100%;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   MENU GRID
   ============================================================ */
.menu-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0 12px;
}

.menu-box {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 20px;
    padding: 18px 12px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: cardIn 0.5s ease-out both;
    -webkit-touch-callout: none;
    user-select: none;
}

.menu-box:nth-child(1) { animation-delay: 0.05s; }
.menu-box:nth-child(2) { animation-delay: 0.1s; }
.menu-box:nth-child(3) { animation-delay: 0.15s; }
.menu-box:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.menu-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.04), transparent 50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-box:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.08);
}

@media (hover: hover) {
    .menu-box:hover {
        transform: translateY(-6px) scale(1.02);
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(100, 210, 255, 0.3);
        box-shadow: 0 12px 32px rgba(0, 30, 50, 0.4);
    }
    .menu-box:hover::before {
        opacity: 1;
    }
    .menu-box:hover .menu-arrow {
        opacity: 1;
        transform: translateX(4px);
    }
}

.pulse-dot {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #4cd9b2;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(76, 217, 178, 0.4);
    animation: pulseDot 2.2s infinite;
}
@keyframes pulseDot {
    0% { box-shadow: 0 0 0 0 rgba(76, 217, 178, 0.3); }
    70% { box-shadow: 0 0 0 10px rgba(76, 217, 178, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 217, 178, 0); }
}

.menu-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
    transition: transform 0.3s;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.menu-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.menu-box:active .menu-icon {
    transform: scale(0.95);
}

@media (hover: hover) {
    .menu-box:hover .menu-icon {
        transform: scale(1.05) rotate(1deg);
    }
    .menu-box:hover .menu-icon img {
        transform: scale(1.08);
    }
}

.menu-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e8f4ff;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
    line-height: 1.2;
}

.menu-desc {
    font-size: 0.7rem;
    color: rgba(190, 215, 235, 0.6);
    font-weight: 300;
    max-width: 140px;
    margin: 0 auto;
    line-height: 1.3;
    display: none;
}

.menu-arrow {
    display: none;
    color: rgba(100, 200, 255, 0.4);
    font-size: 0.8rem;
    margin-top: 4px;
    transition: all 0.3s;
}

.mobile-info {
    text-align: center;
    color: rgba(190, 215, 235, 0.25);
    font-size: 0.7rem;
    padding: 4px 0 8px;
    letter-spacing: 0.5px;
}

.footer {
    margin-top: 16px;
    text-align: center;
    color: rgba(190, 215, 235, 0.25);
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding-top: 16px;
}

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (min-width: 600px) {
    body { padding: 20px; }
    .container { 
        padding: 28px 30px 36px;
        border-radius: 36px;
    }
    .main-title { 
        font-size: 3.6rem;
        letter-spacing: 3px;
    }
    .moving-text { font-size: 1.6rem; }
    .header p { font-size: 1rem; }
    .menu-container { 
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
    .menu-box { 
        min-height: 180px;
        padding: 22px 16px 18px;
        border-radius: 24px;
    }
    .menu-icon { 
        width: 68px;
        height: 68px;
    }
    .menu-title { font-size: 1.1rem; }
    .menu-desc { 
        display: block;
        font-size: 0.8rem;
        max-width: 180px;
    }
    .menu-arrow { display: block; }
    .mobile-info { display: none; }
    .logo-header {
        width: 72px;
        height: 72px;
    }
    .glow-orb-1 { width: 350px; height: 350px; }
    .glow-orb-2 { width: 400px; height: 400px; }
    .glow-orb-3 { width: 250px; height: 250px; }
    .bubble:nth-of-type(3) { display: block; }
    .floating-element:nth-child(3) { display: block; }
}

/* ============================================================
   RESPONSIVE - DESKTOP
   ============================================================ */
@media (min-width: 1024px) {
    body { padding: 30px; }
    .container { 
        padding: 36px 44px 48px;
        border-radius: 48px;
        max-width: 1300px;
    }
    .main-title { 
        font-size: 4.8rem;
        letter-spacing: 4px;
    }
    .moving-text { font-size: 2rem; }
    .header p { font-size: 1.15rem; }
    .menu-container { 
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    .menu-box { 
        min-height: 210px;
        padding: 28px 18px 22px;
        border-radius: 28px;
    }
    .menu-icon { 
        width: 80px;
        height: 80px;
        margin-bottom: 12px;
    }
    .menu-title { font-size: 1.3rem; }
    .menu-desc { 
        font-size: 0.85rem;
        max-width: 200px;
    }
    .menu-arrow { display: block; }
    .logo-header {
        width: 80px;
        height: 80px;
    }
    .glow-orb-1 { width: 400px; height: 400px; top: -100px; right: -100px; }
    .glow-orb-2 { width: 500px; height: 500px; bottom: -150px; left: -150px; }
    .glow-orb-3 { width: 300px; height: 300px; }
    .footer { font-size: 0.85rem; }
    .mobile-info { display: none; }
}

/* ============================================================
   RESPONSIVE - MOBILE KECIL
   ============================================================ */
@media (max-width: 380px) {
    .container { padding: 14px 10px 20px; border-radius: 20px; }
    .main-title { font-size: 2rem; letter-spacing: 1px; }
    .moving-text { font-size: 0.9rem; }
    .logo-header { width: 48px; height: 48px; }
    .menu-container { gap: 8px; }
    .menu-box { 
        min-height: 120px; 
        padding: 12px 8px 10px;
        border-radius: 16px;
    }
    .menu-icon { 
        width: 44px;
        height: 44px;
        border-radius: 12px;
        margin-bottom: 4px;
    }
    .menu-title { font-size: 0.8rem; }
    .pulse-dot { width: 6px; height: 6px; top: 8px; right: 8px; }
    .header p { font-size: 0.75rem; }
    .footer { font-size: 0.6rem; padding-top: 12px; margin-top: 12px; }
    .mobile-info { font-size: 0.6rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .gradient-layer {
        animation: none;
        background: #0a1628;
    }
    .particle {
        animation: none !important;
        opacity: 0.3 !important;
    }
    .glow-orb {
        animation: none !important;
        opacity: 0.1 !important;
    }
    .moving-text {
        animation: none !important;
    }
}