.playground-nav-container {
    position: fixed;
    top: 90px; /* Adjust to match main navbar height */
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #f1f1f1;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    pointer-events: auto; /* Allow clicks to pass through container */
    overflow-x: auto;      /* Mengizinkan scroll horizontal */
    white-space: nowrap;   /* Mencegah menu turun ke bawah (wrap) */
    scrollbar-width: none; /* Firefox */
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Biar scroll smooth di iOS */
}

/* Hapus scrollbar untuk Chrome/Safari/Edge */
.playground-nav-container::-webkit-scrollbar {
    display: none;
}

.playground-nav-container.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

body.night-mode .playground-nav-container {
    background-color: #333;
}

@media screen and (min-width: 769px) {
    .playground-nav-container {
        top: 100px; /* Desktop height */
    }
}

.playground-content-area {
    padding-top: 130px; /* Offset for fixed navbars (main + playground) */
}

@media screen and (min-width: 769px) {
    .playground-content-area {
        padding-top: 150px;
    }
}

@media screen and (max-width: 480px) {
    .playground-nav-item {
        padding: 8px 15px;
        font-size: 12px;
    }
}

.playground-nav {
    display: inline-flex;
    margin: 0 15px;
    background-color: white;
    border-radius: 50px;
    padding: 5px;
    position: relative;
    border: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    z-index: 10;
    pointer-events: auto; /* Re-enable clicks for the actual nav bar */
}

body.night-mode .playground-nav {
    background-color: #1a1a1a;
    border-color: #333;
}

.playground-nav-item {
    padding: 10px 25px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 2; /* Increased z-index */
    transition: color 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

body.night-mode .playground-nav-item {
    color: #fff;
}

.playground-nav-item.active {
    color: #fff;
}

.playground-nav-indicator {
    position: absolute;
    height: calc(100% - 10px);
    background-color: #2b2bff; /* JetBrains-like blue/purple from the image */
    border-radius: 50px;
    top: 5px;
    left: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    pointer-events: none;
    opacity: 0;
}

.playground-content-section {
    padding: 40px 20px;
    min-height: calc(100vh - 150px);
    color: #333;
    text-align: center;
    transition: color 0.3s ease;
    display: none; /* Hidden by default, JS will toggle flex */
    flex-direction: column;
    align-items: center;
}

body.night-mode .playground-content-section {
    color: #fff;
}

#apps { background-color: transparent; }
#plugins { background-color: rgba(0,0,0,0.02); }
#collaboration { background-color: transparent; }
#opensource { background-color: rgba(0,0,0,0.02); }

body.night-mode #plugins,
body.night-mode #opensource {
    background-color: rgba(255,255,255,0.02);
}

/* Sticky behavior adjustment if main navbar is fixed */
body {
    margin: 0;
    background-color: #f1f1f1;
    transition: background-color 0.3s ease;
}

body.night-mode {
    background-color: #333;
}

.playground-content-area {
    transition: opacity 0.3s ease-in-out;
}

/* PATCH: Memastikan layout semua section (Apps, Plugins, dll) tidak berantakan */
.playground-content-section {
    background-color: transparent !important;
    padding: 0 !important;
    align-items: stretch !important;
    text-align: left !important;
}

body.night-mode .playground-content-section {
    background-color: transparent !important;
}

.playground-content-section > div {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.playground-content-section .page-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.playground-content-section .page-title {
    margin-top: 0 !important;
}
