/* --- RESET & COLOR PALETTE (Agency Green & Dark Obsidian) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Consolas, Monaco, monospace;
}

:root {
    --bg-color: #050a07;
    --panel-bg: rgba(10, 25, 16, 0.85);
    --accent-color: #10b981;
    /* Emerald Neon */
    --dim-accent: rgba(16, 185, 129, 0.2);
    --alert-color: #ef4444;
    /* Red Classified */
    --text-main: #d1fae5;
    --text-muted: #047857;

    /* DEFCON Colors (Dynamic) */
    --defcon-color: #10b981;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    position: relative;
}

/* --- SCANLINE & GRID OVERLAY --- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    z-index: 8000;
    background-size: 100% 3px, 6px 100%;
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 7999;
}

/* --- 1. INTELLIGENCE PRELOADER --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #020503;
    background-image: radial-gradient(var(--dim-accent) 1px, transparent 0);
    background-size: 24px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.agency-box {
    border: 1px solid var(--accent-color);
    padding: 30px;
    background: rgba(4, 15, 9, 0.95);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.15);
    width: 90%;
    max-width: 480px;
    position: relative;
}

.agency-box::before {
    content: "TOP SECRET // NOFORN";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--alert-color);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    letter-spacing: 1.5px;
}

.reticle {
    width: 60px;
    height: 60px;
    border: 2px dashed var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spinReticle 6s linear infinite;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reticle::after {
    content: "";
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

@keyframes spinReticle {
    100% {
        transform: rotate(360deg);
    }
}

.agency-status {
    font-size: 0.85rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.log-line {
    font-size: 0.75rem;
    color: #6ee7b7;
    min-height: 20px;
    border-left: 2px solid var(--accent-color);
    padding-left: 8px;
    text-align: left;
}

/* --- 2. MAIN TERMINAL CONTAINER --- */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.top-bar .clearance {
    color: var(--alert-color);
    font-weight: bold;
}

/* --- DEFCON HUD INDICATOR --- */
.defcon-hud {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px 10px;
    border: 1px solid var(--defcon-color);
    border-radius: 2px;
    transition: all 0.5s ease;
}

.defcon-badge {
    color: var(--defcon-color);
    font-weight: bold;
    letter-spacing: 1px;
}

.defcon-ping {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.defcon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--defcon-color);
    box-shadow: 0 0 8px var(--defcon-color);
    animation: blinkDot 1.5s infinite alternate;
}

@keyframes blinkDot {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* --- AUDIO BGM FLOATING CONTROL --- */
.audio-hud-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(4, 15, 9, 0.9);
    border: 1px solid var(--accent-color);
    padding: 8px 14px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(5px);
}

.audio-status-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.audio-btn {
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.audio-btn:hover {
    background: var(--accent-color);
    color: #020503;
    box-shadow: 0 0 8px var(--accent-color);
}

header {
    margin-bottom: 40px;
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
}

header h1 {
    font-size: 2.2rem;
    color: var(--accent-color);
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.3);
    margin-bottom: 8px;
}

header p {
    color: #a7f3d0;
    font-size: 0.95rem;
}

/* --- SECTIONS STYLING --- */
.section-title {
    color: var(--accent-color);
    font-size: 1.2rem;
    letter-spacing: 2px;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.3);
    padding-bottom: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title .tag {
    font-size: 0.7rem;
    background: var(--dim-accent);
    padding: 2px 8px;
    border-radius: 2px;
    color: #6ee7b7;
}

/* --- PANEL TENTANG SAYA (AGENT PROFILE) --- */
.profile-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 25px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.profile-panel.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- GLITCH AVATAR STYLING --- */
.avatar-frame {
    width: 110px;
    height: 130px;
    border: 2px solid var(--accent-color);
    background: #020503;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.glitch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(120%) brightness(90%);
    display: block;
}

.avatar-frame::before,
.avatar-frame::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-image: inherit;
    opacity: 0.8;
    pointer-events: none;
}

.avatar-frame::before {
    left: 2px;
    text-shadow: -2px 0 red;
    clip-path: rect(24px, 110px, 90px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

.avatar-frame::after {
    left: -2px;
    text-shadow: -2px 0 #38bdf8;
    clip-path: rect(85px, 110px, 140px, 0);
    animation: glitch-anim2 3s infinite linear alternate-reverse;
}

.avatar-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.6) 51%);
    background-size: 100% 4px;
    pointer-events: none;
}

@keyframes glitch-anim {
    0% {
        clip-path: inset(40% 0 61% 0);
        transform: skew(0.3deg);
    }

    20% {
        clip-path: inset(92% 0 1% 0);
        transform: skew(-0.5deg);
    }

    40% {
        clip-path: inset(10% 0 80% 0);
        transform: translate(-2px, 2px);
    }

    60% {
        clip-path: inset(25% 0 58% 0);
        transform: translate(2px, -1px);
    }

    80% {
        clip-path: inset(54% 0 7% 0);
        transform: skew(0.8deg);
    }

    100% {
        clip-path: inset(58% 0 43% 0);
        transform: translate(0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip-path: inset(25% 0 58% 0);
        transform: translate(-1px, 1px);
    }

    30% {
        clip-path: inset(70% 0 10% 0);
        transform: skew(0.5deg);
    }

    50% {
        clip-path: inset(5% 0 85% 0);
        transform: translate(2px, 0);
    }

    70% {
        clip-path: inset(45% 0 30% 0);
        transform: skew(-0.8deg);
    }

    100% {
        clip-path: inset(12% 0 75% 0);
        transform: translate(0);
    }
}

.profile-details {
    flex: 1;
    min-width: 250px;
}

.profile-details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.profile-details td {
    padding: 6px 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
}

.profile-details td.label {
    color: var(--text-muted);
    width: 35%;
    font-weight: bold;
}

.profile-details td.value {
    color: #a7f3d0;
}

/* --- PANEL LOCATION COORDINATE SENSOR --- */
.location-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 20px;
    margin-top: 20px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.location-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.location-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

.location-coords {
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.location-status {
    font-size: 0.75rem;
    color: #6ee7b7;
}

.geo-btn {
    padding: 8px 16px;
    font-size: 0.75rem;
    width: auto;
}

/* --- PANEL BIOGRAFI / LATAR BELAKANG --- */
.bio-panel {
    background: var(--panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 25px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.bio-panel.show {
    opacity: 1;
    transform: translateY(0);
}

.bio-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.2);
    padding-bottom: 8px;
}

.bio-content p {
    color: #a7f3d0;
    font-size: 0.88rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.bio-content p:last-child {
    margin-bottom: 0;
}

.highlight-text {
    color: var(--accent-color);
    font-weight: bold;
}

/* --- GRID PROJEK (DOSSIERS) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 20px;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.card.show {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(16, 185, 129, 0.2);
    padding-bottom: 5px;
}

.card h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.card p {
    color: #a7f3d0;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* --- PANEL HUBUNGI SAYA (ENCRYPTED COMMS) --- */
.comms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.comms-card {
    background: var(--panel-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.comms-card.show {
    opacity: 1;
    transform: translateY(0);
}

.comms-card:hover {
    border-color: var(--accent-color);
    background: rgba(16, 185, 129, 0.08);
}

.comms-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

/* --- BUTTONS & DIRECT LINKS --- */
.btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    position: relative;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--accent-color);
    color: #020503;
    box-shadow: 0 0 10px var(--accent-color);
}

.btn:active {
    transform: scale(0.98);
}

footer {
    margin-top: 60px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    padding-top: 20px;
}
