:root {
    --bg-color: #f6f6e9;
    --text-color: #000000;
    --accent-color: #4a4a4a;
    --dim-text: #666666;
    --font-mono: 'IBM Plex Mono', 'Courier Prime', monospace;
}

/* Security Protection */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: none;
    /* Hide default for desktop */
}

@media (max-width: 1024px) {
    * {
        cursor: auto !important;
        /* Restore cursor for mobile/tablet */
    }
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.security-alert {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #000;
    color: #fff;
    padding: 10px 20px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid #fff;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    letter-spacing: 1px;
}

.security-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 
   ---------------------------------------------------------
   MANUAL FONT SIZE SETTINGS
   Ubah nilai di bawah ini jika ingin mengganti ukuran font secara global
   ---------------------------------------------------------
*/
:root {
    --fs-h1: 1.5rem;
    /* Nama Utama */
    --fs-h2: 1.25rem;
    /* Role/Subtitle di Home */
    --fs-body: 0.95rem;
    /* Teks paragraf/bio */
    --fs-meta: 0.7rem;
    /* Teks kecil (Version, Port, Status) */
    --fs-item-title: 1.1rem;
    /* Judul Edukasi/Work di Home */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-mono);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: var(--fs-body);
}

.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--text-color) 0.5px, transparent 0.5px);
    background-size: 30px 30px;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
    cursor: auto;
    /* Show cursor in loader if needed, or keep hidden */
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-color);
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s ease-out;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1024px) {
    .custom-cursor {
        display: none !important;
    }
}

.custom-cursor::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--text-color);
}

.custom-cursor.hover {
    transform: scale(1.5);
    background: rgba(0, 0, 0, 0.1);
}

.loader-content {
    text-align: center;
}

.loader-binary::after {
    content: "010101";
    animation: binary-flicker 0.2s steps(4) infinite;
}

@keyframes binary-flicker {
    0% {
        content: "101101";
    }

    25% {
        content: "011010";
    }

    50% {
        content: "110011";
    }

    75% {
        content: "001100";
    }
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* --- HUD HEADER --- */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 20px;
    margin-bottom: 10px;
    /* Reduced from 40px */
}

.hud-header h1 {
    font-size: var(--fs-h1);
    font-weight: 700;
}

.header-status-area {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-row {
    font-size: 0.65rem;
    color: var(--dim-text);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.status-row b {
    font-weight: 700;
    color: var(--text-color);
    margin-left: 2px;
}

.green-status b {
    color: #4CAF50;
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-temporal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

#site-time {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 1px;
}

#site-date {
    font-size: 0.8rem;
    color: var(--dim-text);
    font-weight: 500;
}

.site-metadata {
    font-size: var(--fs-meta);
    color: var(--dim-text);
    display: flex;
    flex-direction: column;
}

/* --- MARQUEE --- */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background: transparent;
    padding: 5px 0;
    /* Reduced padding */
    margin-bottom: 0px;
    /* Removed margin */
}

.marquee-content {
    display: inline-block;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 2px;
    animation: marquee-ltr 30s linear infinite;
}

@keyframes marquee-ltr {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100vw);
    }
}

.global-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

/* --- HOME PAGE STYLES (RESTORED) --- */
.home-hero {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 60px;
}

.profile-container {
    flex-shrink: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border: 1px solid var(--text-color);
}

.hero-info h2 {
    font-size: var(--fs-h2);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.hero-bio {
    max-width: 700px;
    margin-bottom: 25px;
    color: var(--accent-color);
    line-height: 1.8;
    transition: transform 0.3s ease, color 0.3s ease;
}

.hero-bio:hover {
    transform: scale(1.01);
    color: var(--text-color);
}

.hero-links {
    display: flex;
    gap: 20px;
}

.hero-links a {
    color: var(--text-color);
    text-decoration: underline;
    font-size: 0.8rem;
    font-weight: bold;
}

.sections-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 40px;
}

.content-section {
    animation: section-fade-in 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes section-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-label {
    font-size: 0.7rem;
    color: var(--dim-text);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: default;
}

.section-label:hover {
    color: var(--text-color);
    transform: scale(1.1);
    transform-origin: left;
    letter-spacing: 2px;
}

.item-row {
    margin-bottom: 40px;
    position: relative;
    padding-left: 0px;
    transition: all 0.3s ease;
}

.item-row:hover {
    padding-left: 5px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.item-title {
    font-weight: 700;
    font-size: var(--fs-item-title);
    transition: all 0.3s ease;
}

.item-row:hover .item-title {
    transform: scale(1.05);
    transform-origin: left;
}

.item-date {
    font-size: 0.85rem;
    color: var(--dim-text);
}

.item-subtitle {
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.item-row:hover .item-subtitle {
    transform: scale(1.02);
    transform-origin: left;
    color: var(--text-color);
}

.item-details {
    font-size: 0.85rem;
    color: var(--dim-text);
    max-width: 750px;
    margin-bottom: 10px;
}

.bullet-list {
    list-style: none;
    margin-top: 15px;
    max-width: 750px;
    /* Restrict width as per user request */
    width: 100%;
}

.bullet-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
    color: var(--accent-color);
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bullet-list li:hover {
    transform: scale(1.03) translateX(10px);
    color: var(--text-color);
}

.bullet-list li::before {
    content: ">";
    font-weight: 700;
    position: absolute;
    left: 0;
    color: var(--text-color);
}

/* --- ABOUT PAGE --- */
.about-content {
    max-width: 750px;
    font-size: 1.05rem;
    white-space: pre-line;
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.about-content:hover {
    color: var(--text-color);
    transform: scale(1.01);
    transform-origin: left;
}

/* --- PROJECTS PAGE (TERMINAL STYLE) --- */
.project-page-container {
    width: 100%;
}

.project-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.project-divider-main {
    height: 2px;
    background: var(--text-color);
    margin-bottom: 30px;
}

/* Global scope but specific structure for Projects */
.projects-detailed-list .project-detail-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 40px !important;
    padding: 30px 0 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    align-items: flex-start !important;
}

.proj-col-meta {
    flex: 1.2;
}

.proj-col-source {
    flex: 1;
}

.proj-col-summary {
    flex: 2;
}

.proj-idx-date {
    font-size: 0.65rem;
    color: var(--dim-text);
    margin-bottom: 10px;
    font-weight: bold;
}

.proj-name {
    font-size: 1.4rem;
    font-weight: 800;
}

.proj-sub-label {
    font-size: 0.6rem;
    color: var(--dim-text);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.proj-source-val {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.proj-tags {
    display: flex;
    gap: 8px;
}

.proj-tag {
    font-size: 0.6rem;
    border: 1px solid var(--text-color);
    padding: 2px 6px;
    font-weight: bold;
}

.proj-summary-text {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 550px;
    /* Limit width for project summary */
    color: var(--accent-color);
    transition: all 0.3s ease;
}

.proj-summary-text:hover {
    color: var(--text-color);
    transform: scale(1.03);
    transform-origin: left;
}

.project-bottom-hud {
    display: flex;
    gap: 20px;
    margin-top: 60px;
}

.hud-square {
    flex: 1;
    border: 1px solid rgba(0, 0, 0, 0.1);
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 15px;
}

.hud-square.solid-black {
    background: #000;
    color: #fff;
}

.hud-square.gray-bg {
    background: #eaebdc;
    align-items: flex-start;
}

.project-footer-terminal {
    display: none;
    /* Removed in favor of global footer */
}

.global-copyright {
    display: flex;
    justify-content: space-between;
    font-size: 0.5rem;
    margin-top: 25px;
    color: var(--dim-text);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.copyright-right {
    font-weight: 700;
    color: var(--text-color);
}

/* --- FOOTER & NAV --- */
.hud-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
    margin-top: 40px;
}

.nav-btn {
    background: none;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-indicator {
    font-size: 0.65rem;
    color: var(--dim-text);
    letter-spacing: 2px;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .home-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .project-detail-row {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .project-bottom-hud {
        flex-wrap: wrap;
    }

    .hud-square {
        flex: 1 1 40%;
    }

    .bullet-list,
    .item-details,
    .proj-summary-text {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hud-header {
        flex-direction: column;
        gap: 25px;
    }

    .header-right {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
        gap: 20px;
    }

    .site-temporal {
        align-items: flex-start;
        flex: 1;
        order: 2;
        /* Time on the right side */
        text-align: right;
    }

    .site-metadata {
        flex: 1;
        order: 1;
        /* Metadata on the left side */
    }

    #site-time {
        font-size: 1.1rem;
    }

    #site-date {
        font-size: 0.7rem;
    }

    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .item-date {
        margin-bottom: 10px;
    }
}

/* --- GAMES PAGE --- */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.game-btn {
    background: transparent;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    padding: 80px 20px;
    font-size: 1.2rem;
    font-weight: bold;
    font-family: var(--font-mono);
    cursor: none;
    /* Inherit global custom cursor */
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.game-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-btn {
        padding: 50px 20px;
    }
}

/* --- IN-GAME PAGE --- */
.game-container {
    width: 100%;
    height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #000;
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.quit-btn-container {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 20px;
}

.quit-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: bold;
    font-family: var(--font-mono);
    cursor: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.3s ease;
}

.quit-btn:hover {
    transform: translateX(-5px);
}

/* In-Game Mode Overrides */
body.mode-ingame .app-container {
    padding: 20px 20px;
    /* Reduce padding for more game space */
    max-width: 1400px;
    /* Widen container */
}

body.mode-ingame .hud-header {
    padding-bottom: 10px;
    margin-bottom: 10px;
}

body.mode-ingame .hud-header h1 {
    font-size: 1.1rem;
}

body.mode-ingame .site-metadata,
body.mode-ingame .header-status-area {
    transform: scale(0.9);
    transform-origin: left top;
}

body.mode-ingame .game-container {
    height: 75vh;
}

body.mode-ingame .global-copyright {
    margin-top: 10px;
}

body.mode-ingame .hud-footer {
    display: none;
    /* Hide main nav footer in-game, replaced by quit button */
}