:root {
    --bg-color: #f7f1e3; /* Creme suave */
    --grid-line: #d1ccc0;
    
    /* Cores da Dock */
    --c-pink: #ff9ff3;
    --c-blue: #54a0ff;
    --c-dark: #222f3e;
    --c-beige: #feca57;
    
    --border: 2px solid #000;
    --shadow-hard: 4px 4px 0px #000;
    --radius: 10px;
}

* { box-sizing: border-box; user-select: none; }

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 30px 30px;
    height: 100vh;
    overflow: hidden;
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: #000;
}

/* --- DESKTOP ICONS --- */
#desktop {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    height: calc(100vh - 100px);
    gap: 15px;
}

.desktop-icon {
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
    margin-bottom: 10px;
}

.desktop-icon:hover .d-icon-bg {
    transform: scale(1.1);
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.d-icon-bg {
    width: 50px; height: 50px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
    transition: transform 0.1s, box-shadow 0.1s;
    margin-bottom: 5px;
}

.desktop-icon span {
    font-size: 16px;
    color: #000;
    background: rgba(255,255,255,0.7);
    padding: 0 4px;
    border-radius: 2px;
}

/* Cores específicas para ícones do Desktop */
.bg-pink { background-color: var(--c-pink); color: #000; }
.bg-blue { background-color: var(--c-blue); color: #000; }
.bg-dark { background-color: var(--c-dark); color: #fff; }
.bg-beige { background-color: var(--c-beige); color: #000; }

/* --- WIDGET RELÓGIO --- */
#desktop-widget {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    background: #fff;
    border: var(--border);
    padding: 10px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
}
.widget-time { font-size: 32px; font-weight: bold; line-height: 1; }
.widget-date { font-size: 16px; color: #666; letter-spacing: 2px; }


/* --- DOCK --- */
#dock-container {
    position: absolute; bottom: 30px; width: 100%;
    display: flex; justify-content: center; z-index: 1000;
    pointer-events: none;
}
.dock {
    background: #fff;
    border: var(--border);
    border-radius: 20px;
    padding: 12px;
    display: flex; gap: 15px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.15);
    pointer-events: auto;
    align-items: center;
}

.dock-item {
    display: flex; flex-direction: column; align-items: center;
    position: relative; cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.7, 1);
}
.dock-item:hover { transform: translateY(-5px); }

.dock-icon {
    width: 60px; height: 60px;
    border: var(--border);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0px -4px 0px rgba(0,0,0,0.2);
}

.dock-divider {
    width: 2px; height: 40px; background: #eee;
    border-left: 1px solid #ccc;
}

.active-dot {
    width: 6px; height: 6px; background: #000;
    border-radius: 50%; margin-top: 8px;
    position: absolute; bottom: -12px;
}
.active-dot.hidden { opacity: 0; }

.tooltip {
    position: absolute; top: -40px;
    background: #000; color: #fff;
    padding: 4px 8px; border-radius: 4px;
    font-size: 14px; opacity: 0; transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
}
.dock-item:hover .tooltip { opacity: 1; }

/* --- JANELAS (Redimensionáveis) --- */
.window {
    position: absolute;
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: popUp 0.2s ease-out;
    
    /* Permite redimensionar */
    resize: both; 
    overflow: auto;
    min-width: 200px;
    min-height: 150px;
}
.window.square-mode {
    border-radius: 0 !important;
}

.window::-webkit-resizer {
    background-color: transparent;
    border-bottom: 2px solid #000;
    border-right: 2px solid #000;
    border-bottom-right-radius: 8px;
}

@keyframes popUp { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.window.hidden { display: none !important; }

.window-resize {
    position: absolute;
    bottom: 0; right: 0;
    width: 18px; height: 18px;
    cursor: nwse-resize;
    background:
        linear-gradient(135deg,
            transparent 0%, transparent 50%,
            #000 50%, #000 58%,
            transparent 58%, transparent 68%,
            #000 68%, #000 76%,
            transparent 76%, transparent 86%,
            #000 86%, #000 94%,
            transparent 94%);
    z-index: 10;
}

.title-bar {
    height: 36px;
    background: #fff;
    border-bottom: var(--border);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    cursor: grab;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.title-bar:active { cursor: grabbing; }

.title-lines {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(0deg, transparent 50%, rgba(0,0,0,0.05) 50%);
    background-size: 4px 4px;
    pointer-events: none;
    z-index: 0;
}
.dark-bar { background: var(--c-dark); border-bottom: 2px solid #000; }
.dark-lines { background-image: linear-gradient(0deg, transparent 50%, rgba(255,255,255,0.1) 50%); }

.title-txt {
    font-weight: bold; z-index: 1; font-size: 18px; letter-spacing: 1px;
    background: #fff; padding: 0 5px; border: 1px solid #000; border-radius: 4px;
    margin-left: 5px; box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
.dark-bar .title-txt { background: #000; border: 1px solid #555; color: #fff; }

.controls { display: flex; gap: 6px; z-index: 1; }

.controls button {
    width: 22px; height: 22px;
    border: 2px solid #000; 
    border-radius: 50%;
    cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    transition: transform 0.1s;
    box-shadow: 1px 1px 0px rgba(0,0,0,0.2);
}
.controls button:active { transform: scale(0.9); box-shadow: none; }
.controls button:hover { border-color: #fff; }

.btn-close { background: #ff6b6b; }
.btn-close::before, .btn-close::after {
    content: ''; position: absolute; width: 12px; height: 2px;
    background: #000; left: 50%; top: 50%;
}
.btn-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.btn-close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.btn-min { background: #feca57; }
.btn-min::before {
    content: ''; position: absolute; width: 10px; height: 2px;
    background: #000; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
}

.window-content { flex-grow: 1; padding: 15px; overflow: auto; }
.bg-paper { background: #fff; }
.bg-term {
    background: #1e272e;
    color: #0be881;
    font-family: 'Courier New', monospace;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    box-sizing: border-box;
    user-select: text;
}
#term-output { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.35; }
.term-row { white-space: pre-wrap; }
.term-line { display: flex; align-items: center; font-size: 15px; line-height: 1.35; }
.term-prompt { color: #ff9ff3; flex-shrink: 0; white-space: pre; }
.term-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #0be881;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    padding: 0;
    caret-color: #0be881;
}

/* --- FILE MANAGER --- */
.fm-toolbar {
    padding: 8px; border-bottom: 2px solid #000;
    background: #eee; display: flex; gap: 10px;
    flex-shrink: 0;
}
.fm-toolbar button {
    font-family: 'VT323'; font-size: 18px; border: 2px solid #000;
    background: #fff; cursor: pointer; box-shadow: 2px 2px 0 rgba(0,0,0,0.1);
}
.fm-toolbar button:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.1); }
.fm-toolbar input {
    flex-grow: 1; font-family: 'Courier New'; font-weight: bold;
    border: 2px inset #ccc; padding: 2px 5px;
}

.file-grid { display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; }
.file-obj {
    width: 90px; text-align: center; cursor: pointer;
    padding: 5px; border: 1px solid transparent; border-radius: 6px;
    overflow: hidden;
}
.file-obj span {
    display: block;
    font-size: 15px;
    line-height: 1.05;
    word-break: break-all;
    overflow-wrap: anywhere;
    max-height: 2.4em;
    overflow: hidden;
}
.file-obj:hover { background: #e0e0e0; border: 1px dashed #000; }
.status-bar {
    background: #eee; border-top: 2px solid #000;
    padding: 2px 10px; font-size: 14px;
    flex-shrink: 0;
}

/* --- NOTEPAD --- */
.notepad-menu {
    padding: 5px; background: #eee; border-bottom: 1px solid #000;
    display: flex; align-items: center; flex-shrink: 0;
}
.notepad-menu button {
    font-family: 'VT323'; font-size: 18px; border: 1px solid #000;
    background: #fff; cursor: pointer; padding: 0 10px;
}
.notepad-menu button:hover { background: #ddd; }
.notepad-area {
    width: 100%; flex-grow: 1;
    border: none; padding: 10px;
    font-family: 'Courier New', monospace; font-size: 16px;
    resize: none; outline: none;
    line-height: 1.5;
}

/* --- VISUALIZADOR DE IMAGENS --- */
.btn-img-nav {
    font-family: 'VT323';
    font-size: 18px;
    border: 1px solid #000;
    background: #fff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    margin-right: 2px;
}
.btn-img-nav:hover { background: #ddd; }
.btn-img-nav:active { background: #aaa; }

/* --- PLAYER STYLE --- */
.bg-dark-grey {
    background: #2d3436;
    color: #55efc4; 
    font-family: 'VT323', monospace;
}
.winamp-display {
    background: #000; padding: 10px; margin: 5px;
    border: 2px inset #555; position: relative; height: 100px;
    flex-shrink: 0;
}
#visualizer {
    background: #111; border: 1px solid #333;
    position: absolute; top: 10px; left: 10px;
}
.winamp-info {
    position: absolute; top: 10px; right: 10px;
    width: 140px; display: flex; gap: 5px;
}
.wa-timer {
    font-size: 38px; line-height: 0.9; color: #55efc4;
    text-shadow: 0 0 5px rgba(85, 239, 196, 0.5);
    flex-grow: 1; text-align: right;
}
.wa-kbps, .wa-khz { font-size: 10px; color: #aaa; line-height: 1.1; }
.wa-marquee-container {
    position: absolute; bottom: 10px; left: 10px; right: 10px;
    height: 20px; background: #111; border: 1px solid #333;
    overflow: hidden; white-space: nowrap;
}
.wa-marquee {
    display: inline-block; padding-left: 100%;
    animation: marquee 10s linear infinite; font-size: 16px; line-height: 18px;
}
@keyframes marquee { 0% { transform: translate(0, 0); } 100% { transform: translate(-100%, 0); } }

.winamp-controls { padding: 5px 10px; flex-shrink: 0; }
.wa-actions-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }

input[type=range] { -webkit-appearance: none; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; }
#wa-seek { width: 100%; height: 10px; background: #000; border: 1px solid #555; margin-bottom: 8px; cursor: pointer; }
#wa-seek::-webkit-slider-thumb { width: 10px; height: 10px; background: #55efc4; border: 1px solid #000; }
.wa-volume-container { display: flex; flex-direction: column; align-items: center; width: 80px; }
#wa-volume { width: 100%; height: 6px; background: #000; border: 1px solid #555; cursor: pointer; }
#wa-volume::-webkit-slider-thumb { width: 8px; height: 8px; background: #feca57; border: 1px solid #000; }

.wa-btns { display: flex; gap: 4px; }
.wa-btns button {
    width: 35px; background: linear-gradient(to bottom, #eee, #ccc);
    border: 1px solid #000; border-radius: 4px; cursor: pointer;
    font-size: 14px; box-shadow: 2px 2px 0 #000;
}
.wa-btns button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #000; }
.winamp-playlist {
    background: #000; margin: 5px; border: 2px inset #555; height: 120px;
    overflow-y: auto; font-size: 14px; flex-grow: 1;
}
.pl-header { background: #2d3436; color: #fff; padding: 2px 5px; font-size: 12px; border-bottom: 1px solid #555; }
#wa-list { list-style: none; padding: 0; margin: 0; }
#wa-list li { padding: 2px 5px; cursor: pointer; border-bottom: 1px solid #111; }
#wa-list li:hover { background: #111; color: #fff; }
#wa-list li.playing { background: rgba(85, 239, 196, 0.2); color: #fff; }
.winamp-playlist::-webkit-scrollbar { width: 8px; }
.winamp-playlist::-webkit-scrollbar-track { background: #000; }
.winamp-playlist::-webkit-scrollbar-thumb { background: #555; border: 1px solid #000; }

/* Menu Iniciar e Outros */
#start-menu {
    position: absolute; bottom: 110px; left: 50%; transform: translateX(-50%);
    width: 220px; background: #fff; border: var(--border); border-radius: 10px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.2); z-index: 2000; overflow: hidden;
}
#start-menu.hidden { display: none; }
.menu-header { background: var(--c-pink); padding: 10px; border-bottom: var(--border); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; background: #fff; border: 2px solid #000; border-radius: 50%; }
.menu-header span { font-weight: bold; font-size: 18px; }
#start-menu ul { list-style: none; padding: 0; margin: 0; }
#start-menu li { padding: 10px 15px; cursor: pointer; transition: background 0.1s; }
#start-menu li:hover { background: #f0f0f0; }
#start-menu li.danger:hover { background: #ff6b6b; color: #fff; }
hr { border: 0; border-top: 2px dashed #ccc; margin: 0; }

.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; }
.calc-display { grid-column: span 4; background: #bcd3c7; border: 2px solid #000; font-family: 'Courier New', monospace; font-size: 24px; text-align: right; padding: 10px; margin-bottom: 5px; box-shadow: inset 2px 2px 0px rgba(0,0,0,0.1); }
.calc-btn { height: 40px; background: #fff; border: 2px solid #000; font-family: 'VT323'; font-size: 20px; cursor: pointer; box-shadow: 3px 3px 0px rgba(0,0,0,0.1); }
.calc-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0px rgba(0,0,0,0.1); }
.btn-orange { background: var(--c-beige); }
.btn-red { background: #ff6b6b; color: #fff; }

.mine-header { background: #ccc; border-bottom: 2px solid #000; padding: 5px; display: flex; justify-content: space-between; font-family: 'Courier New'; font-weight: bold; }
.mine-grid { display: grid; grid-template-columns: repeat(10, 1fr); background: #aaa; border: 2px solid #000; }
.mine-cell { width: 25px; height: 25px; background: #fff; border: 1px solid #777; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: bold; font-family: sans-serif; font-size: 14px; }
.mine-cell:hover { background: #e0e0e0; }
.mine-cell.revealed { background: #ccc; border: 1px dotted #999; }
.mine-cell.bomb { background: #ff6b6b; }
.mine-cell.flag { background: #feca57; }

/* === CONFIGURAÇÕES PRO (Atualizado) === */
.settings-layout {
    display: flex;
    height: 100%;
}

.settings-sidebar {
    width: 150px;
    background: #ddd;
    border-right: 2px solid #000;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
}

.settings-tab {
    padding: 12px 15px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 20px;
    text-transform: uppercase;
    color: #555;
    border-left: 4px solid transparent;
    transition: all 0.1s;
}
.settings-tab:hover { background: #ccc; color: #000; }
.settings-tab.active { 
    background: #fff; 
    border-left: 4px solid #000; 
    color: #000;
    font-weight: bold;
    box-shadow: -2px 2px 0 rgba(0,0,0,0.1);
}

.settings-main {
    flex-grow: 1;
    padding: 20px;
    background: #fff;
    overflow-y: auto;
}

/* Esconde abas inativas */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; }}

.setting-card {
    border: 2px solid #000;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.setting-card h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    border-bottom: 1px dashed #000;
    padding-bottom: 5px;
}

.theme-options { display: flex; gap: 15px; flex-wrap: wrap; }
.theme-btn {
    width: 40px; height: 40px;
    border: 2px solid #ccc;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.1s, border-color 0.1s;
}
.theme-btn:hover { transform: scale(1.1); border-color: #000; }
.theme-btn.active { border: 2px solid #000; box-shadow: 0 0 0 2px #aaa; }

.accent-btn {
    padding: 8px 15px;
    border: 2px solid #000;
    background: #fff;
    cursor: pointer;
    border-radius: 0;
    font-family: 'VT323'; font-size: 18px;
    box-shadow: 2px 2px 0 #000;
    margin-right: 10px;
}
.accent-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* Input Retrô */
.retro-input {
    border: 2px inset #ccc;
    background: #fff;
    padding: 5px;
    font-family: 'VT323', monospace;
    font-size: 18px;
    width: 200px;
}

/* ================= TELA DE LOGIN ================= */
#login-screen {
    position: fixed;
    inset: 0;
    background-color: var(--bg-color);
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 30px 30px;
    color: #000;
    font-family: 'VT323', monospace;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#login-crt-overlay { display: none; }

#login-box {
    position: relative;
    width: 340px;
    background: #fff;
    border: var(--border);
    box-shadow: var(--shadow-hard);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
}

#login-box::before {
    content: "OnyxOS — LOGIN";
    display: block;
    background: var(--c-pink);
    color: #000;
    border-bottom: var(--border);
    padding: 6px 12px;
    font-size: 18px;
    letter-spacing: 3px;
    text-align: left;
}

.login-logo {
    font-size: 42px;
    letter-spacing: 6px;
    color: #000;
    margin-top: 20px;
}

.login-version {
    font-size: 14px;
    color: #666;
    margin-bottom: 18px;
}

.login-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 10px;
    border: var(--border);
    border-radius: 50%;
    background: var(--c-pink);
    box-shadow: 3px 3px 0 #000;
    background-image: radial-gradient(circle at 35% 35%, #fff 0%, #fff 8%, transparent 9%);
}

.login-user-label {
    font-size: 22px;
    color: #000;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

#login-form {
    padding: 0 24px;
}

.login-input {
    width: 100%;
    padding: 6px 10px;
    background: #fff;
    color: #000;
    border: 2px inset #ccc;
    font-family: 'VT323', monospace;
    font-size: 20px;
    letter-spacing: 4px;
    text-align: center;
    outline: none;
    margin-bottom: 12px;
}

.login-input:focus { border-color: #000; }

.login-btn {
    width: 100%;
    padding: 6px;
    background: var(--c-beige);
    color: #000;
    border: var(--border);
    font-family: 'VT323', monospace;
    font-size: 18px;
    letter-spacing: 4px;
    cursor: pointer;
    box-shadow: 3px 3px 0 #000;
    border-radius: 4px;
}
.login-btn:hover { background: #ffd76b; }
.login-btn:active { transform: translate(2px, 2px); box-shadow: none; }

.login-error {
    margin-top: 12px;
    color: #c0392b;
    font-size: 16px;
    min-height: 18px;
    letter-spacing: 1px;
    padding: 0 24px;
}

.login-hint {
    margin-top: 4px;
    color: #8a5a00;
    font-size: 15px;
    min-height: 16px;
    padding: 0 24px;
}

.login-footer {
    margin-top: 16px;
    padding: 8px 12px;
    background: #f1f2f6;
    border-top: var(--border);
    font-size: 14px;
    color: #555;
    letter-spacing: 2px;
}

#login-box.shake { animation: loginShake 0.4s; }
@keyframes loginShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

#login-screen.fading {
    animation: loginFade 0.5s forwards;
    pointer-events: none;
}
@keyframes loginFade {
    0%   { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

/* ================= HORROR ================= */
.horror-toast {
    position: fixed;
    right: 20px;
    bottom: 110px;
    width: 260px;
    background: #1e272e;
    color: #ff6b6b;
    border: 2px solid #000;
    box-shadow: 4px 4px 0 #000;
    padding: 10px 14px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    z-index: 50000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.horror-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.ghost-prompt {
    position: fixed;
    background: #1e272e;
    border: 2px solid #000;
    box-shadow: 6px 6px 0 #000, 0 0 30px rgba(255,107,107,0.5);
    animation: ghostAppear 0.4s ease;
}
@keyframes ghostAppear {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* ================= CUTSCENE FINAL ================= */
#cutscene-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 100000;
    color: #ff6b6b;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    animation: cutFadeIn 1.2s ease forwards;
}

@keyframes cutFadeIn {
    0%   { opacity: 0; }
    100% { opacity: 1; }
}

#cutscene-static {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px, transparent 1px, transparent 3px),
        radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,0.7) 100%);
    animation: staticShift 0.18s steps(4) infinite;
    pointer-events: none;
}
@keyframes staticShift {
    0%   { transform: translate(0,0); }
    25%  { transform: translate(-1px, 1px); }
    50%  { transform: translate(1px, -1px); }
    75%  { transform: translate(-2px, -1px); }
    100% { transform: translate(2px, 1px); }
}

#cutscene-text {
    position: relative;
    z-index: 2;
    padding: 80px 60px;
    font-size: 22px;
    line-height: 1.7;
    text-shadow: 0 0 4px rgba(255,107,107,0.6);
    max-width: 800px;
    margin: 0 auto;
}

.cs-line {
    opacity: 0;
    animation: csLineIn 0.6s forwards;
    letter-spacing: 1px;
}
@keyframes csLineIn {
    0%   { opacity: 0; transform: translateX(-12px); }
    20%  { opacity: 1; transform: translateX(2px); }
    100% { opacity: 1; transform: translateX(0); }
}

#cutscene-close {
    position: absolute;
    left: 0; right: 0; bottom: 24px;
    text-align: center;
    color: #c0392b;
    font-size: 15px;
    letter-spacing: 3px;
    opacity: 0.85;
    z-index: 3;
    animation: csCloseBlink 1.8s ease-in-out infinite;
}
#cutscene-close.hidden { display: none; }

@keyframes csCloseBlink {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

#cutscene-overlay.closing {
    animation: cutFadeOut 0.8s ease forwards;
    pointer-events: none;
}
@keyframes cutFadeOut {
    0%   { opacity: 1; filter: brightness(1); }
    100% { opacity: 0; filter: brightness(0.5); }
}

/* ================= COBRINHA ================= */
.snake-header {
    display: flex; justify-content: space-between; align-items: center;
    background: #ffeaa7; border: 2px solid #000; box-shadow: 3px 3px 0 #000;
    padding: 4px 10px; margin-bottom: 10px;
}
.snake-header button {
    border: 2px solid #000; background: #fff; padding: 2px 12px;
    cursor: pointer; font-family: 'VT323', monospace; font-size: 16px;
    box-shadow: 2px 2px 0 #000;
}
.snake-header button:active { transform: translate(2px,2px); box-shadow: none; }

/* ================= PINTURA ================= */
.paint-toolbar {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    background: #f1f2f6; border-bottom: 2px solid #000; padding: 6px 8px;
    font-size: 15px;
}
.paint-toolbar button, .paint-tool {
    border: 2px solid #000; background: #fff; padding: 3px 10px;
    cursor: pointer; font-family: 'VT323', monospace; font-size: 15px;
    box-shadow: 2px 2px 0 #000; border-radius: 3px;
}
.paint-toolbar button:active, .paint-tool:active { transform: translate(2px,2px); box-shadow: none; }
.paint-tool.active { background: #feca57; }
.paint-divider {
    display: inline-block; width: 1px; height: 22px; background: #aaa; margin: 0 4px;
}
.paint-toolbar label { display: inline-flex; align-items: center; gap: 6px; }
#paint-size-label {
    display: inline-block;
    min-width: 36px;
    text-align: right;
    font-size: 14px;
    color: #555;
}
.paint-toolbar input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 110px;
    height: 8px;
    background: #fff;
    border: 2px solid #000;
    border-radius: 4px;
    box-shadow: 2px 2px 0 #000;
    cursor: pointer;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}
.paint-toolbar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #feca57;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -1px;
}
.paint-toolbar input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #feca57;
    border: 2px solid #000;
    border-radius: 50%;
    cursor: pointer;
}
.paint-toolbar input[type="range"]::-moz-range-track {
    background: #fff;
    height: 4px;
}
.paint-colors { display: inline-flex; gap: 4px; }
.paint-swatch {
    width: 22px; height: 22px;
    border: 2px solid #000; cursor: pointer; padding: 0;
    box-shadow: 2px 2px 0 #000;
}
.paint-swatch.selected { outline: 3px solid #feca57; outline-offset: 2px; }

/* ================= MSN MESSENGER ================= */
.msn-sidebar {
    width: 200px; background: #dff6ff; border-right: 2px solid #000;
    display: flex; flex-direction: column;
}
.msn-self {
    display: flex; align-items: center; gap: 8px;
    padding: 10px; background: #74b9ff; border-bottom: 2px solid #000;
}
.msn-avatar {
    width: 32px; height: 32px; border: 2px solid #000; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff 0%, #ff9ff3 30%, #c93cb3 100%);
}
.msn-group {
    background: #b2bec3; color: #2d3436; padding: 3px 10px; font-size: 13px;
    border-bottom: 1px solid #000; letter-spacing: 1px;
}
.msn-contacts { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.msn-contact {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px;
    border-bottom: 1px dashed #bbb; cursor: pointer;
}
.msn-contact:hover { background: #fff; }
.msn-dot {
    width: 10px; height: 10px; border-radius: 50%; border: 1px solid #000; flex-shrink: 0;
}
.msn-dot.online  { background: #00b894; }
.msn-dot.offline { background: #b2bec3; }
.msn-dot.unknown { background: #d63031; animation: msnPulse 2s ease-in-out infinite; }
@keyframes msnPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.msn-name { font-size: 15px; }
.msn-last { font-size: 11px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msn-chat { flex: 1; display: flex; flex-direction: column; background: #fff; }
.msn-chat-header {
    background: #74b9ff; color: #000; padding: 6px 10px;
    border-bottom: 2px solid #000; font-size: 15px;
}
.msn-chat-area {
    flex: 1; padding: 10px; overflow-y: auto; font-size: 15px; background: #fff;
}
.msn-line { margin-bottom: 4px; line-height: 1.35; }
.msn-line strong { color: #2d3436; font-weight: 700; }
.msn-me strong   { color: #0984e3; }
.msn-system { color: #999; font-size: 13px; text-align: center; font-style: italic; margin: 6px 0; }
.msn-chat-input {
    display: flex; gap: 6px; padding: 6px; border-top: 2px solid #000; background: #f1f2f6;
}
.msn-chat-input input[type="text"] {
    flex: 1; border: 2px inset #ccc; padding: 4px 8px;
    font-family: 'VT323', monospace; font-size: 15px;
}
.msn-chat-input button {
    border: 2px solid #000; background: #74b9ff; padding: 4px 12px;
    cursor: pointer; font-family: 'VT323', monospace; font-size: 15px;
    box-shadow: 2px 2px 0 #000;
}
.msn-chat-input button:disabled,
.msn-chat-input input:disabled { opacity: 0.5; cursor: not-allowed; }

/* ================= CONVERSOR ================= */
.conv-tabs {
    display: flex; gap: 4px; margin-bottom: 12px;
}
.conv-tab {
    flex: 1; border: 2px solid #000; background: #fff; padding: 4px;
    cursor: pointer; font-family: 'VT323', monospace; font-size: 14px;
    box-shadow: 2px 2px 0 #000;
}
.conv-tab.active { background: #feca57; }
.conv-row {
    display: flex; gap: 8px; align-items: center;
}
.conv-row input[type="number"] {
    flex: 1; border: 2px inset #ccc; padding: 4px 8px;
    font-family: 'VT323', monospace; font-size: 18px; text-align: right;
}
.conv-row select {
    border: 2px solid #000; padding: 4px;
    font-family: 'VT323', monospace; font-size: 14px; background: #fff;
}
.conv-arrow { text-align: center; font-size: 22px; margin: 6px 0; color: #555; }