/* style.css - Cyber-Hacker Edition */

/* --- FONT FACE --- */
@font-face {
    font-family: 'AmigaFont';
    src: url('../fonts/MicroKnightPlus_v1.0.eot');
    src: url('../fonts/MicroKnightPlus_v1.0?#iefix') format('embedded-opentype'),
         url('../fonts/MicroKnightPlus_v1.0.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --amiga-bg: #091833; /* Midnight Blue */
    --amiga-blue: #133e7c; /* Deep Corporate Blue */
    --amiga-fg: #0abdc6; /* Neon Cyan */
    
    /* CYBERPUNK SYNTHWAVE PALETTE (16 COLORS) */
    --color-0: #091833; /* Midnight Black */
    --color-1: #711c91; /* Deep Purple */
    --color-2: #067d82; /* Dark Teal */
    --color-3: #0d2b52; /* Darker Blue */
    --color-4: #133e7c; /* Deep Blue */
    --color-5: #9d0092; /* Darker Pink */
    --color-6: #0abdc6; /* Neon Cyan */
    --color-7: #711c91; /* Purple Accent */
    --color-8: #133e7c; /* Blue Accent */
    --color-9: #ea00d9; /* Hot Pink */
    --color-10: #0abdc6; /* Bright Cyan */
    --color-11: #711c91; /* Bright Purple */
    --color-12: #133e7c; /* Bright Blue */
    --color-13: #ea00d9; /* Neon Magenta */
    --color-14: #0abdc6; /* Neon Cyan */
    --color-15: #ffffff; /* Stark White */
}

body {
    background-color: #050c1a; /* Even darker bezel */
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    
    /* GLOBAL PIXELATION ENFORCER */
    image-rendering: pixelated; 
}
.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url(../img/bbs_bg.jpg) center / cover no-repeat;
    z-index: -1;
    animation: fadeIn 1.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- THE MONITOR (Scaled Up) --- */
.monitor {
    width: 1280px;
    height: 640px;
    background-color: var(--amiga-bg);
    position: relative;
    border: 1px solid #133e7c; /* Blue hardware edge */
    
    /* Default Desktop Scale */
    transform: scale(1.4); 
    transform-origin: center center;
    
    overflow: hidden;
    box-shadow: 0 0 50px rgba(10, 189, 198, 0.2);
}

/* --- SHARP SCANLINES --- */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 1px,
        rgba(0, 0, 0, 0.3) 1px, 
        rgba(0, 0, 0, 0.3) 2px
    ),
    radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.5) 100%);
}

.screen-content {
    padding: 10px;
    padding-top: 24px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    
    font-family: 'AmigaFont', monospace;
    font-size: 16px; 
    line-height: 16px;
    
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    
    color: var(--amiga-fg);
    overflow-y: auto;
    padding-bottom: 24px;
}

/* Hide Scrollbar */
.screen-content::-webkit-scrollbar { width: 0px; }

/* --- TYPOGRAPHY COLORS --- */
.c0 { color: var(--color-0); }
.c1 { color: var(--color-1); }
.c2 { color: var(--color-2); }
.c3 { color: var(--color-3); }
.c4 { color: var(--color-4); }
.c5 { color: var(--color-5); }
.c6 { color: var(--color-6); }
.c7 { color: var(--color-7); }
.c8 { color: var(--color-8); }
.c9 { color: var(--color-9); }
.c10 { color: var(--color-10); }
.c11 { color: var(--color-11); }
.c12 { color: var(--color-12); }
.c13 { color: var(--color-13); }
.c14 { color: var(--color-14); }
.c15 { color: var(--color-15); }

/* Compatibility classes for old code */
.c-cyan    { color: var(--color-14); }
.c-magenta { color: var(--color-13); }
.c-white   { color: var(--color-15); font-weight: bold; }
.c-blue    { color: var(--color-12); }

/* --- STATUS BAR --- */
.status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 18px;
    background-color: var(--amiga-blue);
    border-bottom: 2px solid #ea00d9; /* Neon Pink highlight */
    display: flex;
    align-items: center;
    padding: 0 4px;
    box-sizing: border-box;
    z-index: 60;
    font-family: 'AmigaFont', monospace;
    font-size: 16px;
    white-space: pre;
    overflow: hidden;
}

.status-info {
    flex-shrink: 0;
    margin-right: 10px;
    background-color: var(--amiga-blue);
    z-index: 61;
}

.ticker-wrap {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

@keyframes tickerMove {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    animation: tickerMove 20s linear infinite;
    color: #ea00d9; /* Ticker is now Hot Pink */
}

/* --- INPUT BAR (Workbench Style) --- */
.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 18px; 
    
    display: flex;
    align-items: center;
    
    background-color: var(--amiga-blue);
    border-top: 2px solid #ea00d9; /* Neon Pink highlight */
    
    padding: 0 4px;
    box-sizing: border-box;
    z-index: 60; 
}

.prompt-label {
    color: #ffffff;
    font-family: 'AmigaFont', monospace;
    font-size: 16px;
    white-space: pre;
    margin-top: -2px; 
}

#cmd-input {
    background: transparent;
    border: none;
    outline: none;
    
    font-family: 'AmigaFont', monospace;
    font-size: 16px;
    color: #0abdc6; /* Input text is Neon Cyan */
    
    flex-grow: 1;
    margin: 0;
    padding: 0;
    margin-top: -2px; 
    
    caret-color: #ea00d9; /* Pink cursor */
}

/* --- GLITCH EFFECTS --- */
@keyframes crtGlitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 1px) }
    40% { transform: translate(-1px, -1px) }
    60% { transform: translate(2px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}
.glitch {
    animation: crtGlitch 0.2s cubic-bezier(.25, .46, .45, .94) both infinite;
    color: #ea00d9 !important; /* Glitch highlights in pink */
}

.glitch-effect {
    animation: crtGlitch 0.15s cubic-bezier(.25, .46, .45, .94) both infinite;
    filter: hue-rotate(90deg) contrast(150%);
}

/* --- THEME: BLOOD ICE --- */
body.theme-red .monitor {
    border-color: #ff0000;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3), inset 0 0 50px rgba(255, 0, 0, 0.2);
}

body.theme-red .screen {
    background: #1a0000;
}

body.theme-red .status-bar {
    background: #330000;
    border-bottom-color: #ff0000;
}

body.theme-red .input-area {
    background: #330000;
    border-top-color: #ff0000;
}

body.theme-red .prompt-label, 
body.theme-red #cmd-input {
    color: #ff3333;
}

body.theme-red .c15, body.theme-red .c7 { color: #ffcccc; } /* White/Gray becomes Pinkish-White */
body.theme-red .c10 { color: #ff6666; } /* Green becomes Soft Red */
body.theme-red .c14 { color: #ff0000; } /* Cyan becomes Bright Red */

/* --- EXTERNAL UI --- */
.discord-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #133e7c;
    color: #0abdc6;
    border: 2px solid #ea00d9;
    padding: 10px 20px;
    font-family: 'AmigaFont', monospace;
    font-size: 14px;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 0 15px rgba(234, 0, 217, 0.4);
    transition: all 0.2s ease;
}

.discord-btn:hover {
    background-color: #ea00d9;
    color: #091833;
    box-shadow: 0 0 25px rgba(234, 0, 217, 0.8);
    transform: scale(1.05);
}

/* --- MP3 PLAYER (Amiga Style) --- */
#player {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 18px;

    background: rgba(19, 62, 124, 0.9); /* var(--amiga-blue) with opacity */
    backdrop-filter: blur(8px);
    border: 1px solid #ea00d9;
    border-top: none;
    border-radius: 0 0 8px 8px;

    padding: 6px 16px;
    white-space: nowrap;

    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-family: 'AmigaFont', monospace;
}

#now-playing {
    font-size: 10px;
    color: #ea00d9;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#track-name {
    font-size: 12px;
    color: #0abdc6;
    letter-spacing: 0.04em;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #0abdc6;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    line-height: 0;
}

.btn:hover {
    color: #ffffff;
    background: rgba(234, 0, 217, 0.2);
}

.btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

#play-btn svg {
    width: 16px;
    height: 16px;
}

.divider {
    width: 1px;
    height: 18px;
    background: #ea00d9;
    opacity: 0.4;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #133e7c;
    border: 1px solid #ea00d9;
    flex-shrink: 0;
    transition: background 0.3s;
}

.dot.playing {
    background: #ea00d9;
    box-shadow: 0 0 8px #ea00d9;
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 1800px) {
    .monitor {
        transform: scale(1.2);
    }
}

@media (max-width: 1500px) {
    .monitor {
        transform: scale(1.0);
    }
}

@media (max-width: 1300px) {
    .monitor {
        width: 100vw;
        height: 100vh;
        border: none;
        box-shadow: none;
        transform: scale(1.0);
    }
}

@media (max-width: 800px) {
    .screen-content {
        font-size: 12px;
        line-height: 14px;
        padding: 5px;
        padding-top: 20px;
    }
    
    .status-bar, .input-area, .prompt-label, #cmd-input {
        font-size: 12px;
        height: 16px;
    }

    .discord-btn {
        bottom: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 10px;
    }
}

@media (max-width: 500px) {
    .status-info {
        font-size: 10px;
    }
    
    .screen-content {
        font-size: 10px;
        line-height: 12px;
    }
}