/* ========================================
   RESET DAN PENGATURAN DASAR
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ========================================
   LATAR BELAKANG GALAKSI
   ======================================== */
.galaxy-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: 
        radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 50%, #000 100%),
        radial-gradient(ellipse at top, #0c0f1a 0%, transparent 50%);
    overflow: hidden;
}

/* BINTANG-BINTANG KECIL */
.stars {
    position: absolute;
    width: 1px;
    height: 1px;
    background: transparent;
    box-shadow: 
        1744px 122px #FFF, 134px 1321px #FFF, 92px 859px #FFF, 
        1829px 1021px #FFF, 123px 45px #FFF, 1500px 1500px #FFF,
        200px 300px #FFF, 800px 600px #FFF, 1200px 900px #FFF,
        400px 1100px #FFF, 1600px 400px #FFF, 300px 1400px #FFF,
        900px 200px #FFF, 1400px 800px #FFF, 500px 1200px #FFF;
    animation: animStar 70s linear infinite;
    top: 0;
    left: 0;
}

/* BINTANG-BINTANG BESAR (arah berlawanan) */
.stars2 {
    position: absolute;
    width: 2px;
    height: 2px;
    background: transparent;
    box-shadow: 
        1744px 122px #FFF, 134px 1321px #FFF, 92px 859px #FFF, 
        1829px 1021px #FFF, 123px 45px #FFF, 1500px 1500px #FFF;
    animation: animStar 120s linear infinite reverse;
    top: 0;
    left: 0;
}

/* EFEK NEBULA BERWARNA */
.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: pulse 8s ease-in-out infinite alternate;
}

.nebula1 { 
    top: 30%; 
    left: 20%; 
    width: 400px; 
    height: 400px; 
    background: radial-gradient(circle, rgba(138, 43, 226, 0.3) 0%, rgba(0, 0, 0, 0) 70%); 
    animation-delay: 0s; 
}

.nebula2 { 
    top: 60%; 
    right: 20%; 
    width: 500px; 
    height: 500px; 
    background: radial-gradient(circle, rgba(30, 144, 255, 0.2) 0%, rgba(0, 0, 0, 0) 70%); 
    animation-delay: -2s; 
}

.nebula3 { 
    top: 70%; 
    left: 50%; 
    width: 300px; 
    height: 300px; 
    background: radial-gradient(circle, rgba(255, 20, 147, 0.25) 0%, rgba(0, 0, 0, 0) 70%); 
    animation-delay: -4s; 
}

/* ========================================
   KARTU PROFIL UTAMA
   ======================================== */
.profile-card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 25px;
    /* BORDER PROFIL YANG MENGKILAP */
    border: 2px solid transparent;
    background-clip: padding-box;
    /* Efek border gradient bercahaya */
    box-shadow: 
        0 0 0 2px rgba(138, 43, 226, 0.5),
        0 15px 35px rgba(0,0,0,0.5),
        0 0 30px rgba(138, 43, 226, 0.4),
        inset 0 0 20px rgba(255,255,255,0.1);
    max-width: 450px;
    text-align: center;
    transition: all 0.4s ease;
    overflow: hidden;
    
}

/* EFEK HOVER KARTU (NAIK & BERCAHAYA) */
.profile-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 0 0 3px rgba(138, 43, 226, 0.8),
        0 25px 50px rgba(0,0,0,0.7),
        0 0 50px rgba(138, 43, 226, 0.6);
    border-image: linear-gradient(45deg, #8A2BE2, #00BFFF, #FF1493) 1;
}

/* FOTO PROFIL */
.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(45deg, #8A2BE2, #00BFFF);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.6);
    animation: float 3s ease-in-out infinite;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.profile-img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 40px rgba(138, 43, 226, 1);
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.4);
}

/* NAMA PROFIL (GRADIENT TEXT) */
.profile-name {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255,255,255,0.8);
    background: linear-gradient(45deg, #fff, #ddd, #8A2BE2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* DESKRIPSI PROFIL */
.profile-desc {
    font-size: 1.2rem;
    color: #ddd;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* TAG / SKILL PROFIL */
.profile-tags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tag {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tag:hover {
    background: rgba(138, 43, 226, 0.3);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

/* ========================================
   ANIMASI
   ======================================== */
/* BINTANG BERGERAK VERTIKAL */
@keyframes animStar {
    from { transform: translateY(0px) rotate(0deg); }
    to { transform: translateY(-2000px) rotate(360deg); }
}

/* NEBULA BERPULSA */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(1.3); opacity: 0.7; }
}

/* FOTO PROFIL MENGAMBANG */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* BINTANG JATUH */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 10px #fff;
    top: 20%;
    left: 10%;
    animation: shoot 3s linear infinite;
    z-index: 2;
}

@keyframes shoot {
    0% { transform: translateX(0) translateY(0) rotate(45deg); opacity: 1; }
    100% { transform: translateX(120vw) translateY(120vh) rotate(45deg); opacity: 0; }
}

/* TAB CONTAINER BARU */
.tab-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 20px);
    width: 90%;
    max-width: 400px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tab-container:not(.hidden) {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

@keyframes tabSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, 30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.tab-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.tab-close {
    background: rgba(138, 43, 226, 0.7);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tab-close:hover {
    background: rgba(138, 43, 226, 1);
    transform: scale(1.1);
}

.tab-title {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.tab-desc {
    color: #f0f0f0;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: center;
}

.tab-emojis {
    font-size: 2rem;
    text-align: center;
    margin-top: 10px;
}

/* RESPONSIVE TAB */
@media (max-width: 480px) {
    .tab-container {
        width: 95%;
        left: 2.5%;
        transform: translateX(0);
    }
}

/* Animasi Muncul */
@keyframes entrance {
    0% {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.8); /* Mulai dari bawah & kecil */
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1); /* Posisi normal tengah */
        filter: blur(0);
    }
}



/* Animasi tambahan untuk elemen di dalam kartu agar muncul berurutan */
.profile-img, .profile-name, .profile-desc, .tag {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.profile-img { animation-delay: 0.5s; }
.profile-name { animation-delay: 0.8s; }
.profile-desc { animation-delay: 1s; }
.profile-tags { animation-delay: 1.2s; }

@keyframes fadeIn {
    to { opacity: 1; }
}
.entrance-wrapper {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: entrance 1.5s ease-out forwards;
    z-index: 10;
}