:root {
    --gold: #ffd700;
    --royal-blue: #00f2ff;
    --imperial-red: #ff0044;
    --security-green: #00ff88;
    --dark-bg: #00050a;
    --terminal-bg: rgba(0, 15, 30, 0.85);
}

* {
    box-sizing: border-box;
    cursor: crosshair; /* ស្ទីលកណ្តុរបែបផ្ទាំងបញ្ជា */
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--dark-bg);
    color: var(--royal-blue);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden; /* ការពារកុំឱ្យមាន Scrollbar */
}

/* --- ១. បែបផែនស្កេនអេក្រង់ (Scanline Effect) --- */
body::before {
    content: " ";
    display: block;
    position: absolute;
    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.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 1000;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
}

/* --- ២. ផ្ទាំង Monitor មេ --- */
.monarch-monitor {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1100px;
    margin: 30px auto;
    padding: 25px;
    background: var(--terminal-bg);
    border: 1px solid var(--royal-blue);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2), inset 0 0 40px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    transition: all 0.5s ease;
}

/* --- ៣. ផ្នែកក្បាលនៃ Dashboard --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0, 242, 255, 0.3);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

#live-clock {
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
    font-weight: bold;
}

#status-tag {
    font-size: 12px;
    letter-spacing: 2px;
    padding: 5px 15px;
    border: 1px solid var(--royal-blue);
    transition: 0.5s;
}

/* --- ៤. Terminal បញ្ជាការ --- */
#main-terminal {
    height: 350px;
    background: rgba(0, 5, 10, 0.9);
    border-left: 3px solid var(--gold);
    padding: 15px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 1);
}

#main-terminal p {
    margin: 5px 0;
    animation: textAppear 0.3s ease-out forwards;
}

@keyframes textAppear {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- ៥. ប៊ូតុងរាជវង្ស (Royal Buttons) --- */
.control-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.royal-btn {
    background: rgba(0, 242, 255, 0.05);
    border: 1px solid var(--royal-blue);
    color: var(--royal-blue);
    padding: 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.royal-btn:hover {
    background: rgba(0, 242, 255, 0.2);
    box-shadow: 0 0 15px var(--royal-blue);
    color: #fff;
}

.royal-btn:active {
    transform: scale(0.95);
}

/* --- ៦. ប្រព័ន្ធ Hologram នៃយានអវកាស --- */
#hologram-display {
    position: fixed;
    bottom: 30px;
    right: 30px;
    border: 1px solid var(--royal-blue);
    background: radial-gradient(circle, rgba(0, 242, 255, 0.1) 0%, rgba(0,0,0,0.8) 100%);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.3);
    border-radius: 5px;
    animation: hologramFloat 3s infinite ease-in-out;
}

@keyframes hologramFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

#spacecraft-hologram {
    opacity: 0.7;
    filter: drop-shadow(0 0 10px var(--royal-blue)) brightness(1.2);
}

/* --- ៧. របាររំកិល (Scrollbar Custom) --- */
::-webkit-scrollbar {
    width: 5px;
}
::-webkit-scrollbar-track {
    background: #000;
}
::-webkit-scrollbar-thumb {
    background: var(--royal-blue);
    box-shadow: 0 0 10px var(--royal-blue);
}
