* { box-sizing: border-box; }
body { margin: 0; padding: 0; background: #008080; font-family: 'MS Sans Serif', Tahoma, sans-serif; overflow: hidden; height: 100vh; user-select: none; }
.crt { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9999; background: linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.1) 50%), linear-gradient(90deg, rgba(255,0,0,0.03), rgba(0,255,0,0.01), rgba(0,0,255,0.03)); background-size: 100% 2px, 3px 100%; }

/* LOGIN SCREEN PRO OCHRANU SÍTĚ */
.login-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #008080; z-index: 999999; display: flex; align-items: center; justify-content: center; }

/* OVLÁDACÍ PRVKY W95 */
.win-btn { background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; cursor: pointer; padding: 2px 5px; font-family: inherit; font-size: 12px; }
.win-btn:active, .win-btn.active { border-color: #000 #fff #fff #000; outline: 1px dotted #000; outline-offset: -4px; }
.win-inset { border: 2px solid; border-color: #808080 #fff #fff #808080; background: #fff; padding: 3px; font-family: inherit;}

/* DIALOGY A HIGHSCORE */
.dialog-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.3); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.dialog { background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; min-width: 250px; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); }
.hs-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.hs-table th, .hs-table td { padding: 3px; text-align: left; border-bottom: 1px dotted #808080; }

/* TASKBAR */
.taskbar { position: fixed; bottom: 0; left: 0; width: 100%; height: 35px; background: #c0c0c0; border-top: 2px solid #fff; display: flex; align-items: center; padding: 2px; z-index: 9998; }
.start-btn { display: flex; align-items: center; gap: 5px; font-weight: bold; height: 100%; margin-right: 10px; font-size: 14px; padding: 0 10px; }
#taskbar-apps { flex: 1; display: flex; gap: 4px; overflow-x: auto; }
.taskbar-app { display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; min-width: 100px; max-width: 150px; white-space: nowrap; overflow: hidden; }
.tray { border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 2px 10px; height: 100%; display: flex; align-items: center; font-size: 12px; margin-left: 10px; }

/* START MENU */
#start-menu { position: absolute; bottom: 35px; left: 2px; width: 210px; background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; z-index: 9997; display: flex; flex-direction: row; }
#start-menu.hidden { display: none; }
.start-sidebar { background: #000080; color: #fff; width: 30px; writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg); text-align: right; padding: 10px 5px; font-size: 15px; }
.start-items { flex: 1; display: flex; flex-direction: column; padding: 2px; position: relative; }
.start-item { padding: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 13px; position: relative; }
.start-item:hover { background: #000080; color: #fff; }

/* SUBMENU PRO HRY */
.start-submenu { position: absolute; left: 100%; bottom: 0; background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; width: 170px; display: flex; flex-direction: column; box-shadow: 2px 2px 5px rgba(0,0,0,0.3); z-index: 9999; }
.start-submenu.hidden { display: none; }

.admin-lock { position: absolute; bottom: 5px; right: 5px; font-size: 10px; text-decoration: none; }

/* OKNA */
.window { position: absolute; background: #c0c0c0; border: 2px solid; border-color: #fff #000 #000 #fff; display: flex; flex-direction: column; min-width: 250px; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); }
.title-bar { background: #000080; color: #fff; padding: 3px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; cursor: grab; font-size: 13px; }
.title-bar.inactive { background: #808080; }
.title-bar-controls button { width: 16px; height: 16px; background: #c0c0c0; border: 1px solid #fff; border-right-color: #000; border-bottom-color: #000; font-size: 10px; font-weight: bold; line-height: 12px; padding:0; margin-left: 2px; cursor: pointer; }

/* Zde odstraněno white-space: pre-wrap, aby labely v ankete nedělaly obří mezery */
.window-content { padding: 6px; font-size: 13px; word-break: break-word; overflow: hidden; max-height: calc(100vh - 100px); user-select: text; line-height: 1.25; }

/* CHAT ZEBRA & EMOJIS */
.chat-msg { padding: 4px 3px; border-bottom: 1px dotted #ccc; word-break: break-word; white-space: pre-wrap; }
.chat-msg:nth-child(even) { background: #e0e0e0; }
.chat-time { color: #555; font-size: 10px; }
.chat-input-area { display: flex; gap: 5px; margin-top: 5px; }
.chat-input-area input { flex: 1; }
.emoji-panel { display: flex; gap: 10px; padding: 5px 0; font-size: 16px; font-weight: bold; align-items: center; }
.emoji-btn { cursor: pointer; }
.emoji-btn:active { transform: scale(0.8); }

/* HRY / ANKETY */
canvas { background: #000; display: block; margin: 0 auto; border: 2px inset #fff; touch-action: none; overflow: hidden; }

.miny-grid { display: grid; grid-template-columns: repeat(10, 20px); width: 200px; height: 200px; background: #808080; border: 2px solid; border-color: #808080 #fff #fff #808080; margin: 0 auto; }
.miny-cell { width: 20px; height: 20px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 12px; cursor: pointer; }
.miny-cell.revealed { border: 1px solid #808080; background: #dcdcdc; }

/* POLL GRAPHS */
.poll-bar-wrapper { width: 100%; background: #808080; border: 1px inset #fff; height: 10px; margin-bottom: 4px; margin-top: 1px; }
.poll-bar-fill { background: #000080; height: 100%; }

/* MOBILNÍ VERZE */
@media (max-width: 768px) {
    .taskbar-app span { display: none; }
    .taskbar-app { min-width: 32px; width: 32px; justify-content: center; padding: 0; }
    .window { top: 0 !important; left: 0 !important; width: 100% !important; height: calc(100% - 35px) !important; transform: none !important; }
    .title-bar { cursor: default; }
    .window-content { max-height: calc(100vh - 65px); }
}