        /* ==========================================
           DESAIN SISTEM & VARIABEL (CYBERPUNK SCI-FI)
           ========================================== */
        :root {
            --bg-body: #050B14;
            --bg-card: rgba(13, 22, 38, 0.85);
            --primary: #00E5FF;
            --secondary: #FF2A6D;
            --accent: #05D5FF;
            --highlight: #39FF14;
            --text-main: #EDF2F7;
            --text-light: #A0B4C4;
            --shadow: 0 0 15px rgba(0, 229, 255, 0.3);
            --border-radius: 12px;
            --font-body: 'Poppins', sans-serif;
            --font-display: 'Orbitron', sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-body);
        }

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            /* Grid line pattern untuk kesan sci-fi hologram */
            background-image: linear-gradient(rgba(0, 229, 255, 0.05) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 229, 255, 0.05) 1px, transparent 1px);
            background-size: 50px 50px;
        }

        /* ==========================================
           HEADER & NAVIGASI TAB
           ========================================== */
        header {
            text-align: center;
            padding: 2rem 1rem 1rem;
        }

        h1,
        h2,
        h3 {
            font-family: var(--font-display);
        }

        h1 {
            font-size: 2.5rem;
            color: var(--primary);
            text-shadow: 0 0 10px var(--primary), 0 0 20px var(--primary);
            margin-bottom: 0.5rem;
            letter-spacing: 3px;
            text-transform: uppercase;
        }

        h1 span {
            color: var(--secondary);
            text-shadow: 0 0 10px var(--secondary), 0 0 20px var(--secondary);
        }

        .subtitle {
            font-size: 1.2rem;
            color: var(--text-main);
            font-weight: 500;
        }

        .tab-container {
            max-width: 900px;
            margin: 2rem auto;
            padding: 0 1rem;
        }

        .tabs {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
        }

        .tab-btn {
            background-color: transparent;
            border: 2px solid var(--text-light);
            padding: 12px 24px;
            border-radius: 8px;
            font-family: var(--font-display);
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .tab-btn:hover {
            border-color: var(--primary);
            color: var(--primary);
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) inset;
        }

        .tab-btn.active {
            background-color: rgba(0, 229, 255, 0.1);
            border-color: var(--primary);
            color: var(--primary);
            text-shadow: 0 0 8px var(--primary);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.4) inset, 0 0 15px rgba(0, 229, 255, 0.4);
        }

        .quiz-tab-btn {
            border-color: #FFD700 !important;
            color: #FFD700 !important;
            background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 165, 0, 0.05));
            animation: quizGlow 2s infinite alternate;
        }

        .quiz-tab-btn:hover {
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.4) inset, 0 0 20px rgba(255, 215, 0, 0.3);
            color: #FFF !important;
        }

        @keyframes quizGlow {
            from {
                box-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
            }

            to {
                box-shadow: 0 0 15px rgba(255, 215, 0, 0.4), 0 0 5px rgba(255, 215, 0, 0.2) inset;
            }
        }

        /* ==========================================
           AREA KONTEN MODUL
           ========================================== */
        .content-area {
            background-color: var(--bg-card);
            border-radius: var(--border-radius);
            padding: 2.5rem;
            box-shadow: var(--shadow);
            border: 2px solid var(--primary);
            min-height: 400px;
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(10px);
        }

        .tab-panel {
            display: none;
            animation: fadeIn 0.5s ease-in-out;
        }

        .tab-panel.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* ==========================================
           MODUL 1: SISI & SUDUT (UI SPESIFIK)
           ========================================== */
        .module-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .module-header h2 {
            font-size: 2rem;
            color: var(--primary);
            margin-bottom: 1rem;
        }

        .narrative-box {
            background-color: rgba(0, 229, 255, 0.05);
            border-left: 4px solid var(--primary);
            border-right: 1px solid rgba(0, 229, 255, 0.2);
            border-top: 1px solid rgba(0, 229, 255, 0.2);
            border-bottom: 1px solid rgba(0, 229, 255, 0.2);
            padding: 1.5rem;
            border-radius: 8px;
            font-size: 1.1rem;
            line-height: 1.7;
            color: var(--text-main);
            margin-bottom: 2rem;
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.1) inset;
        }

        .interactive-area {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2rem;
        }

        .shapes-container {
            display: flex;
            justify-content: center;
            gap: 3rem;
            flex-wrap: wrap;
        }

        /* Styling SVG Bangun Datar */
        .shape-wrapper {
            background-color: rgba(13, 22, 38, 0.5);
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid rgba(0, 229, 255, 0.3);
            box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .shape-wrapper h3 {
            margin-top: 1rem;
            color: var(--highlight);
        }

        .shape-svg {
            overflow: visible;
        }

        .shape-edges {
            transition: all 0.3s ease;
        }

        /* Titik Sudut (Vertices) */
        .shape-vertices {
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .shape-vertices circle {
            transform-box: fill-box;
            transform-origin: center;
        }

        /* Sudut (Angles/Regions) */
        .shape-angles {
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .shape-angles path {
            stroke-width: 4;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke: #FF6B6B;
        }

        /* Animasi Sorot Sisi (Garis Tepi Menyala) */
        @keyframes pulseEdge {
            0% {
                stroke: #FF6B6B;
                filter: drop-shadow(0 0 5px #FF6B6B);
                stroke-width: 6;
            }

            50% {
                stroke: #FF8787;
                filter: drop-shadow(0 0 15px #FF8787);
                stroke-width: 8;
            }

            100% {
                stroke: #FF6B6B;
                filter: drop-shadow(0 0 5px #FF6B6B);
                stroke-width: 6;
            }
        }

        .highlight-side .shape-edges {
            animation: pulseEdge 1.2s infinite;
        }

        /* Animasi Sorot Titik Sudut (Titik Pojok Membesar) */
        @keyframes bounceVertex {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.8);
            }
        }

        .highlight-vertex .shape-vertices {
            opacity: 1 !important;
        }

        .highlight-vertex .shape-vertices circle {
            animation: bounceVertex 1s infinite alternate;
        }

        /* Animasi Sorot Sudut (Busur Sudut Menyala) */
        @keyframes pulseAngle {
            0% {
                stroke: #FF6B6B;
                filter: drop-shadow(0 0 2px #FF6B6B);
            }

            50% {
                stroke: #E53935;
                filter: drop-shadow(0 0 8px #E53935);
            }

            100% {
                stroke: #FF6B6B;
                filter: drop-shadow(0 0 2px #FF6B6B);
            }
        }

        .highlight-angle .shape-angles {
            opacity: 1 !important;
        }

        .highlight-angle .shape-angles path {
            animation: pulseAngle 1s infinite alternate;
        }

        /* === DIAGONAL LAYER (hidden by default) === */
        .shape-diagonals {
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        @keyframes pulseDiagonal {
            0% {
                stroke: #FF2A6D;
                filter: drop-shadow(0 0 3px #FF2A6D);
            }

            50% {
                stroke: #FF6B9D;
                filter: drop-shadow(0 0 12px #FF6B9D);
            }

            100% {
                stroke: #FF2A6D;
                filter: drop-shadow(0 0 3px #FF2A6D);
            }
        }

        .highlight-diagonal .shape-diagonals {
            opacity: 1 !important;
        }

        .highlight-diagonal .shape-diagonals line {
            animation: pulseDiagonal 1.5s infinite;
        }

        /* === SYMMETRY (SIMETRI LIPAT) LAYER === */
        .shape-symmetry-lines {
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        @keyframes pulseSymmetry {
            0% {
                stroke: #A855F7;
                filter: drop-shadow(0 0 3px #A855F7);
            }

            50% {
                stroke: #D8B4FE;
                filter: drop-shadow(0 0 12px #D8B4FE);
            }

            100% {
                stroke: #A855F7;
                filter: drop-shadow(0 0 3px #A855F7);
            }
        }

        .highlight-symmetry .shape-symmetry-lines {
            opacity: 1 !important;
        }

        .highlight-symmetry .shape-symmetry-lines line {
            animation: pulseSymmetry 1.8s infinite;
        }

        /* === ROTATION (SIMETRI PUTAR) LAYER === */
        .shape-rotation {
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        @keyframes spinIndicator {
            0% {
                transform-origin: center;
                transform: rotate(0deg);
            }

            100% {
                transform-origin: center;
                transform: rotate(360deg);
            }
        }

        @keyframes pulseRotation {
            0% {
                stroke: #39FF14;
                filter: drop-shadow(0 0 3px #39FF14);
            }

            50% {
                stroke: #7AFF5C;
                filter: drop-shadow(0 0 12px #7AFF5C);
            }

            100% {
                stroke: #39FF14;
                filter: drop-shadow(0 0 3px #39FF14);
            }
        }

        .highlight-rotation .shape-rotation {
            opacity: 1 !important;
        }

        .highlight-rotation .shape-rotation circle {
            animation: pulseRotation 1.5s infinite;
        }

        /* Rotation marker (green dot at vertex) */
        .rotation-marker {
            filter: drop-shadow(0 0 8px #39FF14);
            transition: opacity 0.3s ease, fill 0.3s ease;
        }

        @keyframes markerPulse {

            0%,
            100% {
                r: 10;
                filter: drop-shadow(0 0 6px #39FF14);
            }

            50% {
                r: 13;
                filter: drop-shadow(0 0 14px #39FF14);
            }
        }

        .highlight-rotation .rotation-marker[opacity="1"] {
            animation: markerPulse 1s infinite;
        }

        /* Shape body group for rotation transforms */
        .shape-body {
            transform-origin: center;
        }

        /* === NEW BUTTON STYLES === */
        .btn-diagonal {
            background: linear-gradient(135deg, #FF2A6D, #FF6B9D);
            box-shadow: 0 6px 0px #B81E4F;
        }

        .btn-symmetry {
            background: linear-gradient(135deg, #A855F7, #C084FC);
            box-shadow: 0 6px 0px #7C3AED;
        }

        .btn-rotation {
            background: linear-gradient(135deg, #39FF14, #7AFF5C);
            box-shadow: 0 6px 0px #1EB30A;
            color: #050B14;
        }

        /* === SUMMARY TABLE === */
        .summary-table-section {
            margin-top: 3rem;
            padding: 2rem;
            background-color: rgba(0, 229, 255, 0.03);
            border: 1px solid rgba(0, 229, 255, 0.2);
            border-radius: 12px;
        }

        .summary-table-section h3 {
            color: var(--primary);
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
        }

        .table-scroll {
            overflow-x: auto;
        }

        .geo-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 0.5rem;
            font-size: 0.95rem;
        }

        .geo-table thead th {
            background-color: rgba(0, 229, 255, 0.15);
            color: var(--primary);
            padding: 12px 10px;
            text-align: center;
            border-bottom: 2px solid var(--primary);
            white-space: nowrap;
            font-size: 0.85rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .geo-table tbody td {
            padding: 10px;
            text-align: center;
            border-bottom: 1px solid rgba(0, 229, 255, 0.1);
            color: var(--text-main);
            transition: background-color 0.2s;
        }

        .geo-table tbody td:first-child {
            text-align: left;
            font-weight: 600;
            color: var(--highlight);
            white-space: nowrap;
        }

        .geo-table tbody tr:hover td {
            background-color: rgba(0, 229, 255, 0.08);
        }

        .geo-table tbody tr:last-child td {
            border-bottom: none;
        }

        /* Kontrol Aksi */
        .action-controls {
            display: flex;
            gap: 1.5rem;
            margin-top: 1rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .action-btn {
            border: none;
            padding: 15px 25px;
            border-radius: 50px;
            font-size: 1.1rem;
            font-weight: bold;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .btn-side {
            background: linear-gradient(135deg, #FF6B6B, #FF8787);
            box-shadow: 0 6px 0px #C92A2A;
        }

        .btn-vertex {
            background: linear-gradient(135deg, #FF9F1C, #FFBF69);
            box-shadow: 0 6px 0px #CB7910;
        }

        .btn-angle {
            background: linear-gradient(135deg, #4CC9F0, #6EE0FF);
            box-shadow: 0 6px 0px #1E8CB0;
        }

        .btn-reset {
            background: linear-gradient(135deg, #9CA3AF, #D1D5DB);
            box-shadow: 0 6px 0px #6B7280;
        }

        .action-btn:active {
            transform: translateY(6px);
            box-shadow: 0 0px 0px transparent;
        }

        /* ==========================================
           MODUL 2: ENSIKLOPEDIA (UI SPESIFIK)
           ========================================== */
        .encyclopedia-layout {
            display: flex;
            gap: 2rem;
            flex-direction: column;
        }

        @media (min-width: 768px) {
            .encyclopedia-layout {
                flex-direction: row;
            }
        }

        .sidebar-filters {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .filter-btn {
            background-color: transparent;
            border: 2px solid var(--primary);
            padding: 12px 20px;
            border-radius: 8px;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            transition: all 0.3s;
            text-align: left;
        }

        .filter-btn:hover {
            background-color: rgba(0, 229, 255, 0.1);
            color: var(--primary);
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) inset;
        }

        .filter-btn.active {
            background-color: rgba(0, 229, 255, 0.2);
            color: var(--primary);
            border-color: var(--primary);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
            text-shadow: 0 0 8px var(--primary);
        }

        .grid-container {
            flex: 3;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
            gap: 1.5rem;
            align-content: start;
        }

        .shape-card {
            background-color: rgba(13, 22, 38, 0.5);
            border: 1px solid rgba(0, 229, 255, 0.3);
            border-radius: 12px;
            padding: 1.5rem 1rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
            box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
        }

        .shape-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary);
            box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
        }

        .shape-card h4 {
            margin-top: 10px;
            color: var(--text-main);
            font-size: 1rem;
            text-align: center;
        }

        /* Modal Sifat Bangun */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(74, 78, 105, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s;
            backdrop-filter: blur(3px);
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .modal-content {
            background-color: var(--bg-card);
            padding: 2.5rem;
            border-radius: var(--border-radius);
            max-width: 500px;
            width: 90%;
            box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
            transform: scale(0.9);
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            border: 2px solid var(--primary);
        }

        .modal-overlay.active .modal-content {
            transform: scale(1);
        }

        .close-modal {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 2.5rem;
            line-height: 1;
            cursor: pointer;
            color: var(--text-light);
            border: none;
            background: none;
            transition: color 0.2s;
        }

        .close-modal:hover {
            color: #EF4444;
        }

        .modal-body {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1.5rem;
        }

        .modal-body svg {
            width: 120px;
            height: 120px;
            overflow: visible;
        }

        .modal-info {
            width: 100%;
        }

        .modal-info h3 {
            font-size: 1.8rem;
            color: var(--highlight);
            text-align: center;
            margin-bottom: 1rem;
            border-bottom: 2px dashed #E2E8F0;
            padding-bottom: 10px;
        }

        .info-stats {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 1.5rem;
        }

        .stat-badge {
            background-color: rgba(13, 22, 38, 0.8);
            padding: 8px 15px;
            border-radius: 10px;
            font-weight: 600;
            color: var(--text-main);
            border: 1px solid var(--primary);
            box-shadow: 0 0 10px rgba(0, 229, 255, 0.2) inset;
        }

        .stat-badge span {
            color: var(--primary);
            font-size: 1.2rem;
            margin-left: 5px;
        }

        .info-traits h4 {
            margin-bottom: 10px;
            color: var(--text-main);
        }

        .info-traits ul {
            list-style-type: none;
        }

        .info-traits li {
            position: relative;
            padding-left: 25px;
            margin-bottom: 10px;
            line-height: 1.5;
            color: var(--text-main);
        }

        .info-traits li::before {
            content: '⭐';
            position: absolute;
            left: 0;
            top: 2px;
            font-size: 0.9rem;
        }

        /* Pesan Kosong / Placeholder untuk Tab Lain */
        .coming-soon {
            text-align: center;
            padding: 4rem 2rem;
            color: var(--text-light);
        }

        .coming-soon h3 {
            font-size: 2rem;
            color: var(--secondary);
            margin-bottom: 1rem;
        }

        /* ==========================================
           MODUL 3: TANGRAM & DEKOMPOSISI (UI SPESIFIK)
           ========================================== */

        .sub-module-section {
            background-color: rgba(13, 22, 38, 0.5);
            border: 1px solid rgba(0, 229, 255, 0.3);
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.1);
        }

        .sub-module-section h3 {
            color: var(--highlight);
            margin-bottom: 0.5rem;
            font-size: 1.5rem;
        }

        .sub-module-section p {
            margin-bottom: 1.5rem;
            color: var(--text-main);
        }

        /* Tangram Board */
        .tangram-board {
            position: relative;
            width: 100%;
            max-width: 500px;
            height: 400px;
            background-color: rgba(5, 11, 20, 0.8);
            border: 2px solid var(--primary);
            border-radius: 12px;
            margin: 0 auto;
            overflow: hidden;
            box-shadow: inset 0 4px 15px rgba(0, 229, 255, 0.1);
            /* Mencegah scroll saat drag di HP */
            touch-action: none;
        }

        .tangram-shadow-svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            opacity: 0.4;
            pointer-events: none;
        }

        /* Kepingan Tangram */
        .drag-piece {
            position: absolute;
            cursor: grab;
            filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
            /* Animasi saat tidak di-drag */
            transition: filter 0.2s, transform 0.1s ease-out;
            will-change: transform;
        }

        .drag-piece:active,
        .drag-piece.is-dragging {
            cursor: grabbing;
            filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.3));
            z-index: 100 !important;
        }

        /* Misi A (Operasi Dekode) */
        .clickable-line {
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .clickable-line:hover {
            stroke: var(--accent);
            filter: drop-shadow(0 0 8px var(--accent));
        }

        /* Dekomposisi (Joglo) */
        .decomp-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 250px;
            background-color: rgba(5, 11, 20, 0.8);
            border-radius: 12px;
            border: 2px solid var(--primary);
            padding: 2rem;
            box-shadow: inset 0 4px 15px rgba(0, 229, 255, 0.1);
        }

        .joglo-house {
            position: relative;
            width: 140px;
            height: 100px;
            margin-top: 100px;
            /* Space for roof */
        }

        .decomp-static {
            position: relative;
            z-index: 3;
        }

        .decomp-part {
            position: absolute;
            cursor: pointer;
            transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s;
        }

        .decomp-part:hover {
            filter: brightness(1.1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
        }

        .decomp-part.exploded {
            pointer-events: none;
        }

        .decomp-label {
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--highlight);
            color: white;
            padding: 6px 12px;
            border-radius: 10px;
            font-size: 0.9rem;
            font-weight: bold;
            text-align: center;
            opacity: 0;
            transition: opacity 0.5s 0.2s;
            /* delay sedikit agar muncul setelah terbang */
            white-space: nowrap;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        }

        .decomp-label::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: var(--highlight) transparent transparent transparent;
        }

        .decomp-part.exploded .decomp-label {
            opacity: 1;
        }