* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body { background-color: #008080; background-size: cover; background-position: center; background-attachment: fixed; font-family: "MS Sans Serif", Tahoma, sans-serif; overflow: hidden; position: relative; -webkit-tap-highlight-color: transparent; }

/* ============ BOOT ============ */
.boot-screen { position: fixed; inset: 0; background: #000; color: #fff; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: "Courier New", monospace; transition: opacity 0.5s; cursor: pointer; padding: 20px; text-align: center; }
.boot-sub { font-size: 16px; color: #c0c0c0; margin-bottom: 40px; }
.progress-bar-container { width: 300px; max-width: 80vw; height: 20px; border: 2px solid #808080; padding: 2px; background: #000; }
.progress-bar-fill { height: 100%; width: 0%; background-color: #000080; transition: width 0.1s linear; }
.boot-text { margin-top: 15px; font-size: 12px; color: #808080; }

/* ============ DESKTOP ICONS ============ */
.desktop-icons-left { position: absolute; top: 20px; left: 20px; display: flex; flex-direction: column; gap: 16px; z-index: 1; }
.games-icons-right { position: absolute; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 16px; z-index: 1; align-items: center; }
.desktop-icon { width: 80px; display: flex; flex-direction: column; align-items: center; text-align: center; user-select: none; cursor: pointer; }
.desktop-icon .icon-img { width: 32px; height: 32px; margin-bottom: 4px; image-rendering: pixelated; object-fit: contain; pointer-events: none; transition: transform 0.1s; }
.desktop-icon:hover .icon-img { transform: translateY(-2px); }
.desktop-icon span { color: #fff; font-size: 12px; padding: 2px 4px; text-shadow: 1px 1px 1px #000; word-break: break-word; pointer-events: none; }
.desktop-icon:hover span { background-color: #000080; }
.desktop-icon:active .icon-img { transform: translateY(1px) scale(0.9); }
.icon-my-computer { position: absolute; bottom: 55px; left: 20px; z-index: 1; }
.icon-trash { position: absolute; bottom: 55px; right: 20px; z-index: 1; }

/* Соцсети по центру (только ПК) */
.desktop-socials-center {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 1;
}

/* Только для мобилки (по умолчанию скрыто) */
.mobile-only { display: none; }

/* ============ MAIN WINDOW ============ */
.main-window { position: absolute; top: calc(50% - 20px); left: 50%; transform: translate(-50%, -50%); background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; width: 950px; height: 600px; max-width: 92vw; max-height: 85vh; box-shadow: 3px 3px 0 #000; padding: 3px; z-index: 2; display: flex; flex-direction: column; }
.main-window.minimized { display: none; }
.title-bar { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: bold; padding: 4px 8px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; flex-shrink: 0; user-select: none; cursor: move; }
.blink-cursor { display: inline-block; animation: blink 0.9s step-end infinite; font-weight: bold; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }
.title-btn { background: #c0c0c0; border: 1px solid; border-color: #fff #808080 #808080 #fff; width: 18px; height: 16px; font-size: 10px; line-height: 14px; text-align: center; color: #000; font-weight: bold; flex-shrink: 0; cursor: pointer; }
.title-btn:active { border-color: #808080 #fff #fff #808080; }
.window-body { padding: 12px; display: flex; gap: 12px; flex: 1; min-height: 0; }
.sidebar { width: 200px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.menu-btn { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; padding: 8px 12px; font-size: 13px; font-family: inherit; font-weight: bold; text-align: left; color: #000; cursor: pointer; }
.menu-btn.active { background: #d4d4d4; border-color: #808080 #fff #fff #808080; }
.content-area { flex: 1; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 25px; color: #000; overflow-y: auto; min-width: 0; }
.welcome-card { background: #f0f0f0; border: 1px solid #808080; padding: 20px; box-shadow: inset 1px 1px 0 #fff; }
.welcome-title { font-size: 24px; color: #000080; margin: 0 0 15px; border-bottom: 2px solid #000080; padding-bottom: 8px; }
.welcome-text { font-size: 15px; line-height: 1.8; color: #222; margin: 0; }
.status-box { background: #ffffcc; border: 1px solid #808000; padding: 12px; margin-top: 25px; font-size: 13px; }

/* ============ APP WINDOWS ============ */
.app-window { display: none; position: absolute; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; box-shadow: 3px 3px 0 #000; padding: 2px; z-index: 100; max-width: 92vw; max-height: 80vh; }
.app-window.show { display: flex; flex-direction: column; }
.app-content { background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 14px; overflow: auto; }
.small-btn { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; padding: 5px 14px; font-family: inherit; font-size: 12px; font-weight: bold; color: #000; cursor: pointer; }
.small-btn:active { border-color: #808080 #fff #fff #808080; }

/* ============ NOTEPAD ============ */
.notepad-window { display: none; position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; width: 360px; max-width: 92vw; box-shadow: 3px 3px 0 #000; padding: 2px; z-index: 100; }
.notepad-window.show { display: block; }
.notepad-content { background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 12px; font-family: "Courier New", monospace; font-size: 13px; min-height: 80px; }
.notepad-hint { color: #808080; font-size: 12px; margin-bottom: 8px; border-bottom: 1px dashed #c0c0c0; padding-bottom: 6px; }
.notepad-link { display: block; padding: 10px 8px; color: #000080; text-decoration: none; font-size: 13px; font-weight: bold; border-bottom: 1px solid #e0e0e0; }
.notepad-link:hover { background: #000080; color: #fff; }

/* ============ PAINT ============ */
.paint-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; background: #c0c0c0; padding: 6px; border: 1px solid #808080; }
.paint-tools input[type="color"] { width: 32px; height: 26px; border: 2px solid; border-color: #808080 #fff #fff #808080; cursor: pointer; }
#paintCanvas { background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; touch-action: none; display: block; width: 100%; max-width: 460px; }

/* ============ WORD ============ */
.word-textarea { width: 100%; flex: 1; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 8px; font-family: "Courier New", monospace; font-size: 13px; outline: none; }
.word-status { font-size: 11px; color: #555; display: flex; justify-content: space-between; padding: 6px 10px; }

/* ============ BROWSER ============ */
.browser-bar { background: #c0c0c0; padding: 4px; display: flex; gap: 6px; align-items: center; border-bottom: 2px solid #808080; }
.browser-url { flex: 1; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 3px 8px; font-size: 12px; font-family: "Courier New", monospace; }
.browser-page { background: #fff; padding: 14px; min-height: 180px; font-size: 13px; }
.browser-page h3 { color: #000080; margin: 0 0 10px; }
.browser-bookmark { display: inline-block; padding: 4px 10px; margin: 3px; background: #e0e0e0; border: 2px solid; border-color: #fff #808080 #808080 #fff; font-size: 12px; color: #000080; text-decoration: none; font-weight: bold; }

/* ============ TRASH ============ */
.trash-msg { text-align: center; padding: 24px 20px; }
.trash-msg .big-icon { font-size: 48px; display: block; margin-bottom: 10px; }

/* ============ DIALOG ============ */
.dialog-content { padding: 14px; font-size: 13px; }
.dialog-input { width: 100%; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 5px 8px; font-family: "Courier New", monospace; font-size: 13px; outline: none; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }

/* ============ TASKBAR ============ */
.taskbar { position: fixed; bottom: 0; left: 0; right: 0; height: 40px; background: #c0c0c0; border-top: 2px solid #fff; display: flex; align-items: center; justify-content: space-between; padding: 3px 6px; z-index: 1000; }
.taskbar-left { display: flex; align-items: center; gap: 8px; overflow: hidden; flex: 1; min-width: 0; }
.start-btn { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; font-weight: bold; font-size: 13px; padding: 3px 10px; display: flex; align-items: center; gap: 6px; height: 30px; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.win-flag { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; width: 14px; height: 14px; }
.win-flag div { width: 6px; height: 6px; }
.flag-red { background: #ff0000; } .flag-green { background: #00ff00; }
.flag-blue { background: #0000ff; } .flag-yellow { background: #ffff00; }
.taskbar-tabs { display: flex; gap: 3px; overflow-x: auto; flex: 1; min-width: 0; height: 30px; }
.taskbar-tab { background: #e0e0e0; border: 2px solid; border-color: #808080 #fff #fff #808080; font-size: 12px; padding: 2px 10px; height: 30px; display: flex; align-items: center; font-weight: bold; min-width: 120px; max-width: 180px; overflow: hidden; white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.taskbar-tab.active { background: #c0c0c0; border-color: #fff #808080 #808080 #fff; }

/* ============ SYSTEM TRAY ============ */
.system-tray { border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 0 6px; font-size: 12px; height: 30px; display: flex; align-items: center; gap: 2px; background: #c0c0c0; font-weight: bold; flex-shrink: 0; }
.tray-btn { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 3px; transition: background 0.1s, transform 0.05s; position: relative; }
.tray-btn:hover { background: rgba(0, 0, 80, 0.15); }
.tray-btn:active { background: rgba(0, 0, 80, 0.35); transform: scale(0.9); }
.tray-btn svg { width: 16px; height: 16px; image-rendering: pixelated; }
.tray-btn img { width: 16px; height: 16px; image-rendering: pixelated; }
.tray-divider { width: 1px; height: 18px; border-left: 1px solid #808080; border-right: 1px solid #fff; margin: 0 2px; }
.tray-clock-block { display: flex; align-items: center; gap: 4px; cursor: pointer; padding: 3px 6px; border-radius: 3px; transition: background 0.1s; }
.tray-clock-block:hover { background: rgba(0, 0, 80, 0.15); }
.tray-time { font-size: 12px; font-weight: bold; }
.tray-date { font-size: 11px; }
.tray-badge { position: absolute; top: -1px; right: -1px; min-width: 13px; height: 13px; background: #ff2020; color: #fff; border-radius: 50%; font-size: 8px; font-weight: bold; display: none; align-items: center; justify-content: center; padding: 0 3px; border: 1px solid #fff; box-shadow: 0 0 3px rgba(255, 32, 32, 0.7); pointer-events: none; }
.tray-badge.show { display: flex; }

/* ============ TRAY POPUPS ============ */
.tray-popup { display: none; position: fixed; bottom: 44px; right: 6px; width: 260px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; box-shadow: 3px 3px 0 #000; padding: 10px; z-index: 1500; animation: trayPopupIn 0.15s ease-out; }
.tray-popup.show { display: block; }
@keyframes trayPopupIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.tray-popup-title { font-size: 12px; font-weight: bold; color: #000080; padding-bottom: 6px; border-bottom: 1px solid #808080; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.tray-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: 11px; text-align: center; }
.tray-cal-grid .cal-weekday { font-weight: bold; color: #555; font-size: 10px; padding: 3px 0; }
.tray-cal-grid .cal-day { padding: 3px 0; border-radius: 2px; }
.tray-cal-grid .cal-day.today { background: #000080; color: #fff; font-weight: bold; }
.cal-month { text-align: center; font-weight: bold; font-size: 12px; color: #000080; margin-bottom: 6px; }

.volume-slider { width: 100%; height: 20px; background: #c0c0c0; position: relative; border: 2px solid; border-color: #808080 #fff #fff #808080; margin: 6px 0; }
.volume-slider input { width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.volume-fill { position: absolute; top: 0; left: 0; bottom: 0; background: linear-gradient(180deg, #1084d0, #000080); pointer-events: none; }
.volume-handle { position: absolute; top: 2px; bottom: 2px; width: 8px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; pointer-events: none; transform: translateX(-50%); }
.volume-value { text-align: center; font-size: 11px; font-weight: bold; color: #000080; margin-top: 6px; }
.tray-popup-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 12px; }

.net-status { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12px; }
.net-dot { width: 8px; height: 8px; border-radius: 50%; background: #00cc00; box-shadow: 0 0 6px rgba(0, 204, 0, 0.7); animation: netPulse 2s ease-in-out infinite; }
@keyframes netPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============ ЛОНЧЕР ИГР ============ */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.game-card { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 100%); border: 2px solid; border-color: #fff #808080 #808080 #fff; cursor: pointer; transition: all 0.1s; text-align: center; user-select: none; }
.game-card:hover { background: linear-gradient(180deg, #e0eaff 0%, #c0d8ff 100%); border-color: #1084d0 #000080 #000080 #1084d0; transform: translateY(-2px); }
.game-card:active { border-color: #808080 #fff #fff #808080; transform: translate(1px, 1px); }
.game-card-icon { width: 48px; height: 48px; margin-bottom: 6px; image-rendering: pixelated; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.game-card-name { font-size: 12px; font-weight: bold; color: #000080; line-height: 1.2; }
.game-card-desc { font-size: 10px; color: #555; margin-top: 2px; }

/* ============ ПАПКА СОЦСЕТЕЙ (только мобилка) ============ */
.socials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.social-card { display: flex; flex-direction: column; align-items: center; padding: 12px 10px; background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 100%); border: 2px solid; border-color: #fff #808080 #808080 #fff; cursor: pointer; transition: all 0.1s; text-align: center; user-select: none; text-decoration: none; color: inherit; }
.social-card:hover { background: linear-gradient(180deg, #e0eaff 0%, #c0d8ff 100%); border-color: #1084d0 #000080 #000080 #1084d0; transform: translateY(-2px); }
.social-card:active { border-color: #808080 #fff #fff #808080; transform: translate(1px, 1px); }
.social-card-icon { width: 40px; height: 40px; margin-bottom: 6px; image-rendering: pixelated; }
.social-card-name { font-size: 12px; font-weight: bold; color: #000080; }
.social-card-desc { font-size: 10px; color: #555; margin-top: 2px; }

/* ============ CHAT PANEL ============ */
.chat-panel { position: fixed; top: 0; right: 0; bottom: 40px; width: 360px; max-width: 92vw; background: #c0c0c0; border-left: 2px solid #fff; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.35); transform: translateX(105%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 2000; display: flex; flex-direction: column; }
.chat-panel.open { transform: translateX(0); }
.chat-header { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; font-weight: bold; font-size: 13px; flex-shrink: 0; }
.chat-header-btn { background: #c0c0c0; border: 1px solid; border-color: #fff #808080 #808080 #fff; width: 18px; height: 16px; font-size: 10px; line-height: 14px; text-align: center; color: #000; font-weight: bold; cursor: pointer; }
.chat-header-btn:active { border-color: #808080 #fff #fff #808080; }
.chat-tabs { display: flex; gap: 2px; background: #b0b0b0; border-bottom: 2px solid #808080; padding: 6px 6px 0 6px; flex-shrink: 0; }
.chat-tab { background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 100%); border: 2px solid; border-color: #fff #808080 #808080 #fff; border-bottom: none; padding: 6px 14px; font-family: inherit; font-size: 12px; font-weight: bold; color: #000; cursor: pointer; border-radius: 5px 5px 0 0; margin-bottom: -2px; transition: all 0.1s; }
.chat-tab:hover:not(.active) { background: linear-gradient(180deg, #f0f0f0, #d8d8d8); }
.chat-tab.active { background: #fff; border-color: #fff #808080 #c0c0c0 #fff; padding-bottom: 8px; box-shadow: inset 0 3px 0 #ffcc00; }
.chat-body { flex: 1; overflow-y: auto; padding: 10px; background: #f8f8f8; }
.chat-body::-webkit-scrollbar { width: 10px; }
.chat-body::-webkit-scrollbar-track { background: #c0c0c0; border: 1px solid #808080; }
.chat-body::-webkit-scrollbar-thumb { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; }

.chat-notif { background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; padding: 8px 10px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; animation: notifSlideIn 0.25s ease-out; }
@keyframes notifSlideIn { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: translateX(0); } }
.chat-notif-icon { width: 36px; height: 36px; flex-shrink: 0; background: #000080; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.chat-notif.achievement .chat-notif-icon { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #4a2c00; }
.chat-notif.boss .chat-notif-icon { background: linear-gradient(135deg, #ff4040, #8a0000); }
.chat-notif.stage .chat-notif-icon { background: linear-gradient(135deg, #00cc66, #008040); }
.chat-notif.craft .chat-notif-icon { background: linear-gradient(135deg, #c060ff, #6020a0); }
.chat-notif.info .chat-notif-icon { background: linear-gradient(135deg, #1084d0, #000080); }
.chat-notif-info { flex: 1; min-width: 0; }
.chat-notif-title { font-size: 12px; font-weight: bold; color: #000; margin-bottom: 3px; }
.chat-notif-text { font-size: 11px; color: #555; line-height: 1.4; word-break: break-word; }
.chat-notif-time { font-size: 10px; color: #999; margin-top: 4px; }
.chat-empty { text-align: center; padding: 40px 20px; color: #808080; font-size: 12px; }

.ach-grid { display: flex; flex-direction: column; gap: 6px; }
.ach-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; background: #fff; border: 2px solid; border-color: #808080 #fff #fff #808080; transition: all 0.15s; }
.ach-card.unlocked { background: linear-gradient(90deg, #fff9d0, #fff); border-color: #808000 #fff #fff #808000; }
.ach-card.locked { opacity: 0.55; }
.ach-card-icon { width: 34px; height: 34px; flex-shrink: 0; background: #c0c0c0; display: flex; align-items: center; justify-content: center; font-size: 18px; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.ach-card.unlocked .ach-card-icon { background: linear-gradient(135deg, #ffd700, #ff8c00); }
.ach-card-info { flex: 1; min-width: 0; }
.ach-card-name { font-size: 12px; font-weight: bold; color: #000080; }
.ach-card.unlocked .ach-card-name { color: #800000; }
.ach-card-desc { font-size: 10px; color: #666; margin-top: 2px; }
.ach-card-count { text-align: center; font-size: 11px; color: #555; padding: 8px; background: #e0e0e0; border: 1px solid #a0a0a0; margin-bottom: 8px; }

/* ============ TOAST ============ */
.toast { position: fixed; bottom: 50px; right: 16px; width: 300px; max-width: 88vw; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; box-shadow: 3px 3px 0 #000; padding: 10px; z-index: 3000; display: flex; gap: 10px; align-items: flex-start; animation: toastIn 0.3s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.toast.hide { opacity: 0; transform: translateX(30px); transition: all 0.3s; }
.toast-icon { width: 36px; height: 36px; flex-shrink: 0; background: #000080; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.toast.achievement .toast-icon { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #4a2c00; }
.toast.boss .toast-icon { background: linear-gradient(135deg, #ff4040, #8a0000); }
.toast.stage .toast-icon { background: linear-gradient(135deg, #00cc66, #008040); }
.toast.craft .toast-icon { background: linear-gradient(135deg, #c060ff, #6020a0); }
.toast-info { flex: 1; min-width: 0; }
.toast-title { font-size: 12px; font-weight: bold; color: #000080; margin-bottom: 2px; }
.toast-text { font-size: 11px; color: #333; line-height: 1.3; }

/* ============ SHUTDOWN ============ */
.shutdown-screen { display: none; position: fixed; inset: 0; background: #000; z-index: 10000; align-items: center; justify-content: center; cursor: pointer; }
.shutdown-screen.show { display: flex; }
.shutdown-inner { text-align: center; font-family: "Courier New", monospace; color: #ffb000; padding: 20px; }
.shutdown-title { font-size: 32px; font-weight: bold; margin-bottom: 30px; }

/* ============ МОДАЛЬНЫЕ ДИАЛОГИ WIN98 ============ */
.dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  animation: dialogFadeIn 0.15s ease-out;
}
.dialog-overlay.show { display: flex; }
@keyframes dialogFadeIn { from { opacity: 0; } to { opacity: 1; } }

.dialog-window {
  width: 380px;
  max-width: 92vw;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
  padding: 2px;
  animation: dialogPop 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dialogPop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.dialog-title-bar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  user-select: none;
}

.dialog-close-btn {
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #808080 #808080 #fff;
  width: 18px;
  height: 16px;
  font-size: 10px;
  line-height: 14px;
  text-align: center;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}
.dialog-close-btn:active { border-color: #808080 #fff #fff #808080; }

.dialog-body {
  background: #c0c0c0;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 60px;
}

.dialog-icon {
  font-size: 36px;
  flex-shrink: 0;
  line-height: 1;
  width: 42px;
  text-align: center;
}

.dialog-content { flex: 1; min-width: 0; }

.dialog-text {
  font-size: 13px;
  color: #000;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.dialog-prompt-input {
  width: 100%;
  margin-top: 8px;
  background: #fff;
  border: 2px solid;
  border-color: #808080 #fff #fff #808080;
  padding: 5px 8px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  outline: none;
}

.dialog-buttons-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px 12px;
  background: #c0c0c0;
}

.dialog-btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #808080 #808080 #fff;
  padding: 5px 18px;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  min-width: 80px;
}
.dialog-btn:active { border-color: #808080 #fff #fff #808080; }
.dialog-btn.primary { outline: 1px dotted #000; outline-offset: -4px; }

/* ============ MOBILE ============ */
@media (max-width: 900px) {
  .main-window { width: 96vw; height: 78vh; }
  .sidebar { width: 160px; }
}
@media (max-width: 640px) {
  .desktop-socials-center { display: none; }
  .mobile-only { display: flex; }
  .desktop-icons-left, .games-icons-right { position: fixed; top: 0; height: 74px; flex-direction: row; overflow-x: auto; gap: 4px; padding: 6px; background: rgba(0,0,0,0.28); z-index: 5; }
  .desktop-icons-left { left: 0; right: 0; width: 100%; }
  .games-icons-right { top: 74px; left: 0; right: 0; width: 100%; justify-content: flex-start; }
  .desktop-icon { width: 58px; flex-shrink: 0; }
  .desktop-icon .icon-img { width: 26px; height: 26px; }
  .desktop-icon span { font-size: 9px; }
  .icon-my-computer, .icon-trash { display: none; }
  .main-window { position: fixed; top: 152px; bottom: 44px; left: 2vw; right: 2vw; width: auto; height: auto; transform: none; }
  .window-body { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .menu-btn { font-size: 11px; padding: 7px 10px; white-space: nowrap; flex-shrink: 0; }
  .app-window { position: fixed !important; top: 152px !important; left: 3vw !important; right: 3vw !important; width: auto !important; transform: none !important; max-height: calc(100vh - 200px); }
  .tray-date, .tray-divider { display: none; }
  .chat-panel { width: 92vw; bottom: 40px; }
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .game-card-icon { width: 40px; height: 40px; }
  .dialog-window { width: 92vw; }
  .dialog-icon { font-size: 28px; width: 32px; }
  .dialog-btn { min-width: 70px; padding: 6px 14px; }
}
/* ============ NOTEPAD — КАРТОЧКИ СОЦСЕТЕЙ ============ */
.notepad-content.wide { width: 500px; max-width: 92vw; padding: 0; }

.np-header {
  background: linear-gradient(135deg, #000080, #1084d0);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #000040;
}
.np-header-icon { font-size: 32px; flex-shrink: 0; }
.np-header-info { flex: 1; min-width: 0; }
.np-header-title { font-size: 18px; font-weight: bold; margin: 0 0 2px; }
.np-header-sub { font-size: 11px; opacity: 0.85; margin: 0; }

.np-body {
  padding: 14px;
  background: #fff;
  max-height: 60vh;
  overflow-y: auto;
}

.np-channel {
  display: flex;
  gap: 14px;
  padding: 14px;
  margin-bottom: 10px;
  background: #f8f8f8;
  border: 1px solid #d0d0d0;
  border-left: 5px solid #808080;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.np-channel:last-child { margin-bottom: 0; }
.np-channel:hover {
  background: #f0f6ff;
  border-color: #000080;
  border-left-color: #000080;
  transform: translateX(4px);
  box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Превью канала — большая плитка с эмодзи */
.np-channel-preview {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}
.np-channel-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3) 0%, transparent 60%);
  pointer-events: none;
}

.np-channel-info { flex: 1; min-width: 0; }

.np-channel-name {
  font-size: 15px;
  font-weight: bold;
  color: #000080;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.np-channel-badge {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #ffffcc;
  color: #808000;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #808000;
}

.np-channel-tagline {
  font-size: 12px;
  color: #333;
  margin: 0 0 6px;
  font-weight: bold;
}

.np-channel-desc {
  font-size: 11px;
  color: #666;
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.np-channel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: #808080;
}
.np-channel-meta-item { display: flex; align-items: center; gap: 3px; }

.np-channel-arrow {
  align-self: center;
  color: #a0a0a0;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.np-channel:hover .np-channel-arrow {
  color: #000080;
  transform: translateX(3px);
}

.np-footer {
  padding: 10px 14px;
  background: #e8e8e8;
  border-top: 1px solid #c0c0c0;
  text-align: center;
  font-size: 10px;
  color: #808080;
  font-family: "Courier New", monospace;
}

/* Цветные полосы слева под каждую соцсеть */
.np-channel.youtube { border-left-color: #ff0000; }
.np-channel.youtube:hover { border-left-color: #cc0000; }
.np-channel.youtube .np-channel-name { color: #cc0000; }

.np-channel.twitch { border-left-color: #9146FF; }
.np-channel.twitch:hover { border-left-color: #6441a5; }
.np-channel.twitch .np-channel-name { color: #6441a5; }

.np-channel.discord { border-left-color: #5865F2; }
.np-channel.discord:hover { border-left-color: #3c45a5; }
.np-channel.discord .np-channel-name { color: #3c45a5; }

.np-channel.telegram { border-left-color: #0088cc; }
.np-channel.telegram:hover { border-left-color: #005f8f; }
.np-channel.telegram .np-channel-name { color: #005f8f; }

/* Анимация появления карточек */
.np-channel {
  animation: npCardIn 0.3s ease-out backwards;
}
.np-channel:nth-child(1) { animation-delay: 0.05s; }
.np-channel:nth-child(2) { animation-delay: 0.1s; }
.np-channel:nth-child(3) { animation-delay: 0.15s; }
.np-channel:nth-child(4) { animation-delay: 0.2s; }
.np-channel:nth-child(5) { animation-delay: 0.25s; }

@keyframes npCardIn {
  from { opacity: 0; transform: translateX(-15px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Мобильная адаптация */
@media (max-width: 640px) {
  .notepad-content.wide { width: 94vw; max-height: 80vh; }
  .np-header { padding: 10px 12px; }
  .np-header-icon { font-size: 26px; }
  .np-header-title { font-size: 15px; }
  .np-header-sub { font-size: 10px; }
  .np-body { padding: 10px; max-height: 55vh; }
  .np-channel { padding: 10px; gap: 10px; }
  .np-channel-preview { width: 60px; height: 60px; font-size: 30px; }
  .np-channel-name { font-size: 13px; }
  .np-channel-tagline { font-size: 11px; }
  .np-channel-desc { font-size: 10px; -webkit-line-clamp: 2; }
  .np-channel-arrow { font-size: 16px; }
}