:root {
    --primary: #602f7a;
    --primary-light: #be4bdb;
    --bg-dark: #0c000e;
    --glass: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    user-select: none;
    cursor: none;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #0c000e 0%, #1a052e 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
}

body.stop-scroll {
    overflow: hidden;
    touch-action: none;
}

/* --- Header & UI Button --- */
header {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    background: rgba(12, 0, 14, 0.85);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 900;
    border-bottom: 1px solid var(--border);
}

#ui {
    width: 30px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1004;
}

.line {
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 5px;
    transition: 0.3s;
}

#line1.active {
    opacity: 0;
}

#line2.active {
    opacity: 0;
}

#line3.active {
    opacity: 0;
}

/* --- Sidebar & Overlay System --- */
.sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: rgba(15, 2, 25, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar.show {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1400;
    /* Di bawah sidebar & #ui */
    display: none;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar button {
    width: 70%;
    padding: 14px;
    margin: 10px 0;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* --- Main Content --- */
.main-container {
    padding: 20px 5% 120px 5%;
}

h2 {
    margin: 30px 0 15px 0;
    font-size: 1.1rem;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}
#paragraf {
    margin: 30px 0 15px 0;
    border-left: 4px solid yellow;
    padding-left: 10px;
}

.item-x {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.item-x::-webkit-scrollbar {
    display: none;
}

.item-x .item{
    animation: intro-hint 1.2s ease-in-out;
}

.item {
    flex: 0 0 calc(50% - 22.5px);
    min-width: 165px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 20px;
    鳳verflow: hidden;
    transition: 0.3s;
    scroll-snap-align: center;
}

.item:active {
    transform: scale(0.95);
}

.item img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.item p {
    padding: 12px;
    font-size: 0.8rem;
    text-align: center;
    margin: 0;
}

@keyframes intro-hint {
    0% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    50% { transform: translateX(0); }
}

.grid-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* --- Alert System --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    z-index: 2500;
}

.alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 85%;
    max-width: 400px;
    background: #1e0d21;
    border-radius: 25px;
    display: none;
    z-index: 2600;
    overflow: hidden;
}

.show_alert {
    display: block !important;
    animation: waveShakeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hide_alert {
    display: block !important;
    animation: waveShakeOut 0.4s ease-in forwards;
}

@keyframes waveShakeIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5) rotate(-5deg);
        opacity: 0;
    }

    40% {
        transform: translate(-50%, -50%) scale(1.05) rotate(3deg);
    }

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

@keyframes waveShakeOut {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
        opacity: 0;
    }
}

.alert img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.alert-content {
    padding: 20px;
    text-align: left;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 20px 25px 20px;
}

.btn-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
}

.btn-alt {
    background: transparent;
    color: #aaa;
    border: none;
}

/* --- Bottom UI FontAwesome --- */
.bottom-ui {
    position: fixed;
    bottom: 0%;
    left: 0;
    transition: 0.5s;
    width: 100%;
    background: rgba(15, 2, 25, 0.98);
    backdrop-filter: blur(15px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--border);
    z-index: 1000;
    height: 85px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.6);
    transition: 0.3s;
    width: 60px;
    padding: 1rem;
}

.nav-item i {
    font-size: 22px;
}

.nav-item span {
    font-size: 10px;
    font-weight: 400;
}

.nav-item:hover {
    color: var(--primary-light);
    transform: translateY(-10px);
    border-bottom: 1px solid var(--primary-light);
}

@media (min-width: 768px) {
    .grid-items {
        grid-template-columns: repeat(4, 1fr);
    }
}

#content-1,
#content-2,
#content-3,
#content-4,
#content-5 {
    display: none;
}

#content-1.show,
#content-2.show,
#content-3.show,
#content-4.show,
#content-5.show {
    display: block;
}

#profile-img {
            width: 140px;
            height: 140px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid rgba(190, 75, 219, 0.5);
            box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 4px rgba(190, 75, 219, 0.2);
            transition: all 0.3s ease;
            background: linear-gradient(135deg, #2a1038, #1a0b24);
}

.thumbnail {
    width: 100%;
    text-align: center;
    background: var(--bg-dark);
    padding: 1rem 0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 1rem 0;
}


#nama-user {
    font-weight: bold;
    margin: 10px 0;
}

.stats {
    display: flex;
    justify-content: center;
}

.stats p {
    margin: 0 10px;
    font-weight: bold;
    font-size: 15px;
}

#user-progress {
    height: 10px;
    background: rgb(111, 0, 255);
    margin: 10px 0;
    border-radius: 10px;
}

#user-progress::-webkit-progress-value {
    height: 10px;
    background: rgb(111, 0, 255);
    border-radius: 10px;
}

#user-progress::-webkit-progress-bar {
    height: 10px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
}

#rank {
    font-weight: bold;
    color: rgb(207, 183, 46);
}

#rank i {
    margin: 0 5px;
}

p span {
    color: var(--primary-light);
    font-weight: bold;
}

.hide.bottom-ui {
    bottom: -100%;
}

/* ── Editor screen (content-5) ── */

#editor-bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    z-index: 0;
    opacity: 0.55;
}

.editor-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    height: 100%;
    background:
        linear-gradient(to bottom,
            rgba(8,0,14,0.72) 0%,
            rgba(8,0,14,0.55) 50%,
            rgba(8,0,14,0.82) 100%);
}

#editing {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 24px 100px;
    width: 100%;
}

.editing-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    padding: 48px 0 36px;
}

.editor-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(190, 75, 219, 0.9);
    background: rgba(190, 75, 219, 0.1);
    border: 1px solid rgba(190, 75, 219, 0.25);
    border-radius: 30px;
    padding: 5px 14px;
}

.editing-view h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.editing-view h1 span {
    background: linear-gradient(130deg, #be4bdb, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.editing-view p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
}

.get-start {
    width: 100%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.btn-editor-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #be4bdb, #7c3aed);
    color: white;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 8px 28px rgba(190, 75, 219, 0.35);
    transition: all 0.2s;
    font-family: inherit;
}

.btn-editor-primary:active {
    transform: scale(0.96);
    box-shadow: 0 4px 14px rgba(190, 75, 219, 0.25);
}

.btn-editor-ghost {
    width: 100%;
    padding: 13px 24px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-editor-ghost:active {
    transform: scale(0.96);
    background: rgba(255, 255, 255, 0.1);
}