/* ========================================
           CSS RESET & BOX SIZING
           ======================================== */
        *,
        *::before,
        *::after {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html {
            width: 100%;
            overflow-x: hidden;
        }

        /* ========================================
           FONT FACE & TYPOGRAPHY
           ======================================== */
        @font-face {
            font-family: "Retrogression";
            src: url("/font/RetrogressionRegular.ttf") format("truetype");
            font-display: swap;
        }

        @font-face {
            font-family: "KiwiSoda";
            src: url("/font/KiwiSoda.ttf") format("truetype");
            font-display: swap;
        }

        @font-face {
            font-family: "CutoutPaper";
            src: url("/font/CutoutPaper.ttf") format("truetype");
            font-display: swap;
        }

        @font-face {
            font-family: "Rascal";
            src: url("/font/Rascal.ttf") format("truetype");
            font-display: swap;
        }

        /* ========================================
           BODY & BACKGROUND
           ======================================== */
        body {
            margin: 0;
            padding: 10px 0;
            font-family: ui-monospace, 'Cascadia Code', 'JetBrains Mono', 'Fira Code', monospace;
            background-color: #adca6d;
            background-image: url("/image-main/background-hijau-bunga.jpg");
            background-repeat: repeat-x;
            background-size: auto 100%;
            background-position: center;
            min-height: 100vh;
            width: 100%;
            max-width: 100vw;
            overflow: hidden;
            text-rendering: optimizeLegibility;
            contain: layout style paint;
        }

        body.candy-mode {
            background-image: radial-gradient(circle at 25% 25%, #ffc0cb 2px, transparent 2px), radial-gradient(circle at 75% 75%, #f8e092 2px, transparent 2px);
            background-size: 24px 24px;
            background-repeat: repeat;
            opacity: 1;
            background-color: #ffffff;
        }

        /* ========================================
           DARK MODE TOGGLE BUTTON
           ======================================== */
        .theme-toggle {
            position: fixed;
            top: 15px;
            left: 15px;
            z-index: 1000;
            background: rgba(249, 199, 196, 0.6);
            border: 2px solid #a47148;
            border-radius: 50%;
            width: 45px;
            height: 45px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
            line-height: 1;
            transition: transform 0.15s ease;
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        body.candy-mode .theme-toggle {
            background: white;
            border: 1px solid black;
            box-shadow: 0 0 10px pink;
        }

        .theme-toggle:hover {
            transform: scale(1.1);
        }

        .theme-toggle:active {
            transform: scale(0.95);
        }

        /* ========================================
           MAIN LAYOUT
           ======================================== */
        .seluruh {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            grid-template-rows: auto 1fr;
            gap: 10px;
            height: calc(100vh - 20px);
            max-width: 100%;
            position: relative;
            z-index: 1;
            contain: layout style paint;
            overflow: hidden;
        }

        /* ========================================
           SCROLLBAR STYLES
           ======================================== */
        .sidebar,
        .container {
            scrollbar-width: thin;
            scrollbar-color: #f9c7c4 white;
        }

        body.candy-mode .sidebar,
        body.candy-mode .container {
            scrollbar-color: pink rgba(255, 192, 203, 0.3);
        }

        /* ========================================
           HEADER
           ======================================== */
        header {
            grid-column: 3 / span 8;
            grid-row: 1;
            border-left: 3px dotted #a47148;
            border-right: 3px dotted #a47148;
            border-radius: 100px 100px 0 0;
            background: url("/image-main/gif-bunga.gif");
            background-size: cover;
            padding-bottom: 4px;
            margin-bottom: 0px;
            transform: translateZ(0);
        }

        body.candy-mode header {
            border: 1px solid black;
            background: url("https://i.pinimg.com/originals/47/4a/03/474a03ab8c0e3ecac643202d12f08655.gif");
            background-size: cover;
            background-position: center;
            border-radius: 0;
        }

        header h1 {
            margin: 0;
            font-family: 'Retrogression', cursive;
            color: rgb(249, 199, 196);
            font-weight: bold;
            text-align: center;
            font-size: 34px;
            text-shadow: -1px -1px 0 #a47148, 1px -1px 0 #a47148, -1px 1px 0 #a47148, 1px 1px 0 #a47148;
            transform: translateZ(0);
        }

        body.candy-mode header h1 {
            color: #c0ddff;
            text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
            font-family: 'KiwiSoda';
            padding-top: 4px;
        }

        /* ========================================
           SIDEBAR
           ======================================== */
        .sidebar {
            grid-column: 3 / span 2;
            grid-row: 2;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 100%;
            overflow-y: auto;
            padding-right: 0px;
            contain: content;
            transform: translateZ(0);
            backface-visibility: hidden;
        }

        .sidebar-1,
        .sidebar-2,
        .sidebar-3,
        .sidebar-4,
        .sidebar-5,
        .sidebar-6 {
            border: 3px dotted #a47148;
            background: rgba(249, 199, 196, 0.6);
            padding: 15px;
        }

        body.candy-mode .sidebar-1,
        body.candy-mode .sidebar-2,
        body.candy-mode .sidebar-3,
        body.candy-mode .sidebar-4,
        body.candy-mode .sidebar-5 {
            border: 1px solid black;
            background: linear-gradient(0deg, #f8e092, white, #f8e092);
        }

        .sidebar-1 h2,
        .sidebar-2 h2,
        .sidebar-3 h2,
        .sidebar-4 h2,
        .sidebar-5 h2 {
            margin-top: -8px;
            margin-bottom: 10px;
            color: #4b3420;
            font-size: 22px;
            text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
            font-family: 'Retrogression', cursive;
            display: flex;
            justify-content: center;
            transform: translateZ(0);
        }

        body.candy-mode .sidebar-1 h2,
        body.candy-mode .sidebar-2 h2,
        body.candy-mode .sidebar-3 h2,
        body.candy-mode .sidebar-4 h2,
        body.candy-mode .sidebar-5 h2 {
            color: #c0ddff;
            margin-bottom: 6px;
            text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black;
            font-family: 'CutoutPaper';
        }

        /* ========================================
           SIDEBAR-1: NAVIGATION
           ======================================== */
        .main-navigation {
            display: flex;
            flex-direction: column;
        }

        .nav-item {
            background-color: #f9c7c4;
            border-right: 1px solid #a47148;
            border-left: 1px solid #a47148;
            margin-bottom: 0;
            overflow: hidden;
        }

        body.candy-mode .nav-item {
            background-color: white;
            border-right-color: black;
            border-left-color: black;
        }

        body.candy-mode .nav-item:first-child {
            border-radius: 20px 20px 0 0;
        }

        body.candy-mode .nav-item:last-child {
            border-radius: 0 0 20px 20px;
        }

        .nav-item:first-of-type {
            border-top: 1px solid #a47148;
            transition: border-color 0.3s ease;
        }

        body.candy-mode .nav-item:first-of-type {
            border-top-color: black;
        }

        .nav-item>a,
        .nav-item>.accordion-label {
            display: block;
            padding: 3px;
            padding-left: 10px;
            text-decoration: none;
            color: #4b3420;
            font-weight: bold;
            font-size: 12px;
            border-bottom: 1px solid #a47148;
            cursor: pointer;
            width: 100%;
            height: 30px;
            position: relative;
        }

        body.candy-mode .nav-item>a,
        body.candy-mode .nav-item>.accordion-label {
            color: black;
            border-bottom-color: black;
        }

        .nav-item>a:hover,
        .nav-item>.accordion-label:hover,
        .nav-item>a:focus,
        .nav-item>.accordion-label:focus {
            background: linear-gradient(90deg, #adca6d, #f9c7c4);
        }

        body.candy-mode .nav-item>a:hover,
        body.candy-mode .nav-item>.accordion-label:hover,
        body.candy-mode .nav-item>a:focus,
        body.candy-mode .nav-item>.accordion-label:focus {
            background: linear-gradient(90deg, #f8e092, white);
        }

        input[type="checkbox"] {
            display: none;
        }

        .accordion-label {
            display: flex;
            align-items: center;
        }

        .accordion-label::after {
            content: '+';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 14px;
            color: #a47148;
            transition: transform 0.3s ease, color 0.3s ease;
        }

        body.candy-mode .accordion-label::after {
            color: black;
        }

        input[type="checkbox"]:checked+.accordion-label::after {
            transform: translateY(-50%) rotate(135deg);
            transition: transform 0.3s ease;
        }

        .nav-item ul {
            list-style: none;
            margin: 0;
            padding: 0;
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        input[type="checkbox"]:checked+.accordion-label+ul {
            max-height: 500px;
        }

        .nav-item ul li {
            position: relative;
            width: 100%;
        }

        .nav-item ul li a {
            display: flex;
            align-items: center;
            padding: 4px 40px 4px 40px;
            text-decoration: none;
            color: #4b3420;
            font-weight: bold;
            font-size: 12px;
            font-style: italic;
            border-bottom: 1px solid #a47148;
            background: linear-gradient(90deg, #f9c7c4, rgb(255, 255, 255, 0.7), rgb(255, 255, 255, 0.7), #f9c7c4, #f9c7c4);
            height: 28px;
        }

        body.candy-mode .nav-item ul li a {
            color: black;
            border-bottom-color: black;
            background: linear-gradient(180deg, pink, white, pink);
        }

        .nav-item ul li a:hover,
        .nav-item ul li a:focus {
            background: linear-gradient(90deg, #adca6d, rgb(255, 255, 255, 0.7), rgb(255, 255, 255, 0.7), #adca6d, #adca6d);
        }

        body.candy-mode .nav-item ul li a:hover,
        body.candy-mode .nav-item ul li a:focus {
            background: linear-gradient(0deg, #f8e092, white, #f8e092);
        }

        .icon {
            width: 22px;
            height: 22px;
            vertical-align: middle;
            margin-right: 8px;
            object-fit: contain;
            transition: filter 0.3s ease;
        }

        @keyframes scale {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.2);
            }
        }

        .menu-link.active {
            text-decoration-line: underline;
            text-decoration-style: wavy;
            text-underline-offset: 1px;
            background: linear-gradient(90deg, #ec4899, #f9c7c4);
            font-weight: bolder;
        }

        body.candy-mode .menu-link.active {
            text-decoration-color: black;
            background: linear-gradient(90deg, #c0ddff, white);
        }

        .menu-link.active img {
            animation: scale 2s ease-in-out infinite;
            will-change: transform;
        }

        .active-underline {
            text-decoration-line: underline;
            text-decoration-style: wavy;
            font-weight: bolder;
            background: linear-gradient(90deg, #ff8ab1, #adca6d);
        }

        body.candy-mode .active-underline {
            background: linear-gradient(90deg, #f8e092, #bb86fc);
        }

        /* ========================================
   ACTIVE MENU & SUBMENU
   ======================================== */

        .nav-item.active>.accordion-label {
            background: linear-gradient(90deg, #ec4899, #f9c7c4);
            font-weight: bolder;
            text-decoration: underline;
            text-decoration-style: wavy;
            text-underline-offset: 2px;
        }

        body.candy-mode .nav-item.active>.accordion-label {
            background: linear-gradient(90deg, #c0ddff, white);
            text-decoration-color: black;
        }

        /* Icon animation untuk active menu */
        .nav-item.active>.accordion-label img {
            animation: scale 2s ease-in-out infinite;
            will-change: transform;
        }

        /* Hover state untuk active menu utama */
        .nav-item.active>.accordion-label:hover {
            background: linear-gradient(90deg, #adca6d, #f9c7c4);
        }

        body.candy-mode .nav-item.active>.accordion-label:hover {
            background: linear-gradient(90deg, #f8e092, white);
        }

        /* Active untuk submenu */
        .nav-item ul li a.active-underline {
            text-decoration-line: underline;
            text-decoration-style: wavy;
            text-underline-offset: 2px;
            font-weight: bolder;
        }

        /* Hover state untuk active submenu */
        .nav-item ul li a.active-underline:hover {
            background: linear-gradient(90deg, #adca6d, rgb(255, 255, 255, 0.7), rgb(255, 255, 255, 0.7), #adca6d, #adca6d) !important;
        }

        body.candy-mode .nav-item ul li a.active-underline:hover {
            background: linear-gradient(0deg, #f8e092, white, #f8e092) !important;
        }

        /* ========================================
           SIDEBAR-2: MY TIME
           ======================================== */
        .time-item-day {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 4px 4px 3px 4px;
            background: linear-gradient(180deg, #ff8ab1, #f9c7c4, #f9c7c4, #f9c7c4, #ff8ab1);
            border-radius: 30px 0 30px 0;
            border: 1px solid #a47148;
        }

        body.candy-mode .time-item-day {
            display: none;
        }

        .time-item-candy {
            display: none;
            justify-content: center;
            align-items: center;
            padding: 8px 0 6px 0;
            background: linear-gradient(90deg, #c0ddff, white, white, #c0ddff);
            border-radius: 50%;
            border: 1px solid black;
        }

        body.candy-mode .time-item-candy {
            display: flex;
        }

        /* ========================================
           SIDEBAR-3: VISITORS COUNTER
           ======================================== */
        .sidebar-3 {
            display: flex;
            flex-direction: column;
            padding: -2px;
        }

        .button-link-1 {
            width: 100%;
            display: flex;
            margin-left: -6px;
            margin-top: -2px;
        }

        .button-link-1 img {
            width: 84px;
        }

        .button-link-1:hover {
            animation: rotateGuestbook 1s steps(2, end) infinite;
        }

        .button-link-2 {
            width: 100%;
            display: flex;
            margin-bottom: -90px;
        }

        .button-link-2 img {
            width: 112px;
            transform: translateX(62%) translateY(-154px);
        }

        .button-link-2:hover {
            animation: rotateGuestbook 1s steps(2, end) infinite;
        }

        .button-link-3 {
            display: flex;
            width: 100%;
            margin-bottom: -60px;
        }

        .button-link-3 img {
            width: 114px;
            transform: translateX(55%) translateY(-55px);
        }

        .button-link-3:hover {
            animation: rotateGuestbook 1s steps(2, end) infinite;
        }

        @keyframes rotateGuestbook {

            0%,
            100% {
                transform: rotate(-1deg);
            }

            50% {
                transform: rotate(2deg);
            }
        }

        /* ========================================
           SIDEBAR-4: BUTTON LINK
           ======================================== */
        .sidebar-4 p {
            font-size: 11px;
            flex-wrap: wrap;
            color: #4b3420;
            border: 1px solid #a47148;
            border-radius: 20px 0 20px 0;
            text-align: center;
            background: linear-gradient(180deg, #ff8ab1, #f9c7c4, #f9c7c4, #f9c7c4, #ff8ab1);
        }

        body.candy-mode .sidebar-4 p {
            background: linear-gradient(90deg, #c0ddff, white, white, #c0ddff);
            color: black;
            border-color: black;
            border-radius: 50%;
            padding: 4px 0 2px 0;
        }

        .web-button {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            margin-bottom: 0px;
            margin-top: 0px;
        }

        .web-button-link {
            display: inline-block;
            margin-bottom: 0;
            transition: transform 0.15s ease;
            will-change: transform;
        }

        .web-button-link img:hover {
            transform: scale(1.05);
        }

        .web-button-link img {
            display: block;
            object-fit: contain;
            transition: filter 0.3s ease;
        }

        /* ========================================
           SIDEBAR-5: COPYRIGHT
           ======================================== */
        .sidebar-5 {
            font-size: 12px;
            text-align: center;
        }

        .copyright {
            margin-bottom: 0px;
            color: #4b3420;
            transition: color 0.3s ease;
        }

        body.candy-mode .copyright {
            color: black;
        }

        /* ========================================
           CONTAINER - MAIN CONTENT
           ======================================== */
        .container {
            grid-column: 5 / span 6;
            grid-row: 2;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 100%;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 0px;
            contain: content;
            transform: translateZ(0);
            backface-visibility: hidden;
        }