/* ========================================
   Windows 11 Web Desktop
   ======================================== */

:root {
    --win-bg: rgba(243,243,243,0.95);
    --win-titlebar: rgba(243,243,243,0.98);
    --win-border: rgba(0,0,0,0.1);
    --accent: #0078d4;
    --accent-hover: #106ebe;
    --text: #1a1a1a;
    --text-secondary: rgba(0,0,0,0.55);
    --text-tertiary: rgba(0,0,0,0.35);
    --taskbar-h: 48px;
    --radius: 8px;
    --glass: rgba(0,0,0,0.04);
    --glass-border: rgba(0,0,0,0.1);
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

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

html, body {
    width:100%; height:100%; overflow:hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

/* Lock & Login screens keep white text on dark bg */
.lock-screen, .login-screen { color: #ffffff; }
.lock-screen { --text: #ffffff; --text-secondary: rgba(255,255,255,0.6); --text-tertiary: rgba(255,255,255,0.35); }
.login-screen { --text: #ffffff; --text-secondary: rgba(255,255,255,0.6); --text-tertiary: rgba(255,255,255,0.35); }
/* Terminal keeps dark bg + white text */
.terminal-win-content, .terminal-win-content * { color: inherit; }
.t-info, .t-dim, .t-prompt, .t-cmd, .t-result { color: inherit; }
/* Desktop icons label stays white on wallpaper */
.desktop-icon > span { color: white !important; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

/* Terminal keeps dark bg + white text */
.terminal-win-content { --text: #ffffff; --text-secondary: rgba(255,255,255,0.6); }

/* Desktop icons label stays white (on wallpaper bg) */
.desktop-icon span { color: white !important; }
.lock-screen {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer;
    transition: opacity 0.6s ease;
}
.lock-screen.hidden { opacity:0; pointer-events:none; }
.lock-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 40%, #003d6b 100%);
}
.lock-bg::after {
    content:''; position:absolute; inset:0;
    background: radial-gradient(ellipse at 30% 40%, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.lock-content {
    position: relative; z-index:1;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.lock-time {
    font-size: 96px; font-weight: 200; letter-spacing: -4px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.lock-date { font-size: 20px; font-weight: 300; opacity: 0.85; }
.lock-hint {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    font-size: 13px; opacity: 0.6; z-index:1;
    animation: lockHintPulse 2s ease-in-out infinite;
}
@keyframes lockHintPulse { 0%,100%{opacity:0.4} 50%{opacity:0.8} }

/* ===== Login Screen ===== */
.login-screen {
    position: fixed; inset: 0; z-index: 99998;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.login-screen.active { opacity:1; visibility:visible; }
.login-bg {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    backdrop-filter: blur(0px);
}
.login-bg::before {
    content:''; position:absolute; inset:0;
    background: radial-gradient(ellipse at 60% 30%, rgba(0,120,212,0.15) 0%, transparent 60%);
}
.login-content {
    position: relative; z-index:1;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
    animation: loginFadeIn 0.6s ease 0.2s backwards;
}
@keyframes loginFadeIn { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }
.login-avatar {
    width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    background: linear-gradient(135deg, #0078d4, #005a9e);
    display: flex; align-items: center; justify-content: center;
}
.login-avatar img { width:85%; height:85%; object-fit:contain; }
.login-username { font-size: 22px; font-weight: 300; }
.login-input-wrap {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px; padding: 2px 2px 2px 12px;
    backdrop-filter: blur(10px);
    transition: border-color var(--transition);
}
.login-input-wrap:focus-within { border-color: var(--accent); }
.login-password {
    background: transparent; border: none; outline: none;
    color: var(--text); font-size: 14px; width: 200px;
    font-family: inherit;
}
.login-password::placeholder { color: var(--text-tertiary); }
.login-password.login-error { animation: shake 0.3s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
.login-submit {
    width: 36px; height: 36px; border-radius: 3px;
    background: var(--accent); border: none; color: white;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.login-submit:hover { background: var(--accent-hover); }
.login-hint-text { font-size: 12px; color: var(--text-tertiary); }
.login-bottom {
    position: absolute; bottom: 28px; right: 40px; z-index:1;
}
.login-bottom-icons { display: flex; gap: 8px; }
.lb-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: transparent; border: none; color: rgba(255,255,255,0.7);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.lb-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* Login power popover */
.login-power-wrap { position: relative; }
.login-power-popover {
    visibility: hidden; opacity: 0;
    position: absolute; bottom: calc(100% + 8px); right: 0;
    background: rgba(243,243,243,0.97); backdrop-filter: blur(40px);
    border: 1px solid rgba(0,0,0,0.1); border-radius: 8px;
    padding: 4px; min-width: 160px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 10;
}
.login-power-popover.open { visibility: visible; opacity: 1; }

/* ===== Desktop ===== */
.desktop {
    width:100%; height:100%; position:relative; display:none;
    background: linear-gradient(135deg, #0078d4 0%, #005a9e 40%, #003d6b 100%);
}
.wallpaper { position:absolute; inset:0; transition: background 0.5s ease; }

/* ===== Desktop Icons ===== */
.desktop-icons {
    position:absolute; top:20px; left:20px;
    display:flex; flex-direction:column; gap:8px; z-index:1;
}
.desktop-icon {
    display:flex; flex-direction:column; align-items:center; gap:4px;
    padding:8px; border-radius:6px; cursor:pointer; width:80px;
    transition: background var(--transition);
}
.desktop-icon:hover { background: rgba(255,255,255,0.12); }
.desktop-icon:active { background: rgba(255,255,255,0.2); }
.di-icon { width:48px; height:48px; display:flex; align-items:center; justify-content:center; }
.di-icon svg, .di-icon img { width:100%; height:100%; object-fit:contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.di-icon > span { width:100%; height:100%; display:flex; align-items:center; justify-content:center; }
.di-icon > span > svg { width:100%; height:100%; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4)); }
.desktop-icon span {
    font-size:11px; color:white; text-align:center;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8); line-height:1.3;
}

/* ===== Windows Container ===== */
.windows-container {
    position:absolute; top:0; left:0; right:0;
    bottom: var(--taskbar-h); overflow:hidden;
}

/* ===== Win11 Window ===== */
.win11-window {
    position:absolute; min-width:360px; min-height:260px;
    background: rgba(243,243,243,0.96);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    box-shadow: 0 32px 64px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.06);
    display:none; flex-direction:column;
    animation: winOpen 0.2s cubic-bezier(0.16,1,0.3,1);
    overflow:hidden;
    color: #1a1a1a;
}
.win11-window.active { display:flex; }
.win11-window.maximized {
    top:0 !important; left:0 !important;
    width:100% !important; height:calc(100% - var(--taskbar-h)) !important;
    border-radius:0; border:none;
}
.win11-window.minimizing { animation: winMinimize 0.25s ease forwards; }
@keyframes winOpen { from{opacity:0;transform:scale(0.96) translateY(8px)} to{opacity:1;transform:none} }
@keyframes winMinimize { to{opacity:0;transform:scale(0.85) translateY(40px)} }

/* Titlebar */
.win-titlebar {
    height:32px; background: rgba(243,243,243,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    display:flex; align-items:center; justify-content:space-between;
    padding: 0 0 0 12px; flex-shrink:0; cursor:default;
}
.win-titlebar-dark { background: rgba(32,32,32,0.98); }
.win-title-left { display:flex; align-items:center; gap:8px; font-size:12px; color:#444; }
.win-controls { display:flex; height:100%; }
.wc-btn {
    width:46px; height:32px; border:none; background:transparent;
    color:#555; font-size:14px; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition: background var(--transition), color var(--transition);
}
.wc-btn:hover { background: rgba(0,0,0,0.08); color:#000; }
.wc-close:hover { background: #c42b1c !important; color:white; }

/* Window Content */
.win-content {
    flex:1; min-height:0; overflow:auto; background: #f9f9f9;
    color: #1a1a1a;
}
.win-content::-webkit-scrollbar { width:6px; }
.win-content::-webkit-scrollbar-track { background:transparent; }
.win-content::-webkit-scrollbar-thumb { background:rgba(0,0,0,0.15); border-radius:3px; }
.win-content::-webkit-scrollbar-thumb:hover { background:rgba(0,0,0,0.25); }

/* ===== About Page ===== */
.about-page { padding:28px; }
.about-hero { display:flex; align-items:center; gap:20px; margin-bottom:28px; padding-bottom:20px; border-bottom:1px solid #e0e0e0; }
.about-hero .about-avatar { width:72px; height:72px; border-radius:50%; overflow:hidden; flex-shrink:0; background:var(--accent); }
.about-hero .about-avatar img { width:100%; height:100%; object-fit:cover; }
.about-info h1 { font-size:22px; font-weight:600; margin-bottom:4px; }
.about-role { color:#555; font-size:13px; margin-bottom:10px; }
.about-tags { display:flex; gap:8px; }
.tag { padding:3px 10px; border-radius:12px; font-size:11px; font-weight:500; }
.tag-green { background:rgba(16,124,16,0.25); color:#6ccb5f; border:1px solid rgba(16,124,16,0.4); }
.tag-blue { background:rgba(0,120,212,0.2); color:#60cdff; border:1px solid rgba(0,120,212,0.4); }
.about-body h2 { font-size:14px; font-weight:600; margin:20px 0 10px; color:#1a1a1a; }
.about-body p { color:#555; line-height:1.7; font-size:13px; }
.skills-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.skill-card { padding:10px 12px; background:#f0f0f0; border:1px solid #ddd; border-radius:6px; font-size:12px; transition:background var(--transition); }
.skill-card:hover { background:#e8e8e8; }
.tech-tags { display:flex; flex-wrap:wrap; gap:6px; }
.tech-tags span { padding:4px 10px; background:rgba(0,120,212,0.1); border:1px solid rgba(0,120,212,0.3); border-radius:4px; font-size:11px; color:#0078D4; }

/* ===== Projects Page ===== */
.projects-page { padding:28px; }
.projects-page h1 { font-size:22px; font-weight:600; margin-bottom:6px; }
.sub { color:#666; font-size:13px; margin-bottom:20px; }
.projects-list { display:flex; flex-direction:column; gap:8px; }
.project-item { display:flex; align-items:center; gap:14px; padding:14px; background:#f5f5f5; border:1px solid #e0e0e0; border-radius:6px; transition:background var(--transition),border-color var(--transition); cursor:pointer; }
.project-item:hover { background:#ebebeb; border-color:rgba(0,120,212,0.5); }
.pi-icon { font-size:24px; width:44px; height:44px; display:flex; align-items:center; justify-content:center; background:rgba(0,120,212,0.15); border-radius:8px; flex-shrink:0; }
.pi-info { flex:1; }
.pi-info h3 { font-size:13px; font-weight:600; margin-bottom:3px; }
.pi-info p { font-size:12px; color:#666; margin-bottom:6px; }
.pi-tags { display:flex; gap:5px; }
.pi-tags span { padding:2px 7px; background:#e8e8e8; border-radius:3px; font-size:10px; color:#888; }
.pi-arrow { width:28px; height:28px; display:flex; align-items:center; justify-content:center; background:rgba(0,120,212,0.2); border-radius:4px; color:var(--accent); font-size:18px; text-decoration:none; transition:background var(--transition); }
.pi-arrow:hover { background:var(--accent); color:white; }

/* ===== Terminal ===== */
.terminal-win-content { background:#0c0c0c !important; display:flex; flex-direction:column; font-family:'Cascadia Code','Consolas',monospace; font-size:13px; }
.terminal-output { flex:1; padding:12px 16px; overflow-y:auto; }
.t-line { line-height:1.6; min-height:20px; }
.t-info { color:#cccccc; }
.t-dim { color:#666; }
.t-prompt { color:#cccccc; white-space:nowrap; }
.t-cmd { color:#ffffff; }
.t-result { color:#cccccc; white-space:pre-wrap; }
.t-error { color:#f14c4c; }
.t-success { color:#23d18b; }
.terminal-input-row { display:flex; align-items:center; padding:6px 16px 12px; gap:8px; }
.t-input { flex:1; background:transparent; border:none; outline:none; color:#ffffff; font-family:inherit; font-size:13px; caret-color:#ffffff; }

/* ===== Contact Page ===== */
.contact-page { padding:28px; }
.contact-page h1 { font-size:22px; font-weight:600; margin-bottom:6px; }
.contact-page h2 { font-size:15px; font-weight:600; margin:24px 0 12px; }
.contact-cards { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:24px; }
.contact-card { display:flex; align-items:center; gap:12px; padding:14px; background:#f5f5f5; border:1px solid #e0e0e0; border-radius:6px; text-decoration:none; color:#1a1a1a; transition:background var(--transition),border-color var(--transition); }
.contact-card:hover { background:#ebebeb; border-color:rgba(0,120,212,0.5); }
.cc-icon { font-size:22px; }
.cc-label { font-size:10px; color:#999; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:2px; }
.cc-val { font-size:12px; color:#555; }
.contact-form { display:flex; flex-direction:column; gap:10px; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.contact-form input, .contact-form textarea {
    padding:9px 12px; background:#fff; border:1px solid #ccc;
    border-radius:4px; color:#1a1a1a; font-family:inherit; font-size:13px; outline:none;
    transition:border-color var(--transition);
}
.contact-form input:focus, .contact-form textarea:focus { border-color:var(--accent); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color:#aaa; }
.contact-form textarea { resize:vertical; min-height:80px; }
.contact-form button { padding:10px; background:var(--accent); border:none; border-radius:4px; color:white; font-size:13px; font-weight:600; cursor:pointer; transition:background var(--transition); }
.contact-form button:hover { background:var(--accent-hover); }

/* ===== Settings ===== */
.settings-win-content { display:flex !important; flex-direction:row !important; overflow:hidden; }
.settings-sidebar { width:220px; background:#f3f3f3; border-right:1px solid #e0e0e0; display:flex; flex-direction:column; flex-shrink:0; overflow-y:auto; }
.settings-profile { display:flex; align-items:center; gap:12px; padding:20px 16px; border-bottom:1px solid #e0e0e0; }
.settings-profile img { width:44px; height:44px; border-radius:50%; object-fit:cover; background:var(--accent); }
.sp-name { font-size:13px; font-weight:600; }
.sp-sub { font-size:11px; color:#888; }
.settings-nav { padding:8px 0; }
.sn-item { padding:10px 16px; font-size:13px; cursor:pointer; border-radius:4px; margin:1px 6px; transition:background var(--transition); }
.sn-item:hover { background:rgba(0,0,0,0.06); }
.sn-item.active { background:rgba(0,120,212,0.12); color:#0078D4; }
.settings-main { flex:1; overflow-y:auto; padding:24px; }
.settings-panel { display:none; }
.settings-panel.active { display:block; }
.settings-panel h2 { font-size:20px; font-weight:600; margin-bottom:20px; }
.settings-panel h3 { font-size:13px; font-weight:600; margin:16px 0 10px; color:#555; }
.settings-group { display:flex; flex-direction:column; gap:2px; margin-bottom:20px; }
.sg-item { display:flex; align-items:center; gap:14px; padding:14px 16px; background:#f5f5f5; border:1px solid #e0e0e0; border-radius:6px; cursor:pointer; transition:background var(--transition); }
.sg-item:hover { background:#ebebeb; }
.sg-icon { font-size:20px; width:36px; text-align:center; }
.sg-info { flex:1; }
.sg-title { font-size:13px; font-weight:500; }
.sg-sub { font-size:11px; color:#888; margin-top:2px; }
.sg-arrow { color:#aaa; font-size:16px; }
.wallpaper-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.wp-opt { height:60px; border-radius:6px; cursor:pointer; border:2px solid transparent; transition:border-color var(--transition),transform var(--transition); }
.wp-opt:hover { transform:scale(1.04); }
.wp-opt.active { border-color:var(--accent); }
.about-system { display:flex; flex-direction:column; gap:0; }
.as-row { display:flex; justify-content:space-between; padding:12px 0; border-bottom:1px solid #e0e0e0; font-size:13px; }
.as-row span:first-child { color:#666; }

/* ===== Browser Window ===== */
.browser-content { display:flex !important; flex-direction:column !important; background:#fff !important; }
.browser-bar { display:flex; align-items:center; gap:8px; padding:6px 10px; background:#f3f3f3; border-bottom:1px solid #e0e0e0; }
.browser-nav { display:flex; gap:2px; }
.browser-nav button { width:28px; height:28px; background:transparent; border:none; color:#555; cursor:pointer; border-radius:4px; font-size:14px; transition:background var(--transition); }
.browser-nav button:hover { background:rgba(0,0,0,0.08); color:#000; }
.browser-url { flex:1; padding:5px 12px; background:#fff; border:1px solid #ccc; border-radius:20px; font-size:12px; color:#333; }
.browser-body { flex:1; display:flex; align-items:center; justify-content:center; background:#f0f0f0; }
.edge-new-tab { display:flex; flex-direction:column; align-items:center; gap:20px; width:100%; max-width:500px; padding:40px 20px; }
.ent-search { display:flex; align-items:center; gap:10px; width:100%; padding:10px 16px; background:#fff; border:1px solid #ddd; border-radius:24px; }
.ent-search input { flex:1; background:transparent; border:none; outline:none; color:#1a1a1a; font-size:14px; font-family:inherit; }
.ent-search input::placeholder { color:#aaa; }
.ent-greeting { font-size:18px; font-weight:300; color:#666; }

/* ===== Taskbar ===== */
.taskbar {
    position:fixed; bottom:0; left:0; right:0; height:var(--taskbar-h);
    background: rgba(243,243,243,0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border-top: 1px solid rgba(0,0,0,0.1);
    display:grid; grid-template-columns:1fr 5fr 1fr;
    align-items:center; padding:0 8px; z-index:9000;
}
.taskbar-left { flex-shrink:0; }
.taskbar-center {
    display:flex; align-items:center; justify-content:center; gap:2px;
}
.taskbar-right {
    display:flex; align-items:center; justify-content:flex-end; gap:0; position:relative;
}

/* Start button */
.tb-start { width:40px; height:40px; }
.tb-start:hover { background:rgba(0,0,0,0.08); }
.tb-start:active svg { transform:scale(0.9); }

/* Search pill */
.tb-search-pill {
    display:flex; align-items:center; gap:8px;
    height:34px; padding:0 14px;
    background:rgba(0,0,0,0.05); border:1px solid rgba(0,0,0,0.1);
    border-radius:6px; color:rgba(0,0,0,0.5); cursor:pointer; font-size:13px;
    font-family:inherit; transition:background var(--transition);
    min-width:200px;
}
.tb-search-pill:hover { background:rgba(0,0,0,0.08); color:#000; }

/* App buttons container */
.tb-app-buttons { display:flex; align-items:center; gap:2px; }

.tb-btn {
    width:40px; height:40px; border-radius:6px; border:none;
    background:transparent; color:rgba(0,0,0,0.7); cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition: background var(--transition);
    position:relative;
}
.tb-btn:hover { background:rgba(0,0,0,0.08); }
.tb-btn:active { background:rgba(0,0,0,0.12); }

/* Taskbar app buttons */
.tb-app-btn {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    width:44px; height:44px; border-radius:6px; border:none;
    background:transparent; cursor:pointer; position:relative;
    transition: background var(--transition); padding:0;
}
.tb-app-btn:hover { background:rgba(0,0,0,0.08); }
.tb-app-btn.active { background:rgba(0,0,0,0.06); }
.tb-app-btn .tb-app-icon { width:24px; height:24px; display:flex; align-items:center; justify-content:center; }
.tb-app-btn .tb-app-icon svg, .tb-app-btn .tb-app-icon img { width:100%; height:100%; object-fit:contain; }
.tb-app-btn .tb-indicator {
    position:absolute; bottom:3px; left:50%; transform:translateX(-50%);
    width:4px; height:3px; border-radius:2px; background:var(--accent);
    opacity:0; transition:opacity var(--transition);
}
.tb-app-btn.active .tb-indicator { opacity:1; }
.tb-app-btn.minimized .tb-indicator { opacity:1; background:rgba(255,255,255,0.4); }

/* System tray */
.tb-system-tray { display:flex; align-items:center; gap:0; cursor:pointer; border-radius:6px; transition:background var(--transition); }
.tb-system-tray:hover { background:rgba(255,255,255,0.08); }
.tb-tray-btn {
    width:28px; height:40px; border:none; background:transparent;
    color:rgba(0,0,0,0.65); cursor:pointer; display:flex; align-items:center; justify-content:center;
    border-radius:4px; transition:background var(--transition);
}
.tb-tray-btn:hover { color:#000; }
.tb-tray-chevron {
    width:22px; height:22px; border-radius:4px; border:1px solid rgba(0,0,0,0.15);
    margin-right:4px;
}

/* Tray overflow popup */
.tray-overflow {
    position:absolute; bottom:calc(100% + 8px); right:120px;
    background:rgba(243,243,243,0.97); backdrop-filter:blur(40px);
    border:1px solid rgba(0,0,0,0.1); border-radius:10px;
    padding:10px; display:none; gap:4px;
    grid-template-columns:repeat(3,1fr);
    box-shadow:0 8px 32px rgba(0,0,0,0.15);
    animation: popupOpen 0.15s ease;
}
.tray-overflow.open { display:grid; }
.tray-overflow img { border-radius:6px; padding:4px; cursor:pointer; transition:background 0.15s; }
.tray-overflow img:hover { background:rgba(0,0,0,0.08); }

/* Clock */
.tb-clock {
    display:flex; flex-direction:column; align-items:center; justify-content:center;
    padding:0 8px; height:40px; border:none; background:transparent;
    color:rgba(0,0,0,0.75); cursor:pointer; border-radius:4px;
    transition:background var(--transition); min-width:70px;
}
.tb-clock:hover { background:rgba(0,0,0,0.08); }
#tb-time { font-size:12px; font-weight:400; }
#tb-date { font-size:11px; color:var(--text-secondary); }

/* Fullscreen button */
.tb-fullscreen { width:36px; height:36px; color: rgba(0,0,0,0.6); }
.tb-fullscreen svg { transition: transform 0.15s ease; }
.tb-fullscreen:hover { color: rgba(0,0,0,0.9); }
.tb-fullscreen:hover svg { transform: scale(1.15); }

/* Show desktop strip */
.tb-show-desktop {
    width:6px; height:40px; border-radius:0; border-left:1px solid rgba(255,255,255,0.1);
    margin-left:4px;
}
.tb-show-desktop:hover { background:rgba(255,255,255,0.15); }

/* ===== Start Menu ===== */
.start-menu {
    position:fixed; bottom:calc(var(--taskbar-h) + 8px); left:50%; transform:translateX(-50%);
    width:640px; background:rgba(243,243,243,0.97);
    backdrop-filter: blur(60px) saturate(180%);
    -webkit-backdrop-filter: blur(60px) saturate(180%);
    border:1px solid rgba(0,0,0,0.1);
    border-radius:12px; padding:20px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.2);
    z-index:9500; display:none;
    animation: smOpen 0.2s cubic-bezier(0.16,1,0.3,1);
}
.start-menu.open { display:block; }
@keyframes smOpen { from{opacity:0;transform:translateX(-50%) translateY(12px) scale(0.97)} to{opacity:1;transform:translateX(-50%) translateY(0) scale(1)} }
@keyframes popupOpen { from{opacity:0;transform:translateY(8px) scale(0.97)} to{opacity:1;transform:translateY(0) scale(1)} }
.sm-search {
    display:flex; align-items:center; gap:10px;
    background:#fff; border:1px solid #ddd;
    border-radius:6px; padding:8px 14px; margin-bottom:20px;
}
.sm-search input { flex:1; background:transparent; border:none; outline:none; color:#1a1a1a; font-size:13px; font-family:inherit; }
.sm-search input::placeholder { color:#aaa; }
.sm-section-title { font-size:12px; font-weight:600; color:#555; margin-bottom:12px; }
.sm-pinned { display:flex; flex-wrap:wrap; gap:0; margin-bottom:20px; }
.sm-app { display:flex; flex-direction:column; align-items:center; gap:6px; padding:10px 6px; border-radius:6px; cursor:pointer; transition:background var(--transition); width:88px; }
.sm-app:hover { background:rgba(0,0,0,0.06); }
.sm-app-icon { width:40px; height:40px; display:flex; align-items:center; justify-content:center; }
.sm-app-icon img, .sm-app-icon svg { width:100%; height:100%; object-fit:contain; }
.sm-app span { font-size:11px; text-align:center; color:#444; line-height:1.3; }
.sm-recommended { display:grid; grid-template-columns:1fr 1fr; gap:4px; margin-bottom:20px; }
.sm-rec-item { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:6px; cursor:pointer; transition:background var(--transition); }
.sm-rec-item:hover { background:rgba(0,0,0,0.06); }
.sr-icon { font-size:20px; }
.sr-name { font-size:12px; font-weight:500; }
.sr-time { font-size:11px; color:#888; }

/* ===== Power Menu ===== */
.power-menu {
    position:fixed; bottom:calc(var(--taskbar-h) + 8px); right:20px;
    background:rgba(243,243,243,0.97); backdrop-filter:blur(40px);
    border:1px solid rgba(0,0,0,0.1); border-radius:8px;
    padding:6px; z-index:9600; display:none; min-width:160px;
    box-shadow:0 8px 32px rgba(0,0,0,0.15);
    animation: smOpen 0.15s ease;
}
.power-menu.open { display:block; }
.pm-item { padding:10px 14px; border-radius:4px; cursor:pointer; font-size:13px; transition:background var(--transition); }
.pm-item:hover { background:rgba(0,0,0,0.06); }

/* ===== Notification Center ===== */
.notif-center {
    position:fixed; bottom:calc(var(--taskbar-h) + 8px); right:8px;
    width:360px; background:rgba(243,243,243,0.97);
    backdrop-filter:blur(60px) saturate(180%);
    -webkit-backdrop-filter:blur(60px) saturate(180%);
    border:1px solid rgba(0,0,0,0.1); border-radius:12px;
    padding:20px; z-index:9400; display:none;
    box-shadow:0 16px 48px rgba(0,0,0,0.15);
    animation: smOpen 0.2s ease;
}
.notif-center.open { display:block; }
.nc-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
.nc-header span { font-size:14px; font-weight:600; }
.nc-header button { background:transparent; border:none; color:#666; cursor:pointer; font-size:14px; padding:4px; border-radius:4px; }
.nc-header button:hover { background:rgba(0,0,0,0.08); color:#000; }
.nc-time { font-size:48px; font-weight:200; letter-spacing:-2px; line-height:1; color:#1a1a1a; }
.nc-date { font-size:13px; color:#555; margin-bottom:4px; }
.nc-notifs { margin:16px 0; min-height:40px; }
.nc-empty { color:#888; font-size:12px; text-align:center; padding:16px 0; }
.nc-quick-settings { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-bottom:16px; }
.qs-btn { height:64px; background:#f0f0f0; border:1px solid #ddd; border-radius:8px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:background var(--transition); font-size:18px; }
.qs-btn:hover { background:rgba(255,255,255,0.1); }
.qs-btn.active { background:rgba(0,120,212,0.25); border-color:rgba(0,120,212,0.4); color:#60cdff; }
.nc-sliders { display:flex; flex-direction:column; gap:10px; }
.nc-slider-row { display:flex; align-items:center; gap:10px; }
.nc-range { flex:1; accent-color:var(--accent); }

/* ===== Search Overlay ===== */
.search-overlay {
    position:fixed; top:0; left:0; right:0; bottom:0; z-index:9300;
    background:rgba(0,0,0,0.4); backdrop-filter:blur(4px);
    display:none; align-items:flex-start; justify-content:center; padding-top:80px;
}
.search-overlay.open { display:flex; }
.search-box {
    display:flex; align-items:center; gap:12px;
    width:600px; padding:12px 16px;
    background:rgba(40,40,40,0.98); border:1px solid rgba(255,255,255,0.15);
    border-radius:8px; box-shadow:0 16px 48px rgba(0,0,0,0.6);
}
.search-box input { flex:1; background:transparent; border:none; outline:none; color:var(--text); font-size:16px; font-family:inherit; }
.search-box button { background:transparent; border:none; color:var(--text-secondary); cursor:pointer; font-size:16px; padding:4px; }

/* ===== Context Menu ===== */
.context-menu {
    position:fixed; z-index:9800; display:none;
    background:rgba(36,36,36,0.96); backdrop-filter:blur(40px);
    border:1px solid rgba(255,255,255,0.1); border-radius:8px;
    padding:6px; min-width:180px;
    box-shadow:0 8px 32px rgba(0,0,0,0.5);
    animation: smOpen 0.12s ease;
}
.context-menu.open { display:block; }
.cm-item { padding:8px 14px; border-radius:4px; cursor:pointer; font-size:13px; transition:background var(--transition); }
.cm-item:hover { background:rgba(255,255,255,0.08); }
.cm-sep { height:1px; background:var(--glass-border); margin:4px 0; }

/* ===== Responsive ===== */
@media (max-width:768px) {
    .desktop-icons { display:none; }
    .start-menu { width:calc(100vw - 16px); }
    .win11-window { min-width:300px; }
    .skills-grid { grid-template-columns:repeat(2,1fr); }
    .contact-cards { grid-template-columns:1fr; }
    .form-row { grid-template-columns:1fr; }
}

/* ===== Mobile (touch) ===== */
@media (max-width:600px) {
    /* Lock screen */
    .lock-time { font-size: 64px; letter-spacing: -2px; }
    .lock-date { font-size: 15px; }

    /* Windows always fill screen on mobile */
    .win11-window.active {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - var(--taskbar-h)) !important;
        border-radius: 0 !important;
        border: none !important;
        min-width: unset !important;
        min-height: unset !important;
        z-index: 200 !important;
    }

    /* Taskbar adjustments */
    .taskbar {
        grid-template-columns: auto 1fr auto;
        padding: 0 4px;
    }
    .tb-search-pill { min-width: unset; padding: 0 10px; }
    .tb-search-pill span { display: none; }
    .tb-tray-chevron { display: none; }
    .tray-overflow { display: none !important; }
    .tb-notif-bell { display: none; }
    .tb-fullscreen { display: none; }
    .tb-show-desktop { display: none; }

    /* Start menu full width */
    .start-menu {
        width: 100vw;
        left: 0 !important;
        transform: none !important;
        border-radius: 12px 12px 0 0;
        bottom: var(--taskbar-h);
        max-height: 80vh;
        overflow-y: auto;
    }
    @keyframes smOpen {
        from { opacity:0; transform: translateY(12px) scale(0.97); }
        to   { opacity:1; transform: none; }
    }

    /* Quick settings & notif center full width */
    .quick-settings,
    .notif-center {
        width: 100vw;
        right: 0;
        border-radius: 12px 12px 0 0;
        bottom: var(--taskbar-h);
    }

    /* Explorer on mobile: hide nav + search, show content directly */
    .explorer-nav { display: none !important; }
    .explorer-search { display: none !important; }
    .win-content.explorer-content {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        flex: 1 !important;
        min-height: 0 !important;
    }
    #explorer-main {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        background: #fff !important;
        padding: 12px !important;
        display: block !important;
    }

    /* Settings: stack sidebar on top */
    .settings-win-content { flex-direction: column !important; }
    .settings-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--glass-border); }
    .settings-nav { display: flex; flex-wrap: wrap; padding: 4px 8px; }
    .sn-item { padding: 6px 10px; font-size: 12px; }

    /* About page */
    .about-hero { flex-direction: column; text-align: center; }
    .about-tags { justify-content: center; }
    .skills-grid { grid-template-columns: repeat(2,1fr); }
    .contact-cards { grid-template-columns: 1fr; }

    /* Calculator */
    .calc-btn { height: 48px; font-size: 16px; }

    /* Desktop icons — grid on the wallpaper */
    .desktop-icons {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        position: absolute !important;
        top: 16px !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: auto !important;
        padding: 0 12px;
        gap: 8px;
        z-index: 1;
        background: none;
        border: none;
        backdrop-filter: none;
        border-radius: 0;
    }
    .desktop-icon { width: auto; padding: 10px 4px; }
    .di-icon { width: 48px; height: 48px; }
    .desktop-icon > span { font-size: 11px; }

    /* Mobile back button in titlebar */
    .win-titlebar { padding: 0 0 0 8px; }
    .wc-min { display: none; }
    .wc-max { display: none; }

    /* Smooth touch scrolling + bottom padding for last content */
    .settings-main,
    .explorer-nav {
        -webkit-overflow-scrolling: touch;
    }
    /* win-content scrolls normally, but NOT when it's explorer-content */
    .win-content:not(.explorer-content) {
        overflow-y: auto !important;
        padding-bottom: 60px;
        -webkit-overflow-scrolling: touch;
        min-height: 0 !important;
    }

    /* Prevent text selection on tap */
    .taskbar, .win-titlebar, .desktop-icon {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Larger tap targets */
    .wc-btn { width: 40px; height: 40px; font-size: 16px; }
    .tb-btn { width: 44px; height: 44px; }
}

/* ===== Chrome Browser ===== */
.win-titlebar-chrome {
    height: 40px;
    background: #f3f3f3;
    border-bottom: none;
    padding: 0;
    align-items: flex-end;
    gap: 0;
    flex-wrap: nowrap;
    overflow: hidden;
}
.chrome-tabs {
    display: flex; align-items: flex-end; flex: 1;
    padding: 6px 0 0 8px; gap: 0; overflow: hidden; height: 100%;
}
.chrome-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 0 12px; height: 30px; min-width: 120px; max-width: 220px;
    background: #e8e8e8; border-radius: 8px 8px 0 0;
    font-size: 12px; color: #333; cursor: pointer;
    position: relative; flex-shrink: 0;
    transition: background 0.15s;
}
.chrome-tab.active { background: #fff; }
.chrome-tab:hover:not(.active) { background: #ddd; }
.ct-favicon { width: 14px; height: 14px; border-radius: 2px; }
.ct-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #333; }
.ct-close {
    width: 18px; height: 18px; border-radius: 50%; border: none;
    background: transparent; color: #888; cursor: pointer; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.ct-close:hover { background: rgba(0,0,0,0.1); color: #333; }
.chrome-new-tab {
    width: 28px; height: 28px; border-radius: 50%; border: none;
    background: transparent; color: #9aa0a6; cursor: pointer; font-size: 18px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 2px; transition: background 0.15s;
}
.chrome-new-tab:hover { background: rgba(0,0,0,0.08); color: #333; }
.chrome-win-controls { flex-shrink: 0; align-self: flex-start; padding-top: 2px; }

/* Chrome Toolbar */
.chrome-toolbar {
    display: flex; align-items: center; gap: 4px;
    padding: 6px 8px; background: #f3f3f3;
    border-bottom: 1px solid #e0e0e0;
}
.chrome-nav-btn {
    width: 32px; height: 32px; border-radius: 50%; border: none;
    background: transparent; color: #666; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.chrome-nav-btn:hover { background: rgba(0,0,0,0.08); color: #000; }
.chrome-omnibox {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #ccc;
    border-radius: 24px; padding: 0 12px; height: 34px;
    position: relative; transition: background 0.15s, border-color 0.15s;
}
.chrome-omnibox:focus-within {
    background: #fff; border-color: #0078D4;
    box-shadow: 0 0 0 2px rgba(138,180,248,0.2);
}
.omni-lock { display: flex; align-items: center; flex-shrink: 0; }
.chrome-url-input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #1a1a1a; font-size: 13px; font-family: inherit;
}
.chrome-url-input::placeholder { color: #aaa; }
.omni-suggestions {
    position: absolute; top: calc(100% + 4px); left: -1px; right: -1px;
    background: #fff; border: 1px solid #ddd;
    border-radius: 8px; z-index: 100; display: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15); overflow: hidden;
}
.omni-sug-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; cursor: pointer; transition: background 0.1s;
}
.omni-sug-item:hover { background: rgba(0,0,0,0.05); }
.osi-text { flex: 1; overflow: hidden; }
.osi-title { font-size: 13px; color: #1a1a1a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.osi-url { font-size: 11px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Browser body */
.browser-body { flex: 1; position: relative; overflow: hidden; background: #f5f5f5; }
.browser-panel { position: absolute; inset: 0; display: none; }
.browser-panel.active { display: block; }
.browser-iframe { width: 100%; height: 100%; border: none; display: block; filter: brightness(1.08); }

/* Chrome New Tab */
.chrome-newtab {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    justify-content: flex-start;
    height: 100%; background: #fff;
    font-family: arial, sans-serif;
}
/* Top-right nav */
.cnt-topbar {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: flex-end;
    padding: 10px 16px; gap: 4px;
}
.cnt-topbar a {
    font-size: 13px; color: #202124; text-decoration: none;
    padding: 8px 12px; border-radius: 4px;
    transition: background 0.15s;
}
.cnt-topbar a:hover { background: rgba(0,0,0,0.06); }
.cnt-signin-btn {
    background: #1a73e8; color: #fff !important; border-radius: 4px;
    padding: 8px 16px !important; font-weight: 500;
}
.cnt-signin-btn:hover { background: #1557b0 !important; }
/* Center content */
.cnt-center {
    display: flex; flex-direction: column; align-items: center;
    gap: 20px; margin-top: 12%; width: 100%;
    padding: 0 20px;
}
.cnt-logo { line-height: 1; }
.cnt-search {
    display: flex; align-items: center; gap: 10px;
    width: 100%; max-width: 560px; padding: 10px 20px;
    background: #fff; border: 1px solid #dfe1e5;
    border-radius: 24px; transition: box-shadow 0.15s;
    box-shadow: 0 1px 6px rgba(32,33,36,0.1);
}
.cnt-search:focus-within { box-shadow: 0 1px 6px rgba(32,33,36,0.28); border-color: transparent; }
.cnt-search input {
    flex: 1; background: transparent; border: none; outline: none;
    color: #202124; font-size: 16px; font-family: inherit;
}
.cnt-search input::placeholder { color: #9aa0a6; }
.cnt-search button {
    background: transparent; border: none; cursor: pointer;
    display: flex; align-items: center; padding: 4px;
    border-radius: 50%; transition: background 0.15s;
}
.cnt-search button:hover { background: rgba(0,0,0,0.06); }
/* Search buttons row */
.cnt-btns {
    display: flex; gap: 10px;
}
.cnt-btn {
    padding: 8px 16px; background: #f8f9fa; border: 1px solid #f8f9fa;
    border-radius: 4px; font-size: 14px; color: #3c4043; cursor: pointer;
    font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.cnt-btn:hover { border-color: #dadce0; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
/* Footer */
.cnt-footer {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: #f2f2f2; border-top: 1px solid #e4e4e4;
}
.cnt-footer-top {
    display: flex; align-items: center; padding: 12px 24px;
    font-size: 13px; color: #70757a;
}
.cnt-footer-top span { flex: 1; }
.cnt-footer-bottom {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 24px; font-size: 13px;
}
.cnt-footer-bottom a, .cnt-footer-top a {
    color: #70757a; text-decoration: none; padding: 4px 8px;
    border-radius: 4px; transition: background 0.15s;
}
.cnt-footer-bottom a:hover, .cnt-footer-top a:hover { background: rgba(0,0,0,0.06); }
.cnt-footer-links { display: flex; gap: 4px; }
.cnt-history { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; }
.cnt-history-title { width: 100%; font-size: 12px; color: #70757a; text-align: center; }
.cnt-history-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; background: #f8f9fa; border: 1px solid #e8eaed;
    border-radius: 20px; cursor: pointer; font-size: 12px; color: #3c4043;
    transition: background 0.15s;
}
.cnt-history-item:hover { background: #e8eaed; }

/* Browser error page */
.browser-error-page {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 100%; gap: 12px; padding: 40px; text-align: center; background: #202124;
}
.bep-icon { font-size: 48px; }
.browser-error-page h2 { font-size: 20px; font-weight: 500; color: #e8eaed; }
.bep-url { font-size: 12px; color: #9aa0a6; word-break: break-all; max-width: 400px; }
.bep-sub { font-size: 13px; color: #9aa0a6; max-width: 400px; line-height: 1.6; }
.browser-error-page button {
    margin-top: 8px; padding: 10px 20px; background: #8ab4f8;
    border: none; border-radius: 4px; color: #202124;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.15s;
}
.browser-error-page button:hover { opacity: 0.85; }

/* ===== Calculator ===== */
.calc-content { background:#f5f5f5 !important; display:flex !important; align-items:center; justify-content:center; }
.calc-wrap { width:100%; max-width:320px; padding:16px; display:flex; flex-direction:column; gap:12px; }
.calc-display {
    background:#fff; border:1px solid #e0e0e0;
    border-radius:6px; padding:16px; text-align:right; position:relative; min-height:80px;
    display:flex; flex-direction:column; justify-content:flex-end;
}
.calc-operator { position:absolute; top:10px; left:14px; font-size:13px; color:#aaa; }
.calc-value { font-size:36px; font-weight:300; color:#1a1a1a; word-break:break-all; line-height:1.2; }
.calc-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.calc-btn {
    height:56px; border:none; border-radius:6px; font-size:18px; font-weight:400;
    cursor:pointer; transition:background 0.1s, transform 0.1s; font-family:inherit;
    display:flex; align-items:center; justify-content:center;
}
.calc-btn:active { transform:scale(0.94); }
.calc-num { background:#fff; color:#1a1a1a; border:1px solid #e8e8e8; }
.calc-num:hover { background:#f0f0f0; }
.calc-fn { background:#e8e8e8; color:#1a1a1a; }
.calc-fn:hover { background:#ddd; }
.calc-op { background:rgba(0,120,212,0.12); color:#0078D4; }
.calc-op:hover { background:rgba(0,120,212,0.22); }
.calc-eq { background:var(--accent); color:white; }
.calc-eq:hover { background:var(--accent-hover); }
.calc-zero { grid-column:span 2; }

/* ===== Quick Settings Panel ===== */
.quick-settings {
    position:fixed; bottom:calc(var(--taskbar-h) + 8px); right:8px;
    width:360px; background:rgba(243,243,243,0.97);
    backdrop-filter:blur(60px) saturate(180%);
    -webkit-backdrop-filter:blur(60px) saturate(180%);
    border:1px solid rgba(0,0,0,0.1); border-radius:12px;
    padding:20px; z-index:9400; display:none;
    box-shadow:0 16px 48px rgba(0,0,0,0.15);
    animation: popupOpen 0.2s ease;
}
.quick-settings.open { display:block; }
.qs-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:20px; }
.qs-item {
    display:flex; flex-direction:column; align-items:center; gap:6px;
    font-size:11px; color:#555; cursor:pointer;
}
.qs-icon-wrap {
    width:100%; height:48px; border-radius:8px;
    background:#e8e8e8; border:1px solid #ddd;
    display:flex; align-items:center; justify-content:center; gap:4px;
    transition:background 0.15s; position:relative;
}
.qs-item:hover .qs-icon-wrap { background:#ddd; }
.qs-item.qs-active .qs-icon-wrap { background:rgba(0,120,212,0.15); border-color:rgba(0,120,212,0.3); color:#0078D4; }
.qs-item.qs-active { color:#0078D4; }
.qs-chevron { position:absolute; right:6px; opacity:0.4; }
.qs-sliders { display:flex; flex-direction:column; gap:14px; margin-bottom:16px; }
.qs-slider-row { display:flex; align-items:center; gap:10px; color:#555; }
.qs-range { flex:1; accent-color:var(--accent); height:4px; }
.qs-footer { display:flex; align-items:center; padding-top:12px; border-top:1px solid #e0e0e0; }
.qs-battery { display:flex; align-items:center; gap:6px; font-size:12px; color:#666; }
.qs-footer-btn {
    width:32px; height:32px; border-radius:6px; border:none;
    background:transparent; color:#666; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:background 0.15s;
}
.qs-footer-btn:hover { background:rgba(0,0,0,0.08); color:#000; }

/* ===== Notification Center (slim) ===== */
.notif-center {
    position:fixed; bottom:calc(var(--taskbar-h) + 8px); right:8px;
    width:360px; background:rgba(243,243,243,0.97);
    backdrop-filter:blur(60px) saturate(180%);
    -webkit-backdrop-filter:blur(60px) saturate(180%);
    border:1px solid rgba(0,0,0,0.1); border-radius:12px;
    padding:20px 20px 16px; z-index:9400; display:none;
    box-shadow:0 16px 48px rgba(0,0,0,0.15);
    animation: popupOpen 0.2s ease;
}
.notif-center.open { display:block; }
.nc-top { margin-bottom:16px; }
.nc-time { font-size:52px; font-weight:200; letter-spacing:-2px; line-height:1; }
.nc-date { font-size:13px; color:#555; margin-top:4px; }
.nc-notifs { min-height:40px; }
.nc-empty { color:#888; font-size:12px; text-align:center; padding:16px 0; }
.nc-close {
    position:absolute; top:12px; right:12px;
    background:transparent; border:none; color:var(--text-secondary);
    cursor:pointer; font-size:14px; padding:4px 8px; border-radius:4px;
    transition:background 0.15s;
}
.nc-close:hover { background:rgba(0,0,0,0.08); color:#000; }

/* Taskbar system tray button (wifi+vol+bat grouped) */
.tb-system-tray-btn {
    display:flex; align-items:center; gap:6px;
    padding:0 10px; height:40px; border:none; background:transparent;
    color:rgba(0,0,0,0.65); cursor:pointer; border-radius:6px;
    transition:background var(--transition);
}
.tb-system-tray-btn:hover { background:rgba(0,0,0,0.08); color:#000; }

/* Notification bell */
.tb-notif-bell { width:36px; }

/* Tray chevron */
.tb-tray-chevron {
    width:22px; height:22px; border-radius:4px;
    border:1px solid rgba(0,0,0,0.15); background:transparent;
    color:rgba(0,0,0,0.5); cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    margin-right:4px; transition:background var(--transition);
}
.tb-tray-chevron:hover { background:rgba(0,0,0,0.08); color:#000; }

/* ===== Start Menu Footer (参考项目) ===== */
.sm-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 4px;
}
.sm-footer-right { display: flex; align-items: center; gap: 4px; }
.sm-footer-btn {
    width: 36px; height: 36px; border-radius: 6px; border: none;
    background: transparent; color: var(--text-secondary); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.sm-footer-btn:hover { background: rgba(0,0,0,0.08); color: #000; }

/* Power popover — 向上弹出，内嵌在 start menu 内 */
.sm-power-wrap { position: relative; }
.sm-power-popover {
    visibility: hidden; opacity: 0;
    position: absolute; bottom: calc(100% + 8px); right: 0;
    background: rgba(243,243,243,0.97); backdrop-filter: blur(40px);
    border: 1px solid rgba(0,0,0,0.1); border-radius: 8px;
    padding: 4px; min-width: 160px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 10;
}
.sm-power-popover.open { visibility: visible; opacity: 1; }
.spp-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px; border-radius: 4px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
    transition: background var(--transition);
}
.spp-item:hover { background: rgba(0,0,0,0.06); color: #000; }
.spp-item svg { flex-shrink: 0; }

/* ===== Skill File Viewer ===== */
.sv-layout {
    position: absolute; inset: 0;
    display: flex; flex-direction: row;
    background: #1e1e2e; overflow: hidden;
}

/* Nav toggle button — hidden on desktop */
.sv-nav-toggle {
    display: none;
    position: absolute; top: 12px; left: 12px; z-index: 10;
    width: 32px; height: 32px; border-radius: 6px; border: none;
    background: rgba(255,255,255,0.08); color: #cdd6f4; cursor: pointer;
    align-items: center; justify-content: center;
    transition: background 0.15s;
}
.sv-nav-toggle:hover { background: rgba(255,255,255,0.14); }

/* Left nav */
.sv-nav {
    width: 200px; flex-shrink: 0;
    background: #181825; border-right: 1px solid rgba(255,255,255,0.07);
    overflow-y: auto; padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}
.sv-nav-header {
    font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    color: rgba(205,214,244,0.4); text-transform: uppercase;
    padding: 4px 16px 10px;
}
.sv-nav-group { margin-bottom: 4px; }
.sv-nav-group-label {
    font-size: 11px; font-weight: 600; color: #89b4fa;
    padding: 6px 16px 4px; letter-spacing: 0.03em;
}
.sv-nav-item {
    display: flex; align-items: center; gap: 7px;
    padding: 5px 16px; font-size: 12px; color: rgba(205,214,244,0.65);
    cursor: pointer; border-radius: 0;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sv-nav-item:hover { background: rgba(255,255,255,0.06); color: #cdd6f4; }
.sv-nav-item.active {
    background: rgba(137,180,250,0.15); color: #89b4fa;
    border-right: 2px solid #89b4fa;
}
.sv-nav-item svg { flex-shrink: 0; opacity: 0.6; }
.sv-nav-item.active svg { opacity: 1; }

/* Right content */
.sv-content-area {
    flex: 1; overflow-y: auto; padding: 36px 48px;
    font-family: 'Segoe UI', sans-serif; color: #cdd6f4;
    -webkit-overflow-scrolling: touch;
}
.sv-content-area h1 {
    font-size: 24px; font-weight: 600; color: #cba6f7;
    margin: 0 0 8px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(203,166,247,0.2);
}
.sv-content-area h2 { font-size: 16px; font-weight: 600; color: #89b4fa; margin: 24px 0 10px; }
.sv-content-area h3 { font-size: 14px; font-weight: 600; color: #89dceb; margin: 16px 0 8px; }
.sv-content-area p { font-size: 14px; line-height: 1.8; color: #bac2de; margin: 0 0 10px; }
.sv-content-area ol { padding-left: 20px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.sv-content-area li { font-size: 14px; line-height: 1.7; color: #bac2de; }
.sv-content-area strong { color: #f5c2e7; font-weight: 600; }
.sv-loading, .sv-error { padding: 40px; color: #6c7086; font-size: 14px; text-align: center; }
.sv-link { color: #89b4fa; text-decoration: none; border-bottom: 1px solid rgba(137,180,250,0.4); transition: color 0.15s; }
.sv-link:hover { color: #cba6f7; border-bottom-color: rgba(203,166,247,0.6); }
/* simple-md: full panel content */
.browser-panel > .sv-content-area {
    position: absolute; inset: 0;
    background: #1e1e2e;
}

/* Mobile: nav becomes overlay drawer */
@media (max-width: 600px) {
    .sv-nav-toggle { display: flex; }
    .sv-layout { overflow: hidden; }
    .sv-nav {
        position: absolute;
        top: 0; left: 0;
        width: 75%; max-width: 240px;
        height: 100%;
        z-index: 9999;
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        overflow-y: scroll;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding-bottom: 120px;
        box-sizing: border-box;
    }
    .sv-nav.sv-nav-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.5);
    }
    .sv-nav-backdrop {
        display: none;
        position: absolute; inset: 0; z-index: 9998;
        background: rgba(0,0,0,0.45);
    }
    .sv-nav-backdrop.open { display: block; }
    .sv-content-area { padding: 48px 20px 24px; }
}
.wechat-modal {
    position: fixed; inset: 0; z-index: 99000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
}
.wechat-modal.open { display: flex; }
.wechat-modal-box {
    background: #fff; border: 1px solid rgba(0,0,0,0.12);
    border-radius: 12px; padding: 20px; position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: winOpen 0.2s cubic-bezier(0.16,1,0.3,1);
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.wechat-modal-header {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 500; color: #1a1a1a;
}
.wechat-modal-close {
    position: absolute; top: 10px; right: 10px;
    width: 28px; height: 28px; border-radius: 6px; border: none;
    background: transparent; color: #666; cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.wechat-modal-close:hover { background: rgba(0,0,0,0.08); color: #000; }
.wechat-qr-img {
    width: 220px; height: 220px; object-fit: contain;
    border-radius: 8px; background: white; padding: 8px;
}

.sm-user { display:flex; align-items:center; gap:10px; cursor:pointer; padding:6px 8px; border-radius:6px; transition:background var(--transition); }
.sm-user:hover { background:rgba(0,0,0,0.06); }
.sm-user img { width:32px; height:32px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.sm-user span { font-size:13px; font-weight:500; }

/* ===== File Explorer ===== */
.explorer-toolbar {
    display:flex; align-items:center; gap:4px;
    padding:6px 10px; background:#f3f3f3;
    border-bottom:1px solid #e0e0e0; flex-shrink:0;
}
.explorer-nav-btn {
    width:28px; height:28px; border-radius:4px; border:none;
    background:transparent; color:#555; cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    transition:background var(--transition);
}
.explorer-nav-btn:hover { background:rgba(0,0,0,0.08); color:#000; }
.explorer-path-bar {
    flex:1; display:flex; align-items:center; gap:2px;
    padding:4px 10px; background:#fff;
    border:1px solid #ccc; border-radius:4px;
    font-size:12px; color:#333;
    overflow-x:auto; white-space:nowrap; scrollbar-width:none;
}
.explorer-path-bar::-webkit-scrollbar { display:none; }
.exp-breadcrumb-seg {
    padding:2px 6px; border-radius:3px; cursor:pointer;
    color:#555; transition:background 0.1s;
    border:1px solid transparent;
}
.exp-breadcrumb-seg:hover { background:rgba(0,0,0,0.06); border-color:#ddd; color:#000; }
.exp-breadcrumb-active { color:#000; cursor:default; font-weight:500; }
.exp-breadcrumb-active:hover { background:transparent; border-color:transparent; }
.explorer-search {
    display:flex; align-items:center; gap:6px;
    padding:4px 10px; background:#fff;
    border:1px solid #ccc; border-radius:4px; width:180px;
}
.explorer-search input {
    background:transparent; border:none; outline:none;
    color:#333; font-size:12px; font-family:inherit; width:100%;
}
.explorer-search input::placeholder { color:#aaa; }
.explorer-content { display:flex !important; flex-direction:row !important; overflow:hidden; }

/* Left nav - light theme */
.explorer-nav {
    width:200px; flex-shrink:0; background:#f3f3f3;
    border-right:1px solid #e0e0e0; overflow-y:auto; padding:8px 0;
}
.en-section { padding:0 4px; }
.en-item {
    display:flex; align-items:center; gap:8px;
    padding:5px 10px; border-radius:4px; cursor:pointer; font-size:12px;
    color:#333; transition:background var(--transition);
}
.en-item:hover { background:rgba(0,0,0,0.06); color:#000; }
.en-active { background:rgba(0,120,212,0.15); color:#0078D4; }
.en-indent { padding-left:28px; }

/* Right main - light theme */
.explorer-main { flex:1; overflow-y:auto; padding:16px; background:#fff; }
.explorer-section { margin-bottom:20px; }
.explorer-section-header {
    display:flex; align-items:center; gap:6px;
    font-size:12px; font-weight:600; color:#555;
    padding:4px 0 8px; cursor:pointer; user-select:none;
    border-bottom:1px solid #e0e0e0; margin-bottom:12px;
}
.explorer-section-header:hover { color:#000; }
.explorer-section-body { display:flex; flex-wrap:wrap; gap:4px; }
.explorer-section-body.collapsed { display:none; }

/* Folder items */
.explorer-item {
    display:flex; flex-direction:column; align-items:center; gap:4px;
    padding:8px; border-radius:4px; cursor:pointer; width:90px;
    transition:background var(--transition); text-align:center;
}
.explorer-item:hover { background:rgba(0,120,212,0.08); }
.explorer-item:active { background:rgba(0,120,212,0.15); }
.explorer-item > span:last-child { font-size:11px; color:#333; line-height:1.3; word-break:break-word; }
/* SVG icon spans inside explorer */
.explorer-item > span:first-child svg,
.explorer-drive-item > span:first-child svg { width:100%; height:100%; }

/* Drive items */
.explorer-drive-item {
    display:flex; align-items:center; gap:12px;
    padding:8px 12px; border-radius:4px; cursor:pointer; min-width:240px;
    transition:background var(--transition); border:1px solid transparent;
}
.explorer-drive-item:hover { background:rgba(0,120,212,0.06); border-color:#e0e0e0; }
.edi-info { display:flex; flex-direction:column; gap:4px; flex:1; }
.edi-name { font-size:12px; color:#222; }
.edi-bar { height:6px; background:#e0e0e0; border-radius:2px; overflow:hidden; }
.edi-fill { height:100%; background:#0078D4; border-radius:2px; }
.edi-space { font-size:11px; color:#888; }

.explorer-empty { color:#888; font-size:13px; padding:40px; text-align:center; width:100%; }

.explorer-statusbar {
    flex-shrink: 0;
    padding: 3px 16px;
    font-size: 12px;
    color: #666;
    background: #f3f3f3;
    border-top: 1px solid #e0e0e0;
}
