/* ============================================================
   WebOS - Style.css
   Login, Masaüstü, Pencere Yönetimi, Uygulamalar
   ============================================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --accent: #60cdff;
}

html, body {
    width: 100%; height: 100%; overflow: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    user-select: none; -webkit-user-select: none;
    background: #000;
}

.hidden { display: none !important; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
#loginScreen {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}

.login-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0a1628, #1a1a3e, #2d1b69, #1a3a5c);
    filter: blur(0px);
}

.login-bg::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0.3);
}

.login-clock {
    position: relative; z-index: 1;
    text-align: center; margin-bottom: 50px;
    animation: fadeInUp 0.6s ease;
}

.login-time {
    font-size: 72px; font-weight: 300;
    color: white; letter-spacing: -2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.login-date {
    font-size: 16px; color: rgba(255,255,255,0.85);
    margin-top: 4px; text-transform: capitalize;
}

.login-container {
    position: relative; z-index: 1;
    animation: fadeInUp 0.6s ease 0.1s both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* User Selection */
.user-select {
    display: flex; gap: 32px;
}

.user-card {
    display: flex; flex-direction: column;
    align-items: center; gap: 12px;
    padding: 20px 30px; border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}

.user-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-4px);
}

.user-card-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 600; color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.user-card:hover .user-card-avatar {
    transform: scale(1.08);
}

.user-card span {
    color: white; font-size: 15px; font-weight: 500;
}

/* Password Entry */
.password-entry {
    display: flex; flex-direction: column;
    align-items: center; gap: 16px;
    animation: fadeInUp 0.3s ease;
}

.selected-user-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; font-weight: 600; color: white;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.selected-user-name {
    color: white; font-size: 20px; font-weight: 500;
}

.password-field {
    display: flex; gap: 8px; margin-top: 8px;
}

.password-field input {
    width: 240px; padding: 10px 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px; background: rgba(255,255,255,0.08);
    color: white; font-size: 14px; outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.password-field input:focus {
    border-color: var(--accent);
    background: rgba(0,0,0,0.3);
}

.password-field input::placeholder { color: #888; }

.login-submit {
    width: 40px; height: 40px;
    border: none; border-radius: 8px;
    background: rgba(255,255,255,0.1);
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.15s;
}

.login-submit:hover { background: rgba(255,255,255,0.2); }

.login-error {
    color: #ff6b6b; font-size: 13px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.back-to-users {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none;
    color: rgba(255,255,255,0.6); font-size: 12px;
    cursor: pointer; padding: 6px 12px;
    border-radius: 6px; font-family: inherit;
    transition: color 0.15s, background 0.15s;
    margin-top: 8px;
}

.back-to-users:hover {
    color: white; background: rgba(255,255,255,0.08);
}

/* ============================================================
   DESKTOP
   ============================================================ */
#desktop {
    width: 100%; height: calc(100% - 48px);
    background-size: cover; position: relative; overflow: hidden;
}

#desktop::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(72,49,157,0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(30,100,160,0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(100,40,120,0.2) 0%, transparent 50%);
    pointer-events: none;
}

/* ===== DESKTOP ICONS ===== */
.desktop-icons {
    padding: 20px; display: flex; flex-direction: column;
    gap: 8px; position: relative; z-index: 1;
}

.desktop-icon {
    display: flex; flex-direction: column; align-items: center;
    width: 80px; padding: 8px; border-radius: 8px;
    cursor: pointer; transition: background 0.15s;
}

.desktop-icon:hover { background: rgba(255,255,255,0.1); }
.desktop-icon:active { background: rgba(255,255,255,0.15); }

.desktop-icon .icon-img {
    width: 48px; height: 48px; margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    display: flex; align-items: center; justify-content: center;
}

.desktop-icon span {
    color: white; font-size: 11px; text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.3; word-break: break-word;
}

/* ============================================================
   TASKBAR
   ============================================================ */
#taskbar {
    width: 100%; height: 48px;
    background: rgba(32,32,32,0.85);
    backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 12px; position: fixed; bottom: 0; left: 0;
    z-index: 9999;
}

.taskbar-left { display: flex; align-items: center; gap: 4px; }

.start-btn {
    width: 40px; height: 40px; border: none;
    background: transparent; border-radius: 6px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.15s;
}

.start-btn:hover { background: rgba(255,255,255,0.1); }

.taskbar-center {
    display: flex; align-items: center; gap: 4px;
    position: absolute; left: 50%; transform: translateX(-50%);
}

.taskbar-app {
    width: 44px; height: 40px; border: none;
    background: transparent; border-radius: 6px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    position: relative; transition: background 0.15s;
}

.taskbar-app:hover { background: rgba(255,255,255,0.1); }
.taskbar-app.active { background: rgba(255,255,255,0.08); }

.taskbar-indicator {
    position: absolute; bottom: 2px; width: 0;
    height: 3px; background: var(--accent);
    border-radius: 2px; transition: width 0.2s;
}

.taskbar-app.active .taskbar-indicator { width: 16px; }
.taskbar-app.open .taskbar-indicator { width: 6px; }

.taskbar-right { display: flex; align-items: center; gap: 8px; }

.clock {
    color: white; font-size: 12px; padding: 4px 8px;
    border-radius: 6px; cursor: pointer;
    text-align: center; line-height: 1.4;
    transition: background 0.15s;
}

.clock:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   START MENU
   ============================================================ */
#startMenu {
    position: fixed; bottom: 56px; left: 50%;
    transform: translateX(-50%);
    width: 600px; max-height: 680px;
    background: rgba(44,44,44,0.92);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    z-index: 10000; overflow: hidden;
    animation: startMenuIn 0.2s ease-out;
}

@keyframes startMenuIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.start-menu-header { padding: 24px 24px 16px; }

.start-search {
    width: 100%; padding: 10px 16px;
    border: 2px solid transparent; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    color: white; font-size: 14px; outline: none;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.start-search:focus {
    border-color: var(--accent);
    background: rgba(0,0,0,0.3);
}

.start-search::placeholder { color: #888; }

.start-menu-apps {
    padding: 8px 24px 24px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.start-app {
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    padding: 16px 8px; border-radius: 8px;
    cursor: pointer; transition: background 0.15s;
}

.start-app:hover { background: rgba(255,255,255,0.08); }
.start-app span { color: white; font-size: 12px; }

.start-menu-footer {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.start-user {
    display: flex; align-items: center; gap: 12px;
    padding: 6px 12px; border-radius: 6px;
    cursor: pointer; transition: background 0.15s;
}

.start-user:hover { background: rgba(255,255,255,0.08); }

.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #60cdff, #0078d4);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 14px; font-weight: 600;
}

.start-user span, .start-menu-footer span { color: white; font-size: 13px; }

.power-btn {
    width: 36px; height: 36px; border: none;
    background: transparent; border-radius: 6px;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.15s;
}

.power-btn:hover { background: rgba(255,80,80,0.2); }

/* ============================================================
   WINDOWS
   ============================================================ */
.app-window {
    position: absolute; background: #1e1e1e;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
    display: flex; flex-direction: column;
    min-width: 400px; min-height: 300px;
    z-index: 100; transition: box-shadow 0.15s;
    animation: windowOpen 0.2s ease-out;
}

.app-window.focused {
    box-shadow: 0 12px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.12);
}

.app-window.minimized { display: none !important; }

.app-window.maximized {
    top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 48px) !important;
    border-radius: 0;
}

@keyframes windowOpen {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* Title bar */
.window-titlebar {
    height: 36px; background: #2d2d2d;
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 0 4px 0 12px;
    cursor: default; flex-shrink: 0;
}

.focused .window-titlebar { background: #323232; }

.window-title-left { display: flex; align-items: center; gap: 8px; }
.window-icon { width: 16px; height: 16px; }
.window-title {
    font-size: 12px; color: #ccc;
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
}

.focused .window-title { color: white; }

.window-controls { display: flex; align-items: center; height: 100%; }

.win-ctrl-btn {
    width: 46px; height: 100%; border: none;
    background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.1s;
}

.win-ctrl-btn:hover { background: rgba(255,255,255,0.1); }
.win-ctrl-btn.close-btn:hover { background: #c42b1c; }
.win-ctrl-btn svg { fill: #ccc; }
.focused .win-ctrl-btn svg { fill: white; }
.win-ctrl-btn.close-btn:hover svg { fill: white; }

/* Window content */
.window-content {
    flex: 1; overflow: hidden; position: relative;
    display: flex; flex-direction: column;
    min-height: 0;
}

.app-frame {
    width: 100%; flex: 1; border: none; background: white;
}

/* Resize handles */
.resize-handle { position: absolute; z-index: 10; }
.resize-handle.n { top: -4px; left: 8px; right: 8px; height: 8px; cursor: n-resize; }
.resize-handle.s { bottom: -4px; left: 8px; right: 8px; height: 8px; cursor: s-resize; }
.resize-handle.e { right: -4px; top: 8px; bottom: 8px; width: 8px; cursor: e-resize; }
.resize-handle.w { left: -4px; top: 8px; bottom: 8px; width: 8px; cursor: w-resize; }
.resize-handle.ne { top: -4px; right: -4px; width: 16px; height: 16px; cursor: ne-resize; }
.resize-handle.nw { top: -4px; left: -4px; width: 16px; height: 16px; cursor: nw-resize; }
.resize-handle.se { bottom: -4px; right: -4px; width: 16px; height: 16px; cursor: se-resize; }
.resize-handle.sw { bottom: -4px; left: -4px; width: 16px; height: 16px; cursor: sw-resize; }

/* ============================================================
   BROWSER APP
   ============================================================ */
.browser-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: #292929; flex-shrink: 0;
}

.browser-nav { display: flex; gap: 2px; }

.nav-btn {
    width: 32px; height: 32px; border: none;
    background: transparent; border-radius: 50%;
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    transition: background 0.15s;
}

.nav-btn:hover { background: rgba(255,255,255,0.08); }

.url-bar-container {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 0 12px;
    transition: border-color 0.2s, background 0.2s;
}

.url-bar-container:focus-within {
    border-color: var(--accent);
    background: rgba(0,0,0,0.3);
}

.url-bar {
    flex: 1; padding: 6px 0; border: none;
    background: transparent; color: #ccc;
    font-size: 13px; outline: none; font-family: inherit;
}

.url-bar::selection { background: #264f78; }

.browser-bookmarks {
    display: flex; gap: 6px; padding: 4px 12px 8px;
    background: #292929; flex-shrink: 0; overflow-x: auto;
}

.bookmark-chip {
    padding: 4px 12px; border: none;
    background: rgba(255,255,255,0.06);
    color: #aaa; font-size: 11px; border-radius: 16px;
    cursor: pointer; white-space: nowrap;
    transition: background 0.15s; font-family: inherit;
}

.bookmark-chip:hover { background: rgba(255,255,255,0.12); color: white; }

/* Browser History Panel */
.browser-history-panel {
    position: absolute; top: 90px; right: 12px;
    width: 350px; max-height: 300px;
    background: rgba(40,40,40,0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; z-index: 20;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    overflow-y: auto;
}

.history-header {
    padding: 12px 16px; color: #ddd; font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.history-item {
    display: flex; gap: 12px; align-items: center;
    padding: 10px 16px; cursor: pointer;
    transition: background 0.1s;
}

.history-item:hover { background: rgba(255,255,255,0.06); }

.history-time {
    color: #777; font-size: 11px; min-width: 40px;
    font-variant-numeric: tabular-nums;
}

.history-title {
    color: #ccc; font-size: 12px;
    white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   DISCORD / TELEGRAM ACCOUNT BAR
   ============================================================ */
.app-account-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 16px; flex-shrink: 0;
    font-size: 12px;
}

.discord-bar { background: #2f3136; }
.telegram-bar { background: #17212b; }

.account-label { color: #888; }
.account-name { color: #fff; font-weight: 600; }
.account-divider { color: #555; }
.account-detail { color: #aaa; }

.app-loading {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; gap: 12px; color: #999;
    background: #1e1e1e; padding: 20px;
    text-align: center;
}

.open-external-btn {
    padding: 10px 24px; background: #5865F2;
    color: white; border: none; border-radius: 8px;
    font-size: 14px; cursor: pointer; font-family: inherit;
    transition: background 0.15s, transform 0.1s;
    margin-top: 8px;
}

.open-external-btn:hover { background: #4752c4; transform: scale(1.02); }
.open-external-btn.telegram { background: #2AABEE; }
.open-external-btn.telegram:hover { background: #1e96d1; }

/* Server badge */
.account-badge { font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.server-badge { background: #2ea043; color: white; margin-left: auto; }
.browser-bar { background: #292929; }

/* VNC frame (fullscreen in window) */
.vnc-frame {
    background: #1e1e1e !important;
    flex: 1 !important;
    width: 100% !important;
    min-height: 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* ============================================================
   LAUNCHER PAGE (lokal mod)
   ============================================================ */
.launcher-page {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 32px; gap: 24px; overflow-y: auto;
}

.launcher-hero {
    display: flex; flex-direction: column;
    align-items: center; gap: 12px; text-align: center;
}

.launcher-logo {
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
    animation: launcherPulse 3s ease-in-out infinite;
}

@keyframes launcherPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.launcher-title {
    color: white; font-size: 28px; font-weight: 600;
    letter-spacing: -0.5px;
}

.launcher-subtitle {
    color: rgba(255,255,255,0.6); font-size: 14px;
    max-width: 300px;
}

.launcher-account-card {
    display: flex; align-items: center; gap: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 14px 20px;
    min-width: 280px;
}

.launcher-account-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 18px; font-weight: 600;
    flex-shrink: 0;
}

.launcher-account-info { display: flex; flex-direction: column; gap: 3px; }
.launcher-account-name { color: white; font-size: 15px; font-weight: 600; }
.launcher-account-detail {
    color: rgba(255,255,255,0.5); font-size: 12px;
    display: flex; align-items: center; gap: 6px;
}

.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    display: inline-block; flex-shrink: 0;
}

.status-dot.online { background: #3ba55c; box-shadow: 0 0 6px rgba(59,165,92,0.5); }

.launcher-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 12px 32px;
    border: none; border-radius: 10px;
    color: white; font-size: 15px; font-weight: 600;
    cursor: pointer; font-family: inherit;
    transition: filter 0.15s, transform 0.1s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.launcher-btn:hover { filter: brightness(1.15); transform: translateY(-1px); }
.launcher-btn:active { transform: translateY(0); }

.launcher-hint {
    color: rgba(255,255,255,0.3); font-size: 11px;
}

.launcher-shortcuts {
    display: flex; gap: 8px; margin-top: 8px;
}

.launcher-shortcut {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer; transition: background 0.15s;
}

.launcher-shortcut:hover { background: rgba(255,255,255,0.1); }
.launcher-shortcut span { color: #aaa; font-size: 11px; }

/* ============================================================
   FILES APP
   ============================================================ */
.files-tabs {
    display: flex; gap: 0; background: #252525;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0; padding: 0 8px;
}

.files-tab {
    padding: 10px 20px; border: none;
    background: transparent; color: #888;
    font-size: 12px; cursor: pointer;
    border-bottom: 2px solid transparent;
    font-family: inherit; transition: all 0.15s;
}

.files-tab:hover { color: #ccc; background: rgba(255,255,255,0.04); }
.files-tab.active { color: white; border-bottom-color: var(--accent); }

.files-panel { flex: 1; overflow-y: auto; }

.files-empty {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #666; font-size: 13px;
}

.files-grid {
    flex: 1; padding: 16px; overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px; align-content: start;
}

.file-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    padding: 12px 8px; border-radius: 8px;
    cursor: pointer; transition: background 0.15s;
}

.file-item:hover { background: rgba(255,255,255,0.06); }
.file-item:active { background: rgba(255,255,255,0.1); }

.file-icon {
    width: 40px; height: 48px;
    display: flex; align-items: center; justify-content: center;
}

.file-name {
    color: #ccc; font-size: 11px;
    text-align: center; word-break: break-word;
    line-height: 1.3;
}

.files-statusbar {
    display: flex; justify-content: space-between;
    padding: 6px 16px; background: #252525;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.files-statusbar span {
    color: #888; font-size: 11px;
}

/* ============================================================
   NOTEPAD APP
   ============================================================ */
.notepad-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 8px; background: #2a2a2a;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.notepad-save-btn {
    display: flex; align-items: center; gap: 4px;
    padding: 4px 10px; background: rgba(96,205,255,0.15);
    color: #60cdff; border: 1px solid rgba(96,205,255,0.3);
    border-radius: 4px; cursor: pointer; font-size: 11px;
    transition: background 0.2s;
}
.notepad-save-btn:hover { background: rgba(96,205,255,0.25); }

.notepad-menu {
    display: flex; gap: 0;
}

.notepad-menu span {
    color: #aaa; font-size: 12px;
    padding: 4px 10px; border-radius: 4px;
    cursor: pointer; transition: background 0.1s;
}

.notepad-menu span:hover { background: rgba(255,255,255,0.08); color: white; }

.notepad-info {
    display: flex; justify-content: space-between;
    padding: 6px 12px; background: #252525;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.notepad-info span { color: #888; font-size: 11px; }

.notepad-editor {
    flex: 1; width: 100%; padding: 16px;
    background: #1e1e1e; color: #d4d4d4;
    border: none; outline: none; resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px; line-height: 1.6;
    tab-size: 4; white-space: pre-wrap;
}

.notepad-editor::selection { background: #264f78; }

.notepad-statusbar {
    display: flex; justify-content: space-between;
    padding: 4px 12px; background: #007acc;
    flex-shrink: 0;
}

.notepad-statusbar span { color: white; font-size: 11px; }

/* ============================================================
   CONTEXT MENU
   ============================================================ */
.context-menu {
    position: fixed;
    background: rgba(44,44,44,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 4px;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 100000;
}

.context-menu-item {
    padding: 8px 16px; color: #ddd; font-size: 12px;
    border-radius: 4px; cursor: pointer;
    transition: background 0.1s;
}

.context-menu-item:hover { background: rgba(255,255,255,0.08); }

.context-menu-divider {
    height: 1px; background: rgba(255,255,255,0.08);
    margin: 4px 8px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ============================================================
   CLOCK POPUP & STOPWATCH
   ============================================================ */
#clockPopup {
    position: fixed; bottom: 56px; right: 12px;
    width: 300px; background: rgba(44,44,44,0.95);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    z-index: 10001;
    animation: startMenuIn 0.2s ease-out;
}

.clock-popup-time {
    font-size: 42px; font-weight: 300;
    color: white; text-align: center;
    letter-spacing: -1px;
}

.clock-popup-date {
    font-size: 13px; color: rgba(255,255,255,0.6);
    text-align: center; margin-top: 4px;
    text-transform: capitalize;
}

.clock-popup-divider {
    height: 1px; background: rgba(255,255,255,0.08);
    margin: 16px 0;
}

.stopwatch-section { text-align: center; }

.stopwatch-label {
    font-size: 11px; color: #888;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 8px;
}

.stopwatch-display {
    font-size: 36px; font-weight: 300;
    color: var(--accent); font-variant-numeric: tabular-nums;
    font-family: 'Consolas', 'Courier New', monospace;
    margin-bottom: 12px;
}

.stopwatch-controls { display: flex; gap: 8px; justify-content: center; }

.sw-btn {
    padding: 8px 20px; border: none; border-radius: 6px;
    font-size: 12px; cursor: pointer; font-family: inherit;
    transition: background 0.15s, transform 0.1s;
}

.sw-start {
    background: #2ea043; color: white;
}

.sw-start.sw-running { background: #d32f2f; }
.sw-start:hover { filter: brightness(1.15); }

.sw-reset {
    background: rgba(255,255,255,0.08); color: #ccc;
}

.sw-reset:hover { background: rgba(255,255,255,0.15); }

/* ============================================================
   WORD APP
   ============================================================ */
.word-toolbar {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 12px; background: #2B579A;
    flex-shrink: 0; flex-wrap: wrap;
}

.word-toolbar-group {
    display: flex; align-items: center; gap: 2px;
}

.word-toolbar-sep {
    width: 1px; height: 24px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px;
}

.word-btn {
    width: 32px; height: 30px; border: none;
    background: transparent; color: white;
    border-radius: 4px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-family: inherit;
    transition: background 0.1s;
}

.word-btn:hover { background: rgba(255,255,255,0.15); }
.word-btn:active { background: rgba(255,255,255,0.25); }

.word-select {
    padding: 4px 8px; background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white; border-radius: 4px;
    font-size: 12px; cursor: pointer;
    font-family: inherit;
}

.word-select option { background: #2d2d2d; color: white; }

.word-color {
    width: 30px; height: 28px; border: none;
    border-radius: 4px; cursor: pointer;
    background: transparent; padding: 2px;
}

.word-info {
    display: flex; justify-content: space-between;
    padding: 6px 16px; background: #1e3a5f;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    flex-shrink: 0;
}

.word-info span { color: rgba(255,255,255,0.6); font-size: 11px; }

.word-editor {
    flex: 1; padding: 32px 48px;
    background: #1e1e1e; color: #d4d4d4;
    font-size: 14px; line-height: 1.8;
    overflow-y: auto; outline: none;
    font-family: 'Segoe UI', sans-serif;
    min-height: 200px;
}

.word-editor:focus { background: #1e1e1e; }
.word-editor::selection { background: #264f78; }
.word-editor p { margin-bottom: 8px; }

.word-statusbar {
    display: flex; justify-content: space-between;
    padding: 4px 12px; background: #2B579A;
    flex-shrink: 0;
}

.word-statusbar span { color: white; font-size: 11px; }

/* ============================================================
   EXCEL APP
   ============================================================ */
.excel-toolbar {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px; background: #1a5e35;
    flex-shrink: 0;
}

.excel-toolbar-group {
    display: flex; align-items: center; gap: 8px;
    flex: 1;
}

.excel-cell-ref {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px; padding: 4px 12px;
    color: white; font-size: 12px;
    font-family: 'Consolas', monospace;
    min-width: 50px; text-align: center;
}

.excel-formula-bar {
    flex: 1; padding: 5px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px; color: white;
    font-size: 12px; outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.excel-formula-bar:focus { border-color: #4caf50; }
.excel-formula-bar::placeholder { color: #666; }

.excel-grid-wrapper {
    flex: 1; overflow: auto; background: #1e1e1e;
}

.excel-table {
    border-collapse: collapse; width: max-content;
    min-width: 100%;
}

.excel-col-header, .excel-row-header, .excel-corner {
    background: #252525; color: #aaa;
    font-size: 11px; font-weight: 500;
    padding: 4px 8px; text-align: center;
    border: 1px solid rgba(255,255,255,0.06);
    position: sticky; z-index: 2;
    user-select: none;
}

.excel-col-header { top: 0; min-width: 80px; }
.excel-row-header { left: 0; min-width: 40px; }
.excel-corner { top: 0; left: 0; z-index: 3; }

.excel-cell {
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0;
}

.excel-cell-active {
    outline: 2px solid #4caf50;
    outline-offset: -1px;
    z-index: 1; position: relative;
}

.excel-input {
    width: 100%; padding: 4px 6px;
    background: transparent; border: none;
    color: #d4d4d4; font-size: 12px;
    font-family: 'Consolas', monospace;
    outline: none;
}

.excel-input:focus { background: rgba(76,175,80,0.05); }

.excel-statusbar {
    display: flex; justify-content: space-between;
    padding: 4px 12px; background: #217346;
    flex-shrink: 0;
}

.excel-statusbar span { color: white; font-size: 11px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #startMenu {
        width: calc(100% - 16px); left: 8px;
        transform: none; bottom: 56px;
    }
    @keyframes startMenuIn {
        from { opacity: 0; transform: translateY(20px) scale(0.95); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .start-menu-apps { grid-template-columns: repeat(3, 1fr); }
    .user-select { flex-direction: column; gap: 16px; }
    .login-time { font-size: 48px; }
}

/* ===== ADMIN PANEL ===== */
.admin-panel {
    padding: 20px; overflow-y: auto; height: 100%;
    font-size: 13px; color: #e0e0e0;
}
.admin-section {
    background: rgba(255,255,255,0.04); border-radius: 8px;
    padding: 16px; margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.06);
}
.admin-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.admin-title { font-size: 14px; font-weight: 600; color: #fff; margin: 0 0 12px 0; }
.admin-section-header .admin-title { margin-bottom: 0; }
.admin-form { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-input {
    flex: 1; min-width: 140px; padding: 8px 12px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px; color: #fff; font-size: 13px; outline: none;
}
.admin-input:focus { border-color: #60cdff; }
.admin-input::placeholder { color: rgba(255,255,255,0.35); }
.admin-btn {
    padding: 8px 16px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 12px; font-weight: 500;
    transition: all 0.15s;
}
.admin-btn-create { background: #0078d4; color: #fff; }
.admin-btn-create:hover { background: #1a8ae8; }
.admin-btn-refresh { background: rgba(255,255,255,0.08); color: #ccc; }
.admin-btn-refresh:hover { background: rgba(255,255,255,0.15); }
.admin-btn-delete { background: rgba(220,53,69,0.2); color: #f44336; }
.admin-btn-delete:hover { background: rgba(220,53,69,0.4); }
.admin-btn-start { background: rgba(76,175,80,0.2); color: #4caf50; }
.admin-btn-start:hover { background: rgba(76,175,80,0.4); }
.admin-message {
    margin-top: 10px; padding: 8px 12px; border-radius: 6px;
    font-size: 12px; transition: opacity 0.3s;
}
.admin-msg-success { background: rgba(76,175,80,0.15); color: #4caf50; border: 1px solid rgba(76,175,80,0.3); }
.admin-msg-error { background: rgba(244,67,54,0.15); color: #f44336; border: 1px solid rgba(244,67,54,0.3); }
.admin-msg-info { background: rgba(33,150,243,0.15); color: #60cdff; border: 1px solid rgba(33,150,243,0.3); }
.admin-user-list { display: flex; flex-direction: column; gap: 6px; }
.admin-user-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 12px; background: rgba(255,255,255,0.03);
    border-radius: 6px; border: 1px solid rgba(255,255,255,0.05);
}
.admin-user-row:hover { background: rgba(255,255,255,0.06); }
.admin-user-info { display: flex; align-items: center; gap: 10px; }
.admin-user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 14px;
}
.admin-user-details { display: flex; flex-direction: column; gap: 2px; }
.admin-user-name { font-weight: 500; color: #fff; }
.admin-user-username { color: rgba(255,255,255,0.4); font-weight: 400; font-size: 11px; }
.admin-user-status { font-size: 11px; }
.admin-user-actions { display: flex; gap: 6px; align-items: center; }
.admin-badge {
    padding: 4px 10px; background: rgba(116,77,169,0.2); color: #b388ff;
    border-radius: 4px; font-size: 11px; font-weight: 500;
    border: 1px solid rgba(116,77,169,0.3);
}
.admin-loading, .admin-error { padding: 20px; text-align: center; color: rgba(255,255,255,0.4); }
