* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tahoma', 'MS Sans Serif', Arial, sans-serif;
    font-size: 11px;
    overflow: hidden;
    background: #000;
    user-select: none;
    -webkit-user-select: none;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== BOOT SCREEN ===== */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
}

#boot-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-logo {
    margin-bottom: 60px;
    text-align: center;
}

.boot-flag {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
}

.boot-flag-block {
    border-radius: 2px;
}

.boot-logo-text {
    color: #fff;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 3px;
    font-family: 'Franklin Gothic Medium', 'Tahoma', sans-serif;
}

.boot-logo-text em {
    color: #7CBFF7;
    font-style: normal;
}

.boot-progress-wrap {
    width: 220px;
}

.boot-progress-track {
    width: 100%;
    height: 13px;
    background: #111;
    border: 1px solid #333;
    border-radius: 7px;
    overflow: hidden;
}

.boot-progress-fill {
    height: 100%;
    width: 30%;
    border-radius: 7px;
    background: linear-gradient(90deg, #1a5fbf 0%, #5498e8 40%, #1a5fbf 80%);
    background-size: 200% 100%;
    animation: boot-shimmer 1.2s linear infinite;
}

@keyframes boot-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.boot-copy {
    margin-top: 16px;
    color: #444;
    font-size: 10px;
    font-family: 'Tahoma', sans-serif;
    text-align: center;
}

/* ===== DESKTOP ===== */
.desktop {
    flex: 1;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 130% 55% at 25% 58%, #4A9225 0%, #2E6B12 55%, transparent 68%),
        radial-gradient(ellipse 90% 45% at 72% 68%, #5EA030 0%, #3A7A18 50%, transparent 62%),
        linear-gradient(180deg,
            #4E90D0 0%,
            #74B8E8 28%,
            #A8D8F0 40%,
            #C8ECF8 47%,
            #85C84A 52%,
            #5EA030 62%,
            #3D7A1A 76%,
            #295510 100%
        );
}

/* ===== TASKBAR ===== */
.taskbar {
    height: 34px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #2B68D8 0%, #1A4CBE 50%, #2060CC 100%);
    border-top: 1px solid #6090E8;
    display: flex;
    align-items: center;
    padding: 0 4px;
    gap: 3px;
}

/* ===== START BUTTON ===== */
.start-button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 12px 2px 8px;
    height: 26px;
    background: linear-gradient(180deg, #72CC3E 0%, #56B425 40%, #48A01C 100%);
    border: 1px solid #2A7A0A;
    border-radius: 0 13px 13px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.35);
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    font-family: 'Franklin Gothic Medium', Tahoma, sans-serif;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    min-width: 86px;
    margin-right: 4px;
}

.start-button:hover {
    background: linear-gradient(180deg, #82DC4E 0%, #66C435 40%, #58B02C 100%);
}

.start-button:active {
    background: linear-gradient(180deg, #48A01C 0%, #56B425 60%, #72CC3E 100%);
    padding-top: 3px;
    padding-bottom: 1px;
}

.start-flag {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.start-flag-block { border-radius: 1px; }

/* ===== TASKBAR ITEMS ===== */
.taskbar-sep {
    width: 1px;
    height: 22px;
    background: linear-gradient(to bottom, transparent, #8AABEE 40%, #8AABEE 60%, transparent);
    margin: 0 2px;
}

.taskbar-windows {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    min-width: 0;
}

.taskbar-winbtn {
    padding: 2px 8px;
    height: 22px;
    background: linear-gradient(180deg, #3A72C8 0%, #2A5CB8 50%, #2262C8 100%);
    border: 1px solid #5082D8;
    border-radius: 2px;
    color: #fff;
    font-size: 10px;
    font-family: Tahoma, sans-serif;
    cursor: pointer;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}

.taskbar-winbtn:hover {
    background: linear-gradient(180deg, #4A82D8 0%, #3A6CC8 50%, #3272D8 100%);
}

.taskbar-tray {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    height: 24px;
    background: linear-gradient(180deg, #1448A4 0%, #1C5CBC 50%, #1448A4 100%);
    border: 1px solid #3A6CC8;
    border-radius: 2px;
}

.taskbar-clock {
    color: #fff;
    font-size: 10px;
    font-family: Tahoma, sans-serif;
    white-space: nowrap;
}

/* ===== START MENU ===== */
.start-menu {
    position: fixed;
    bottom: 34px;
    left: 0;
    width: 250px;
    background: #ECE9D8;
    border: 2px solid #0A246A;
    box-shadow: 3px -3px 8px rgba(0,0,0,0.4);
    z-index: 50000;
    font-size: 12px;
}

.start-menu-head {
    background: linear-gradient(to right, #0A246A, #3A70E0);
    color: #fff;
    padding: 10px 14px;
    font-size: 18px;
    font-weight: bold;
    font-family: 'Franklin Gothic Medium', Tahoma;
    display: flex;
    align-items: center;
    gap: 10px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 12px;
    color: #000;
}

.start-menu-item:hover {
    background: #0A246A;
    color: #fff;
}

.start-menu-icon { font-size: 16px; width: 20px; text-align: center; }

.start-menu-div {
    height: 1px;
    background: #808080;
    margin: 3px 6px;
}

/* ===== DESKTOP ICONS ===== */
.desktop-icons {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: flex-start;
    align-items: flex-start;
    gap: 4px;
    max-height: calc(100vh - 60px);
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 76px;
    padding: 4px;
    cursor: pointer;
    border-radius: 2px;
    text-align: center;
}

.icon:hover  { background: rgba(20, 80, 200, 0.35); outline: 1px dotted rgba(255,255,255,0.7); }
.icon.sel    { background: rgba(20, 80, 200, 0.55); outline: 1px dotted rgba(255,255,255,0.8); }

.icon-img {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 4px;
}

.icon-lbl {
    font-size: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px #000, -1px -1px 2px #000, 1px -1px 2px #000, -1px 1px 2px #000;
    line-height: 1.3;
    word-break: break-word;
}

@keyframes icon-pop {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.icon-new { animation: icon-pop 0.5s ease-out 3; }

/* ===== WINDOWS ===== */
.window {
    position: absolute;
    display: none;
    flex-direction: column;
    border: 2px solid #0A246A;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.45);
    min-width: 220px;
    min-height: 150px;
    background: #ECE9D8;
}

.window.active { display: flex; }

.window-title {
    background: linear-gradient(90deg, #0B2778 0%, #3A71E0 30%, #A8CCFF 50%, #3A71E0 70%, #0B2778 100%);
    color: #fff;
    padding: 3px 4px;
    display: flex;
    align-items: center;
    height: 23px;
    flex-shrink: 0;
    cursor: move;
    user-select: none;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
    font-size: 11px;
    font-weight: bold;
}

.window.inactive .window-title {
    background: linear-gradient(90deg, #7A98D8 0%, #B0C8F0 50%, #7A98D8 100%);
    color: #D0DCF0;
}

.win-icon { margin-right: 4px; font-size: 12px; }

.win-title-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.win-btns { display: flex; gap: 2px; }

.win-btn {
    width: 18px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
    border-radius: 2px;
    border: 1px solid;
    color: #fff;
}

.win-btn-min { background: linear-gradient(180deg, #5A8AE0, #3A6AC0); border-color: #2A5AB0; }
.win-btn-max { background: linear-gradient(180deg, #5A8AE0, #3A6AC0); border-color: #2A5AB0; }
.win-btn-cls { background: linear-gradient(180deg, #E84030, #C82010); border-color: #A81000; }

.win-btn-min:hover { background: linear-gradient(180deg, #7AAAFF, #5A8AF0); }
.win-btn-cls:hover { background: linear-gradient(180deg, #FF5040, #E03020); }

.window-content {
    flex: 1;
    overflow: auto;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    margin: 2px;
    font-size: 11px;
    position: relative;
}

.win-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #888 50%);
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #E8E4D8; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #C0C0B8, #D8D8D0, #A0A098);
    border: 1px solid #808080;
}

/* ===== INPUTS & BUTTONS ===== */
input[type="text"],
input[type="password"],
input[type="email"],
textarea {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    padding: 3px 5px;
    border: 2px solid;
    border-color: #808080 #D8D4C8 #D8D4C8 #808080;
    background: #fff;
    color: #000;
    outline: none;
}

input:focus, textarea:focus { border-color: #3A70DF; }

button {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 11px;
    padding: 3px 10px;
    background: linear-gradient(180deg, #ECE9D8, #D4D0C0);
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    cursor: pointer;
    min-height: 22px;
    min-width: 50px;
    color: #000;
    white-space: nowrap;
}

button:hover { background: linear-gradient(180deg, #F4F1E0, #DCD8C8); }
button:active {
    background: linear-gradient(180deg, #C4C0B0, #DCD8C8);
    border-color: #808080 #fff #fff #808080;
    padding: 4px 9px 2px 11px;
}

/* ===== NOTEPAD ===== */
.notepad-wrap { display: flex; flex-direction: column; height: 100%; }

.notepad-menu {
    background: #ECE9D8;
    border-bottom: 1px solid #808080;
    padding: 2px 6px;
    font-size: 11px;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.notepad-menu span {
    padding: 2px 5px;
    cursor: pointer;
}

.notepad-menu span:hover { background: #0A246A; color: #fff; }

.notepad-area {
    flex: 1;
    width: 100%;
    font-family: 'Lucida Console', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 4px 6px;
    background: #fff;
    resize: none;
    border: none;
    outline: none;
    color: #000;
}

.notepad-status {
    background: #ECE9D8;
    border-top: 1px solid #808080;
    padding: 1px 6px;
    font-size: 10px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    height: 18px;
    font-family: 'Tahoma', Arial, sans-serif;
}

.notepad-status-sep {
    width: 1px;
    height: 12px;
    background: #999;
    flex-shrink: 0;
}

/* ===== FACEBOOK CHROME ===== */
.fb-wrap { display: flex; flex-direction: column; height: 100%; font-family: Arial, Helvetica, sans-serif; }

.fb-nav {
    background: #3B5998;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fb-logo { color: #fff; font-size: 20px; font-weight: bold; font-family: Georgia, serif; letter-spacing: -1px; }

.fb-nav-input {
    flex: 1;
    max-width: 180px;
    padding: 3px 8px;
    border-radius: 10px;
    border: none;
    font-size: 11px;
    background: #fff;
    color: #000;
    border: 2px solid transparent;
}

.fb-nav-input:focus { border-color: #3A70DF; }

.fb-user-info { color: #fff; font-size: 11px; font-weight: bold; margin-left: auto; }

/* Login */
.fb-login-page {
    flex: 1;
    background: #3B5998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto;
}

.fb-login-card {
    background: #fff;
    padding: 18px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 350px;
}

.fb-login-logo {
    color: #3B5998;
    font-size: 38px;
    font-weight: bold;
    font-family: Georgia, serif;
    text-align: center;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.fb-login-tag { color: #4E5665; font-size: 13px; text-align: center; margin-bottom: 18px; font-weight: bold; }

.fb-in {
    width: 100%;
    padding: 8px;
    border: 1px solid #CCC;
    border-radius: 3px;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: Arial;
    background: #fff;
    color: #000;
    border: 2px solid #CCC;
}

.fb-in:focus { border-color: #3B5998; }

.fb-submit {
    width: 100%;
    padding: 8px;
    background: linear-gradient(180deg, #5980D0, #3B5998);
    color: #fff;
    border: 1px solid #2F4878;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: Arial;
    margin-bottom: 10px;
    min-height: auto;
    min-width: auto;
}

.fb-submit:hover { background: linear-gradient(180deg, #6990E0, #4B69A8); }

.fb-error { color: #cc0000; font-size: 11px; margin-bottom: 8px; display: none; }
.fb-div { border: none; border-top: 1px solid #DDD; margin: 10px 0; }
.fb-hint { font-size: 10px; color: #888; text-align: center; }

/* Feed */
.fb-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #E8EBF0;
}

.fb-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #DDD;
    padding: 8px;
    overflow-y: auto;
    font-size: 11px;
}

.fb-sidebar-title { font-weight: bold; color: #333; margin-bottom: 6px; font-size: 12px; }

.fb-sidebar-item {
    padding: 4px 6px;
    cursor: pointer;
    border-radius: 3px;
    color: #3B5998;
}

.fb-sidebar-item:hover { background: #F0F0F8; }

.fb-feed { flex: 1; overflow-y: auto; padding: 10px; }

.fb-group-banner {
    background: #fff;
    border: 1px solid #CCC;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.fb-group-cover {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460, #533483);
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.fb-group-meta { padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; }
.fb-group-name { font-size: 15px; font-weight: bold; color: #1C1E21; }
.fb-group-members { font-size: 10px; color: #65676B; }

/* Posts */
.post-card {
    background: #fff;
    border: 1px solid #CCC;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}

.post-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.15); }

.post-head {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.post-head:hover { background: #F8F9FB; }

.post-ava {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #3B5998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid #eee;
}

.post-meta { flex: 1; }
.post-name { font-weight: bold; font-size: 12px; color: #050505; }
.post-name:hover { text-decoration: underline; }
.post-date { font-size: 10px; color: #65676B; }

.post-body {
    padding: 0 12px 8px;
    font-size: 12px;
    color: #1C1E21;
    line-height: 1.5;
    white-space: pre-wrap;
}

.post-stats {
    padding: 4px 12px;
    border-top: 1px solid #E4E6EA;
    font-size: 10px;
    color: #65676B;
    display: flex;
    justify-content: space-between;
}

.post-actions { padding: 2px 8px; border-top: 1px solid #E4E6EA; display: flex; gap: 2px; }

.post-act-btn {
    flex: 1;
    padding: 5px;
    text-align: center;
    font-size: 11px;
    color: #65676B;
    cursor: pointer;
    border-radius: 3px;
    font-weight: bold;
    background: none;
    border: none;
    min-height: auto;
    min-width: auto;
}

.post-act-btn:hover { background: #F2F3F5; }

/* Comments */
.comment-section { padding: 6px 12px; background: #F8F9FB; border-top: 1px solid #E4E6EA; }

.comment-mod {
    background: #FFF8E1;
    border: 1px solid #FFCC00;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 11px;
}

.comment-mod-label { font-weight: bold; color: #B45309; margin-bottom: 2px; }

.comment-normal {
    background: #F2F3F5;
    border-radius: 12px;
    padding: 5px 10px;
    margin-bottom: 6px;
    font-size: 11px;
}

.comment-author { font-weight: bold; color: #050505; }

/* Profile */
.fb-profile-wrap { overflow-y: auto; height: 100%; }

.fb-profile-cover {
    height: 100px;
    background: linear-gradient(135deg, #1a1a2e, #3a3a6e, #2040A0);
    position: relative;
}

.fb-profile-ava {
    position: absolute;
    bottom: -28px;
    left: 16px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #3B5998;
    border: 3px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.fb-profile-info {
    padding: 36px 16px 10px;
    background: #fff;
    border-bottom: 1px solid #DDD;
}

.fb-profile-name { font-size: 18px; font-weight: bold; color: #050505; }
.fb-profile-bio { font-size: 11px; color: #65676B; margin-top: 4px; white-space: pre-wrap; line-height: 1.5; }
.fb-profile-since { font-size: 10px; color: #888; margin-top: 6px; }

.fb-profile-posts { padding: 10px; background: #E8EBF0; }

/* Webpage (cancelled game) */
.webpage-wrap {
    font-family: 'Courier New', monospace;
    background: #0a0a14;
    color: #E0E0E0;
    min-height: 100%;
    padding: 20px;
    overflow-y: auto;
}

.webpage-title { font-size: 22px; color: #4A9FFF; margin-bottom: 8px; }
.webpage-cancelled { display: inline-block; background: #7B0000; color: #FFD0D0; padding: 3px 8px; font-size: 10px; border-radius: 3px; margin-bottom: 14px; }
.webpage-desc { font-size: 12px; color: #AAA; margin-bottom: 16px; line-height: 1.7; }

.devlog-entry {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #0F0F1E;
    border-left: 3px solid #4A9FFF;
    font-size: 11px;
    line-height: 1.7;
}

.devlog-date { color: #4A9FFF; font-weight: bold; margin-bottom: 2px; font-size: 12px; }
.devlog-sad .devlog-date { color: #9060FF; }
.devlog-dark .devlog-date { color: #666; }
.devlog-dark { border-color: #444; }

.download-demo-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #1A4FBF;
    color: #fff;
    border: 2px solid #4A9FFF;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    margin: 16px 0;
}

.download-demo-btn:hover { background: #2A5FCF; }

/* ===== TETRIS ===== */
.tetris-wrap { display: flex; gap: 10px; padding: 8px; height: 100%; background: #1a1a1a; }
.tetris-board-col { display: flex; flex-direction: column; align-items: center; }
.tetris-side { display: flex; flex-direction: column; gap: 8px; min-width: 70px; }

.tetris-panel {
    background: #000;
    border: 1px solid #333;
    padding: 6px;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    color: #0F0;
}

.tetris-panel-title { color: #666; font-size: 9px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 1px; }
.tetris-panel-val { font-size: 16px; color: #0F0; }

/* ===== TETRIS IMPROVED (fullscreen) ===== */
.txi-fullscreen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9000;
    display: flex;
    flex-direction: column;
}

.txi-splash {
    position: fixed;
    inset: 0;
    background: #0a0a14;
    z-index: 9010;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 30px;
}

.txi-title {
    font-size: 42px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 6px;
    color: #00FFFF;
    text-shadow: 0 0 20px #00FFFF, 0 0 40px #0088FF;
    margin-bottom: 8px;
}

.txi-version { font-size: 13px; color: #555; margin-bottom: 24px; font-family: 'Courier New'; letter-spacing: 2px; }
.txi-creator { font-size: 13px; color: #888; margin-bottom: 4px; }
.txi-fblink { color: #4A9FFF; text-decoration: underline; cursor: pointer; font-size: 12px; margin-bottom: 40px; }
.txi-fblink:hover { color: #7ABFFF; }

.txi-start {
    padding: 12px 36px;
    background: transparent;
    color: #00FFFF;
    border: 2px solid #00FFFF;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #00FFFF;
    min-height: auto;
    min-width: auto;
}

.txi-start:hover { background: rgba(0, 255, 255, 0.1); box-shadow: 0 0 20px rgba(0,255,255,0.3); }

.txi-close {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(200,0,0,0.7);
    color: #fff;
    border: 1px solid #FF4444;
    cursor: pointer;
    font-size: 12px;
    z-index: 200;
    min-height: auto;
}

.txi-board-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    perspective: 800px;
}

.txi-board-3d {
    transform: rotateX(8deg) rotateY(-4deg);
    transform-style: preserve-3d;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(0,255,255,0.2);
    border: 2px solid rgba(0,255,255,0.4);
}

.txi-ui {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #0FF;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: rgba(0,0,0,0.7);
    padding: 8px 12px;
    border: 1px solid rgba(0,255,255,0.3);
    pointer-events: none;
    z-index: 100;
}

/* ===== MINIGAMES ===== */
.mg-wrap { display: flex; flex-direction: column; height: 100%; background: #0A0A14; color: #fff; font-family: 'Courier New', monospace; }

.mg-header {
    background: #111;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    font-size: 11px;
    flex-shrink: 0;
}

.mg-title { font-weight: bold; color: #0F0; letter-spacing: 1px; }
.mg-score { color: #FFD700; }

.mg-body { flex: 1; position: relative; overflow: hidden; }

.mg-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    font-family: 'Courier New', monospace;
}

.mg-overlay h2 { font-size: 22px; margin-bottom: 12px; color: #0F0; }
.mg-overlay p  { font-size: 13px; color: #888; margin-bottom: 16px; line-height: 1.6; }

.mg-start-btn {
    padding: 10px 30px;
    background: transparent;
    color: #0F0;
    border: 2px solid #0F0;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-height: auto;
    min-width: auto;
}

.mg-start-btn:hover { background: rgba(0,255,0,0.1); }

/* Color Rush */
.cr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    background: #111;
    color: #fff;
    font-family: 'Courier New', monospace;
}

.cr-timer-bar {
    width: 300px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}

.cr-timer-fill {
    height: 100%;
    background: #0F0;
    border-radius: 3px;
    transition: width 0.1s linear, background 0.5s;
}

.cr-display {
    font-size: 42px;
    font-weight: bold;
    padding: 16px 48px;
    border: 3px solid rgba(255,255,255,0.3);
    min-width: 220px;
    text-align: center;
    border-radius: 6px;
    letter-spacing: 2px;
}

.cr-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.cr-btn {
    width: 110px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.2);
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.05);
    color: #fff;
    min-height: auto;
    min-width: auto;
    letter-spacing: 1px;
    transition: transform 0.1s, border-color 0.1s;
}

.cr-btn:hover { border-color: rgba(255,255,255,0.7); transform: scale(1.05); }
.cr-btn.flash-right { background: rgba(0,255,0,0.3) !important; border-color: #0F0; }
.cr-btn.flash-wrong { background: rgba(255,0,0,0.3) !important; border-color: #F00; }

/* ===== MAIN GAME (3D fullscreen) ===== */
.game-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: #000;
}

.game-splash {
    position: fixed;
    inset: 0;
    z-index: 9010;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-family: 'Courier New', monospace;
    padding: 40px;
}

.game-splash-title {
    font-size: 30px;
    color: #4A9FFF;
    margin-bottom: 10px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(74, 159, 255, 0.5);
}

.game-splash-creator { font-size: 14px; color: #888; margin-bottom: 4px; }
.game-splash-link { color: #4A9FFF; text-decoration: underline; cursor: pointer; font-size: 12px; margin-bottom: 40px; }
.game-splash-link:hover { color: #7ABFFF; }

.game-splash-start {
    padding: 12px 36px;
    background: transparent;
    color: #4A9FFF;
    border: 2px solid #4A9FFF;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 2px;
    min-height: auto;
    min-width: auto;
}

.game-splash-start:hover { background: rgba(74,159,255,0.1); }

.game-ui {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: rgba(0,0,0,0.7);
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
    z-index: 200;
    line-height: 1.7;
}

.game-close {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    background: rgba(180,0,0,0.8);
    color: #fff;
    border: 1px solid #FF4444;
    cursor: pointer;
    z-index: 300;
    font-size: 12px;
    min-height: auto;
    font-family: 'Courier New', monospace;
}

/* Puzzle overlay */
.puzzle-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.puzzle-box {
    background: #0E0E1E;
    border: 2px solid #4A9FFF;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    text-align: center;
    color: #fff;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 40px rgba(74,159,255,0.2);
}

.puzzle-num { font-size: 11px; color: #4A9FFF; letter-spacing: 2px; margin-bottom: 4px; }
.puzzle-title { font-size: 18px; color: #fff; margin-bottom: 8px; }
.puzzle-desc { font-size: 12px; color: #888; line-height: 1.6; margin-bottom: 20px; }

.puzzle-seq { display: flex; gap: 10px; justify-content: center; margin: 16px 0; font-size: 32px; }
.puzzle-seq span { padding: 4px 8px; border: 1px solid #333; background: #0A0A1A; }

.puzzle-opts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.p-btn {
    padding: 10px 20px;
    background: #0A1A4A;
    color: #fff;
    border: 2px solid #4A9FFF;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    min-width: 60px;
    min-height: auto;
}

.p-btn:hover { background: #1A2A5A; }
.p-btn.ok { background: #0A3A0A; border-color: #0F0; }
.p-btn.err { background: #3A0A0A; border-color: #F00; animation: shake 0.3s; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

.p-txt-input {
    width: 220px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    letter-spacing: 3px;
    padding: 8px;
    background: #0A0A1A;
    color: #0F0;
    border: 2px solid #4A9FFF;
    margin-bottom: 10px;
}

.puzzle-feedback {
    font-size: 14px;
    margin-top: 12px;
    min-height: 20px;
}

.puzzle-feedback.ok  { color: #0F0; }
.puzzle-feedback.err { color: #F00; }

/* ===== MSN MESSENGER ===== */
.msn-wrap { display: flex; flex-direction: column; height: 100%; background: #ECE9D8; }

.msn-banner {
    background: linear-gradient(to right, #3060C0, #6080E0);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.msn-banner-title { color: #fff; font-size: 13px; font-weight: bold; }
.msn-banner-sub { color: rgba(255,255,255,0.7); font-size: 10px; }

.msn-body { display: flex; flex: 1; overflow: hidden; }

.msn-contacts {
    width: 175px;
    flex-shrink: 0;
    border-right: 1px solid #808080;
    overflow-y: auto;
    background: #F0EDE0;
}

.msn-contacts-group {
    padding: 4px 8px;
    background: #D0CCC0;
    border-bottom: 1px solid #808080;
    font-size: 10px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
}

.msn-contact {
    padding: 8px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-bottom: 1px solid #E0DCD0;
    font-size: 11px;
}

.msn-contact:hover { background: #E4E0D8; }
.msn-contact.active-c { background: #CCE0FF; }

.msn-c-ava { font-size: 20px; width: 26px; text-align: center; }
.msn-c-name { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msn-c-stat { font-size: 9px; color: #888; }

.msn-chat { flex: 1; display: flex; flex-direction: column; background: #fff; }

.msn-chat-head {
    background: linear-gradient(to right, #D8D4C8, #E8E4D8);
    padding: 6px 10px;
    border-bottom: 1px solid #808080;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.msn-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #fff;
}

.msn-msg { display: flex; margin-bottom: 8px; gap: 6px; align-items: flex-end; }
.msn-msg.sent { flex-direction: row-reverse; }

.msn-ava {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: #F0F0F0;
    border: 1px solid #DDD;
}

.msn-bubble {
    max-width: 75%;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
}

.msn-msg.received .msn-bubble { background: #EEF2FF; border: 1px solid #CCD4FF; }
.msn-msg.sent     .msn-bubble { background: #E8F5E9; border: 1px solid #C8E6C9; }

.msn-ts {
    font-size: 9px;
    color: #aaa;
    margin-top: 2px;
    padding: 0 2px;
}
.msn-msg.sent .msn-ts { text-align: right; }

.msn-msg.sys-msg {
    justify-content: center;
    margin: 12px 0;
}

.msn-msg.sys-msg .msn-bubble {
    background: transparent;
    border: none;
    color: #999;
    font-style: italic;
    font-size: 10px;
    text-align: center;
    max-width: 100%;
}

.msn-unlock {
    padding: 24px;
    text-align: center;
    font-size: 12px;
}

.msn-unlock h3 { margin-bottom: 12px; color: #333; }
.msn-unlock p  { color: #666; margin-bottom: 14px; line-height: 1.6; }

/* ===== FINAL COMMENT FORM ===== */
.final-form {
    margin-top: 16px;
    padding: 14px;
    background: #F8F9FB;
    border: 1px solid #DDD;
    border-radius: 4px;
}

.final-form p { font-size: 12px; color: #444; margin-bottom: 8px; }

.final-textarea {
    width: 100%;
    height: 70px;
    margin-bottom: 8px;
    font-family: Arial;
    font-size: 12px;
    border: 1px solid #CCC;
    border-radius: 3px;
    padding: 6px;
    background: #fff;
    color: #000;
    border: 2px solid #CCC;
    resize: none;
    outline: none;
}

.final-textarea:focus { border-color: #3B5998; }

.final-send {
    padding: 8px 20px;
    background: linear-gradient(180deg, #5980D0, #3B5998);
    color: #fff;
    border: 1px solid #2F4878;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    font-family: Arial;
    min-height: auto;
    min-width: auto;
}

.final-send:hover { background: linear-gradient(180deg, #6990E0, #4B69A8); }

.final-locked { font-size: 11px; color: #888; margin-top: 8px; font-style: italic; }

/* ===== CREDITS ===== */
.credits-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    overflow: hidden;
}

.credits-scroll {
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 30px 40px;
    color: #0F0;
    font-family: 'Courier New', monospace;
    animation: scroll-up 80s linear forwards;
}

@keyframes scroll-up {
    from { transform: translateY(100vh); }
    to   { transform: translateY(-200%); }
}

.credits-msg {
    color: #4ECDC4;
    font-style: italic;
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 80px;
    line-height: 2;
}

.credits-fin { font-size: 64px; margin-bottom: 80px; text-shadow: 0 0 30px #0F0; }
.credits-section { margin: 50px 0; }
.credits-sec-title { color: #FFD700; font-size: 15px; letter-spacing: 3px; margin-bottom: 12px; }
.credits-item { font-size: 13px; color: #CCC; margin: 5px 0; }

canvas { display: block; }
