/* ===========================
   BOOT SCREEN
   =========================== */
.boot-screen {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s;
}
.boot-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}
.boot-screen.hidden {
    display: none;
}
.boot-content {
    text-align: center;
}
.boot-logo {
    margin-bottom: 60px;
}
.boot-flag {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    transform: perspective(200px) rotateY(-12deg) rotate(-4deg);
    animation: bootWave 3s ease-in-out infinite;
}
@keyframes bootWave {
    0%, 100% { transform: perspective(200px) rotateY(-12deg) rotate(-4deg) scaleX(1); }
    30% { transform: perspective(200px) rotateY(-8deg) rotate(-2deg) scaleX(0.94); }
    60% { transform: perspective(200px) rotateY(-16deg) rotate(-6deg) scaleX(1.03); }
}
.flag-piece {
    border-radius: 3px;
}
.flag-piece.red { background: linear-gradient(135deg, #ff3c1a, #e01800); }
.flag-piece.green { background: linear-gradient(135deg, #4fba12, #2d8e00); }
.flag-piece.blue { background: linear-gradient(135deg, #2a7fff, #0058d6); }
.flag-piece.yellow { background: linear-gradient(135deg, #ffca18, #f5a623); }
.boot-text-logo {
    font-family: 'Trebuchet MS', sans-serif;
}
.boot-win {
    font-size: 48px;
    font-weight: bold;
    font-style: italic;
    color: #fff;
}
.boot-xp {
    font-size: 48px;
    font-weight: bold;
    color: #fff;
    font-style: italic;
    margin-left: 4px;
}
/* Boot variant visibility */
.boot-variant.hidden { display: none; }

/* macOS boot */
.boot-apple-logo {
    margin-bottom: 50px;
    opacity: 0.9;
}
.boot-apple-logo svg {
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.15));
}
.boot-theme-macos {
    background: #000;
}
.boot-theme-macos .boot-progress-area {
    width: 220px;
}
.boot-theme-macos .boot-progress-bar {
    background: #444;
    border: none;
    border-radius: 5px;
    height: 6px;
    padding: 0;
}
.boot-theme-macos .boot-progress-fill {
    background: #fff;
    border-radius: 5px;
}
.boot-theme-macos .boot-click-start {
    color: #555;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-weight: 300;
    font-size: 13px;
}
.boot-theme-macos .boot-username {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-weight: 300;
    letter-spacing: 0.5px;
}
.boot-theme-macos .boot-loading-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    font-weight: 300;
    color: #999;
}

/* Linux boot */
.boot-tux {
    color: #0f0;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    line-height: 1.2;
    margin-bottom: 10px;
}
.boot-linux-text {
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 30px;
}
.boot-theme-linux .boot-progress-bar {
    background: #111;
    border: 1px solid #0f0;
    border-radius: 0;
}
.boot-theme-linux .boot-progress-fill {
    background: #0f0;
}
.boot-theme-linux .boot-click-start {
    color: #0f0;
    font-family: 'Courier New', monospace;
}
.boot-theme-linux .boot-username {
    color: #0f0;
    font-family: 'Courier New', monospace;
}

.boot-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 20px 0 16px;
}
.boot-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    box-shadow: 0 0 12px rgba(255,255,255,0.15);
}
.boot-username {
    font-size: 16px;
    color: #fff;
    font-family: 'Trebuchet MS', 'Tahoma', sans-serif;
    letter-spacing: 1px;
}
.boot-mobile-hint {
    display: none;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-family: 'Tahoma', sans-serif;
    text-align: center;
    margin: 10px 20px 0;
    font-style: italic;
}
@media (max-width: 768px) {
    .boot-mobile-hint { display: block; }
}
.boot-progress-area {
    width: 300px;
    margin: 0 auto;
}
.boot-click-start {
    color: #888;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 15px;
    animation: bootBlink 1.2s ease-in-out infinite;
    cursor: pointer;
}
.boot-click-start.hidden { display: none; }
@keyframes bootBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
.boot-loading-text {
    color: #aaa;
    font-family: 'MS Sans Serif', Tahoma, sans-serif;
    font-size: 14px;
    margin-bottom: 12px;
}
.boot-progress-bar {
    width: 100%;
    height: 20px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 2px;
    padding: 3px;
    overflow: hidden;
}
.boot-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 1px;
    background: repeating-linear-gradient(
        90deg,
        #2668d4 0px, #3b82f6 6px,
        transparent 6px, transparent 8px
    );
}
.boot-progress-fill.animate {
    animation: bootBar 2.5s ease-out forwards;
}
@keyframes bootBar {
    0% { width: 0%; }
    30% { width: 35%; }
    60% { width: 65%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

/* ===========================
   LANGUAGE SWITCHER
   =========================== */
.copilot-toggle {
    padding: 1px 4px;
    border: 1px solid var(--tray-btn-border-color, #888);
    background: var(--tray-btn-bg, transparent);
    color: var(--tray-btn-color, #000);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    border-radius: 2px;
    transition: opacity 0.2s;
}
.copilot-toggle:hover {
    background: var(--tray-btn-hover, rgba(255,255,255,0.3));
}
.copilot-toggle.copilot-off {
    opacity: 0.4;
}
.lang-switcher-tray {
    position: relative;
}
.lang-toggle {
    padding: 2px 6px;
    border: 1px solid var(--tray-btn-border-color, #888);
    background: var(--tray-btn-bg, transparent);
    color: var(--tray-btn-color, #000);
    cursor: pointer;
    font-size: 9px;
    font-weight: bold;
    border-radius: 2px;
}
.lang-toggle:hover {
    background: var(--tray-btn-hover, rgba(255,255,255,0.3));
}
.lang-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 4px;
    background: #2a2a2a;
    border: 1px solid #555;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.4);
    border-radius: 3px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 10001;
}
.lang-dropdown.hidden {
    display: none;
}
.lang-btn {
    padding: 4px 10px;
    border: 1px solid #555;
    background: #3a3a3a;
    color: #eee;
    color: var(--tray-btn-color, #000);
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    text-align: left;
    white-space: nowrap;
}
.lang-btn:hover {
    background: #505050;
    color: #fff;
}
.lang-btn.active {
    background: #0066cc;
    color: #fff;
}
.tray-separator {
    width: 1px;
    height: 60%;
    background: var(--tray-btn-border-color, #888);
    opacity: 0.5;
    align-self: center;
    margin: 0 2px;
}

/* ===========================
   BASE STYLES & RESET
   =========================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    font-size: var(--font-size, 13px);
    color: var(--text-color);
    user-select: none;
}

a {
    color: var(--link-color, #0066cc);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ===========================
   DESKTOP
   =========================== */
.desktop {
    width: 100%;
    height: calc(100vh - var(--taskbar-height, 36px));
    background: var(--desktop-bg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* ===========================
   DESKTOP ICONS
   =========================== */
.desktop-icons {
    position: relative;
    width: 100%;
    height: 100%;
}

.desktop-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 6px 4px;
    cursor: pointer;
    border-radius: var(--icon-radius, 0);
    transition: background 0.1s;
}
.desktop-icon:hover {
    background: var(--icon-hover-bg, rgba(255,255,255,0.2));
}
.desktop-icon:active {
    background: var(--icon-active-bg, rgba(255,255,255,0.3));
}
.desktop-icon-img {
    font-size: 32px;
    margin-bottom: 4px;
    pointer-events: none;
}
.desktop-icon span {
    font-size: 11px;
    text-align: center;
    color: var(--icon-text-color, #fff);
    text-shadow: var(--icon-text-shadow, 1px 1px 2px rgba(0,0,0,0.8));
    overflow-wrap: normal;
    word-break: keep-all;
    white-space: nowrap;
    pointer-events: none;
}

/* ===========================
   WINDOW
   =========================== */
.window {
    position: absolute;
    background: var(--window-bg);
    border: var(--window-border);
    box-shadow: var(--window-shadow);
    border-radius: var(--window-radius, 0);
    display: flex;
    flex-direction: column;
    min-width: 300px;
    min-height: 200px;
    max-height: calc(100vh - var(--taskbar-height, 36px) - 20px);
    z-index: 10;
    overflow: hidden;
    transition: opacity 0.15s, transform 0.15s;
}
.window-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    cursor: nwse-resize;
    z-index: 10001;
}
/* Edge resize zones */
.window-resize-edge-right {
    position: absolute;
    top: 30px;
    right: 0;
    width: 6px;
    bottom: 16px;
    cursor: ew-resize;
    z-index: 10001;
}
.window-resize-edge-bottom {
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 6px;
    cursor: ns-resize;
    z-index: 10001;
}
.window-resize-handle::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
}
.window.maximized .window-resize-handle {
    display: none;
}
.window.hidden {
    display: none;
}
.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - var(--taskbar-height, 36px)) !important;
    max-height: calc(100vh - var(--taskbar-height, 36px)) !important;
    border-radius: 0 !important;
}
.window.active {
    z-index: 100;
}

/* Title bar */
.window-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--titlebar-padding, 2px 3px);
    background: var(--titlebar-bg);
    color: var(--titlebar-color, #fff);
    cursor: grab;
    flex-shrink: 0;
    height: var(--titlebar-height, 26px);
    font-weight: bold;
    font-size: var(--titlebar-font-size, 12px);
}
.window.active .window-titlebar {
    background: var(--titlebar-bg-active, var(--titlebar-bg));
}
.window-title {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.window-title-icon {
    font-size: 14px;
    flex-shrink: 0;
}

/* Window controls */
.window-controls {
    display: flex;
    gap: var(--win-btn-gap, 2px);
    flex-shrink: 0;
}
.win-btn {
    width: var(--win-btn-size, 18px);
    height: var(--win-btn-size, 18px);
    border: var(--win-btn-border);
    background: var(--win-btn-bg);
    color: var(--win-btn-color, #000);
    font-size: var(--win-btn-font-size, 12px);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    border-radius: var(--win-btn-radius, 0);
}
.win-btn:hover {
    background: var(--win-btn-hover-bg, #ddd);
}
.btn-close:hover {
    background: var(--win-btn-close-hover, #e81123);
    color: #fff;
}

/* Menu bar */
.window-menubar {
    display: flex;
    gap: 0;
    padding: 2px 4px;
    background: var(--menubar-bg, var(--window-bg));
    border-bottom: var(--menubar-border, 1px solid #999);
    font-size: 12px;
    flex-shrink: 0;
}
.window-menubar span {
    padding: 2px 8px;
    cursor: pointer;
    border-radius: var(--menu-item-radius, 0);
}
.window-menubar span:hover {
    background: var(--menu-hover-bg, #0000ff);
    color: var(--menu-hover-color, #fff);
}

/* Window body */
.window-body {
    flex: 1;
    min-height: 0;
    padding: 16px;
    overflow: auto;
    background: var(--window-body-bg, #fff);
    color: var(--window-body-color, #000);
}
.window-body-scroll {
    overflow-y: auto;
    max-height: 500px;
}

/* Status bar */
.window-statusbar {
    display: flex;
    justify-content: space-between;
    padding: 3px 8px;
    background: var(--statusbar-bg, var(--window-bg));
    border-top: var(--statusbar-border, 1px solid #999);
    font-size: 11px;
    color: var(--statusbar-color, #333);
    flex-shrink: 0;
}

/* ===========================
   TASKBAR
   =========================== */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--taskbar-height, 36px);
    background: var(--taskbar-bg);
    border-top: var(--taskbar-border, 1px solid #999);
    display: flex;
    align-items: center;
    padding: 0 4px;
    z-index: 9999;
    gap: 4px;
}

/* Start Button */
.start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--start-btn-padding, 2px 8px);
    background: var(--start-btn-bg);
    border: var(--start-btn-border);
    color: var(--start-btn-color, #000);
    font-weight: bold;
    font-size: var(--start-btn-font-size, 12px);
    cursor: pointer;
    height: calc(var(--taskbar-height, 36px) - 6px);
    border-radius: var(--start-btn-radius, 0);
    flex-shrink: 0;
}
.start-button:hover {
    background: var(--start-btn-hover-bg, var(--start-btn-bg));
}
.start-button:active {
    background: var(--start-btn-active-bg, var(--start-btn-bg));
}
.start-icon {
    font-size: 16px;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: var(--taskbar-height, 36px);
    left: 0;
    width: 280px;
    background: var(--start-menu-bg, #fff);
    border: var(--start-menu-border, 1px solid #999);
    box-shadow: var(--start-menu-shadow, 2px -2px 6px rgba(0,0,0,0.3));
    border-radius: var(--start-menu-radius, 0);
    z-index: 10000;
    overflow: visible;
}
.start-menu.hidden {
    display: none;
}
.start-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--start-menu-header-bg, linear-gradient(180deg, #1f3c7d, #2a5298));
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}
.start-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--avatar-radius, 0);
    border: 2px solid rgba(255,255,255,0.5);
}
.start-menu-items {
    padding: 4px 0;
}
.start-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--start-menu-item-color, #000);
}
.start-menu-item:hover {
    background: var(--start-menu-item-hover, #0066cc);
    color: var(--start-menu-item-hover-color, #fff);
}
.start-menu-submenu-parent {
    position: relative;
}
.start-menu-submenu-parent .submenu-arrow {
    float: right;
    margin-right: -4px;
    font-size: 10px;
}
.start-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 150px;
    background: var(--start-menu-bg, #fff);
    border: var(--start-menu-border, 1px solid #888);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    z-index: 10001;
}
.start-menu-submenu-parent:hover > .start-submenu {
    display: block;
}
.start-submenu .start-menu-item {
    padding: 6px 16px;
}
.start-menu-footer {
    padding: 8px 12px;
    border-top: var(--start-menu-footer-border, 1px solid #ccc);
    background: var(--start-menu-footer-bg, #f0f0f0);
}

.forged-by {
    display: block;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(128,128,128,0.3);
    font-size: 10px;
    color: #666;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.5px;
    transition: color 0.2s;
}
.forged-by:hover {
    color: #c0392b;
    text-decoration: none;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}
.theme-label {
    font-size: 11px;
    color: #666;
    margin-right: 4px;
}
.theme-btn {
    padding: 4px 10px;
    border: var(--theme-btn-border, 1px solid #999);
    background: var(--theme-btn-bg, #e0e0e0);
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    border-radius: var(--theme-btn-radius, 2px);
}
.theme-btn:hover {
    background: var(--theme-btn-hover, #ccc);
}
.theme-btn.active {
    background: var(--theme-btn-active, #0066cc);
    color: #fff;
}

/* Taskbar window list */
.taskbar-windows {
    display: flex;
    flex: 1;
    gap: 2px;
    overflow-x: auto;
    align-items: center;
    height: 100%;
    padding: 2px 0;
}
.taskbar-window-btn {
    padding: 2px 12px;
    border: var(--taskbar-btn-border, 1px solid #999);
    background: var(--taskbar-btn-bg);
    color: var(--taskbar-btn-color, #000);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(var(--taskbar-height, 36px) - 8px);
    display: flex;
    align-items: center;
    border-radius: var(--taskbar-btn-radius, 0);
}
.taskbar-window-btn:hover {
    background: var(--taskbar-btn-hover-bg);
}
.taskbar-window-btn.active {
    background: var(--taskbar-btn-active-bg);
    font-weight: bold;
}

/* Taskbar tray */
.taskbar-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
    border-left: var(--tray-border, 1px solid #999);
    height: 100%;
    flex-shrink: 0;
}
.theme-switcher-tray {
    display: flex;
    gap: 3px;
}
.theme-btn-small {
    padding: 2px 6px;
    border: 1px solid var(--tray-btn-border-color, #888);
    background: var(--tray-btn-bg, transparent);
    color: var(--tray-btn-color, #000);
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
}
.theme-btn-small:hover {
    background: var(--tray-btn-hover, rgba(255,255,255,0.3));
}
.theme-btn-small.active {
    background: var(--tray-btn-active, #0066cc);
    color: #fff;
}

/* Attention pulse for first-visit tray buttons */
@keyframes tray-attention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 102, 204, 0); }
    50% { box-shadow: 0 0 8px 3px rgba(0, 102, 204, 0.6); }
}
.tray-attention .theme-btn-small,
.tray-attention .lang-toggle {
    animation: tray-attention 1.5s ease-in-out 3;
}
.tray-attention .theme-btn-small:hover,
.tray-attention .lang-toggle:hover {
    animation: none;
}
.taskbar-clock {
    font-size: 11px;
    color: var(--clock-color, #000);
    min-width: 50px;
    text-align: center;
}

/* ===========================
   ABOUT CONTENT
   =========================== */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.about-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--avatar-radius, 4px);
    border: var(--avatar-border, 2px solid #ccc);
    object-fit: cover;
    flex-shrink: 0;
}
.about-info h1 {
    font-size: 22px;
    margin-bottom: 4px;
    color: var(--heading-color, #000);
}
.about-info .title {
    font-size: 13px;
    color: var(--accent-color, #0066cc);
    font-weight: bold;
    margin-bottom: 4px;
}
.about-info .location {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}
.about-info .tagline {
    font-size: 12px;
    font-style: italic;
    color: #888;
}
.about-bio {
    font-size: 13px;
    line-height: 1.6;
}
.about-bio p {
    margin-bottom: 8px;
}

/* ===========================
   EXPERIENCE
   =========================== */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.exp-item {
    border-left: 3px solid var(--accent-color, #0066cc);
    padding-left: 16px;
    padding-bottom: 4px;
}
.exp-header h3 {
    font-size: 14px;
    color: var(--heading-color, #000);
    margin-bottom: 2px;
}
.exp-company {
    font-size: 13px;
    color: var(--accent-color, #0066cc);
    font-weight: bold;
}
.exp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 8px;
    font-size: 11px;
    color: #777;
}
.exp-meta span {
    background: var(--tag-bg, #f0f0f0);
    padding: 2px 6px;
    border-radius: 3px;
}
.exp-highlight {
    font-size: 13px;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: var(--highlight-bg, #fff8e1);
    border-radius: 4px;
    border-left: 3px solid #ffc107;
}
.exp-section {
    margin-bottom: 10px;
}
.exp-section h4 {
    font-size: 12px;
    color: var(--heading-color, #000);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.exp-details {
    list-style: none;
    padding: 0;
    font-size: 12px;
    line-height: 1.7;
}
.exp-details li::before {
    content: "▸ ";
    color: var(--accent-color, #0066cc);
}
.exp-skills {
    margin-top: 8px;
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* ===========================
   SKILLS TREE
   =========================== */
.skills-tree {
    font-size: 13px;
}
.skill-category {
    margin-bottom: 8px;
}
.skill-cat-header {
    padding: 4px 8px;
    cursor: pointer;
    font-weight: bold;
    background: var(--skill-header-bg, #f0f0f0);
    border: var(--skill-header-border, 1px solid #ddd);
    margin-bottom: 2px;
}
.skill-cat-header:hover {
    background: var(--skill-header-hover, #e8e8e8);
}
.tree-toggle {
    font-size: 10px;
    display: inline-block;
    width: 14px;
}
.tree-icon {
    margin-right: 4px;
}
.skill-cat-items {
    padding-left: 20px;
}
.skill-cat-items.collapsed {
    display: none;
}
.skill-item {
    padding: 3px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tree-leaf {
    color: #999;
    font-family: monospace;
    flex-shrink: 0;
}
.skill-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 3px;
    background: var(--badge-bg, #e0e0e0);
    color: var(--badge-color, #333);
    margin-left: auto;
}
.skill-badge.verified {
    background: #4caf50;
    color: #fff;
}
.skill-badge.native {
    background: var(--accent-color, #0066cc);
    color: #fff;
}
.skill-endorsement {
    font-size: 10px;
    color: #999;
    margin-left: auto;
}

/* ===========================
   PROJECTS / FILE EXPLORER
   =========================== */
.file-explorer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.file-item {
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: var(--file-item-radius, 2px);
    cursor: default;
}
.file-item:hover {
    background: var(--file-hover-bg, #e8f0fe);
    border-color: var(--file-hover-border, #c0d8f8);
}
.file-item.featured {
    background: var(--highlight-bg, #fff8e1);
    border-color: #ffc107;
}
.file-icon {
    font-size: 24px;
    flex-shrink: 0;
}
.file-info {
    flex: 1;
    min-width: 0;
}
.file-name {
    font-weight: bold;
    font-size: 13px;
    color: var(--link-color, #0066cc);
}
.file-stars {
    font-size: 12px;
    color: #f59e0b;
    font-weight: bold;
    margin-left: 8px;
}
.file-desc {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}
/* Slide thumbnails in Projects > Workshops */
.slide-thumb {
    display: block;
    width: 100%;
    max-width: 280px;
    margin-top: 8px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.slide-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
/* Lightbox overlay for full-size slide */
.slide-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: slideFadeIn 0.2s ease;
}
@keyframes slideFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.slide-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.slide-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    font-family: sans-serif;
    line-height: 1;
}
.file-lang {
    font-size: 11px;
    display: inline-block;
    margin-top: 4px;
    padding: 1px 8px;
    background: var(--tag-bg, #f0f0f0);
    border-radius: 3px;
    color: #555;
}
.file-separator {
    border-top: 1px solid #ddd;
    margin: 12px 0;
}
.file-section-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================
   EDUCATION
   =========================== */
.education-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.education-content h4 {
    font-size: 13px;
    color: var(--heading-color, #000);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.edu-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.edu-icon {
    font-size: 28px;
    flex-shrink: 0;
}
.edu-info h3 {
    font-size: 14px;
    color: var(--heading-color, #000);
}
.edu-degree {
    font-size: 13px;
    color: var(--accent-color, #0066cc);
}
.edu-date {
    font-size: 12px;
    color: #888;
}
.edu-separator {
    border-top: 1px solid #ddd;
}

/* ===========================
   RECOMMENDATIONS
   =========================== */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rec-item {
    padding: 12px;
    background: var(--rec-bg, #f9f9f9);
    border: var(--rec-border, 1px solid #eee);
    border-radius: var(--rec-radius, 4px);
    border-left: 3px solid var(--accent-color, #0066cc);
}
.rec-header {
    margin-bottom: 8px;
}
.rec-header strong {
    font-size: 13px;
    color: var(--heading-color, #000);
}
.rec-role {
    display: block;
    font-size: 11px;
    color: #888;
}
.rec-text {
    font-size: 12px;
    line-height: 1.6;
    color: #444;
    font-style: italic;
}

/* ===========================
   CONTACT
   =========================== */
.contact-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}
.contact-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
}

/* ===========================
   CONTEXT MENU
   =========================== */
.context-menu {
    position: fixed;
    z-index: 50000;
    min-width: 200px;
    background: var(--window-bg, #d4d0c8);
    border: var(--window-border, 2px outset #d4d0c8);
    box-shadow: var(--window-shadow, 2px 2px 0 #000);
    border-radius: var(--start-menu-radius, 0);
    padding: 4px 0;
    font-size: 12px;
}
.context-menu.hidden {
    display: none;
}
.context-menu-item {
    padding: 6px 16px;
    cursor: pointer;
    color: var(--text-color, #000);
}
.context-menu-item:hover {
    background: var(--start-menu-item-hover, #000080);
    color: var(--start-menu-item-hover-color, #fff);
}
.context-menu-separator {
    height: 1px;
    background: #999;
    margin: 4px 8px;
}

/* ===========================
   WALLPAPER PICKER
   =========================== */
.wallpaper-picker {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
}
.wallpaper-picker.hidden {
    display: none;
}
.wallpaper-picker-window {
    width: 520px;
    max-width: 95vw;
    background: var(--window-bg, #d4d0c8);
    border: var(--window-border, 2px outset #d4d0c8);
    box-shadow: var(--window-shadow, 2px 2px 0 #000);
    border-radius: var(--window-radius, 0);
    overflow: hidden;
}
.wallpaper-picker-body {
    padding: 16px !important;
}
.wallpaper-preview {
    width: 100%;
    height: 180px;
    border: 2px inset var(--window-bg, #d4d0c8);
    margin-bottom: 12px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.wallpaper-preview::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}
.wallpaper-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}
.wallpaper-thumb {
    height: 65px;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: border-color 0.15s;
}
.wallpaper-thumb:hover {
    border-color: var(--accent-color, #0066cc);
}
.wallpaper-thumb.selected {
    border-color: var(--accent-color, #0066cc);
    box-shadow: 0 0 0 2px var(--accent-color, #0066cc);
}
.wallpaper-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 9px;
    text-align: center;
    padding: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wallpaper-thumb.secret {
    border: 2px dashed #ffd700;
    animation: goldenGlow 2s ease-in-out infinite;
}
@keyframes goldenGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(255,215,0,0.3); }
    50% { box-shadow: 0 0 12px rgba(255,215,0,0.6); }
}
.wallpaper-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.wallpaper-btn {
    padding: 6px 20px;
    border: var(--win-btn-border, 1px outset #d4d0c8);
    background: var(--win-btn-bg, #d4d0c8);
    color: var(--text-color, #000);
    cursor: pointer;
    font-size: 12px;
    border-radius: var(--win-btn-radius, 0);
}
.wallpaper-btn:hover {
    background: var(--win-btn-hover-bg, #e0dcd4);
}

/* ===========================
   PAINT
   =========================== */
.paint-menubar {
    display: flex;
    gap: 0;
    padding: 2px 4px;
    background: var(--window-bg, #c0c0c0);
    border-bottom: 1px solid #999;
    font-size: 11px;
    flex-shrink: 0;
}
.paint-menu-item {
    padding: 2px 8px;
    cursor: pointer;
    border: 1px solid transparent;
}
.paint-menu-item:hover {
    border: 1px outset #d4d0c8;
    background: rgba(255,255,255,0.4);
}
.paint-body {
    display: flex;
    flex-direction: row;
    padding: 0 !important;
    background: var(--window-bg, #c0c0c0) !important;
    min-height: 0;
}
.paint-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: var(--window-bg, #c0c0c0);
    border-right: 1px solid #999;
    flex-shrink: 0;
    width: 42px;
}
.paint-tool {
    width: 34px;
    height: 30px;
    border: 1px outset #d4d0c8;
    background: var(--window-bg, #c0c0c0);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}
.paint-tool:hover {
    border: 1px outset #fff;
    background: rgba(255,255,255,0.5);
}
.paint-tool.active {
    border: 1px inset #888;
    background: rgba(0,0,0,0.08);
}
.paint-tool svg {
    pointer-events: none;
}
.paint-separator-h {
    width: 30px;
    height: 1px;
    background: #888;
    margin: 2px 0;
}
.paint-stamp-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    width: 34px;
    padding: 2px 0;
}
.paint-stamp-picker.hidden { display: none; }
.paint-stamp-btn {
    width: 16px;
    height: 16px;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    border: 1px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0;
    border-radius: 2px;
}
.paint-stamp-btn:hover { background: rgba(0,0,0,0.08); }
.paint-stamp-btn.active {
    border: 1px inset #888;
    background: rgba(0,0,0,0.1);
}
.paint-size-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
}
.paint-size-slider {
    width: 30px;
    height: 60px;
    cursor: pointer;
    writing-mode: vertical-lr;
    direction: rtl;
    -webkit-appearance: slider-vertical;
}
.paint-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}
.paint-canvas-wrap {
    flex: 1;
    min-height: 0;
    background: #fff;
    margin: 2px;
    border: 1px inset #808080;
    overflow: hidden;
    cursor: crosshair;
    position: relative;
}
#paintCanvas {
    display: block;
    width: 100%;
    height: 100%;
}
.paint-palette {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: var(--window-bg, #c0c0c0);
    border-top: 1px solid #999;
    flex-shrink: 0;
    height: 30px;
}
.paint-current-colors {
    position: relative;
    width: 28px;
    height: 24px;
    flex-shrink: 0;
}
.paint-fg-color {
    width: 18px;
    height: 18px;
    border: 1px solid #000;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}
.paint-color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    flex: 1;
    height: 24px;
    align-content: flex-start;
}
.paint-color {
    width: 11px;
    height: 11px;
    border: 1px solid #808080;
    cursor: pointer;
    box-sizing: border-box;
}
.paint-color:hover {
    border-color: #000;
}
.paint-color.active {
    border: 1px solid #fff;
    outline: 1px solid #000;
}
.paint-custom-color {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px inset #808080;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===========================
   WINAMP
   =========================== */
#window-winamp { border-radius: 4px; overflow: hidden; }
#window-winamp .window-titlebar {
    background: linear-gradient(180deg, #4a6a8a 0%, #2a3a4a 100%) !important;
    padding: 2px 4px !important;
    min-height: 18px;
}
#window-winamp .win-btn { width: 14px; height: 14px; font-size: 9px; }
.winamp-body {
    background: linear-gradient(180deg, #232323 0%, #1a1a1a 100%);
    padding: 0;
    font-family: 'Arial', 'Helvetica', sans-serif;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    font-size: 11px;
    color: #00ff00;
    user-select: none;
}
.winamp-display {
    background: #000;
    margin: 3px;
    padding: 5px 6px;
    border: 2px inset #0a0a0a;
    border-radius: 0;
}
.winamp-display-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.winamp-time {
    color: #00ff00;
    font-size: 24px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px #00ff0055;
    letter-spacing: 2px;
    min-width: 52px;
    line-height: 1;
}
.winamp-info-col {
    flex: 1;
    min-width: 0;
}
.winamp-display-top {
    display: flex;
    gap: 6px;
    font-size: 8px;
    color: #77aaaa;
    font-family: 'Arial', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}
.winamp-viz {
    display: flex;
    align-items: flex-end;
    gap: 1px;
    height: 22px;
}
.winamp-viz-bar {
    flex: 1;
    height: 2px;
    min-width: 2px;
    transition: height 0.06s linear;
    border-radius: 0;
}
.winamp-viz-bar:nth-child(3n)   { background: #22cc22; }
.winamp-viz-bar:nth-child(3n+1) { background: #88ee22; }
.winamp-viz-bar:nth-child(3n+2) { background: #ccff22; }
.winamp-ticker {
    color: #00ee77;
    font-size: 9px;
    font-family: 'Arial', sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.winamp-seek {
    padding: 1px 3px 0;
}
.winamp-seek-bar {
    height: 8px;
    background: #111;
    border: 1px solid #333;
    overflow: hidden;
    cursor: pointer;
}
.winamp-seek-fill {
    height: 100%;
    background: linear-gradient(90deg, #556b2f, #7ccd7c);
    width: 0%;
    transition: width 0.2s linear;
}
.winamp-mid-row {
    display: flex;
    align-items: center;
    padding: 2px 3px;
    gap: 2px;
}
.winamp-controls {
    display: flex;
    gap: 1px;
    flex-shrink: 0;
}
.winamp-btn {
    width: 28px;
    height: 20px;
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border: 1px outset #666;
    color: #ccc;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.winamp-btn:hover { background: linear-gradient(180deg, #666 0%, #444 100%); color: #fff; }
.winamp-btn:active { border-style: inset; background: #222; }
.winamp-btn-play {
    background: linear-gradient(180deg, #3a6a3a 0%, #224422 100%) !important;
    color: #44ff44 !important;
    width: 32px;
}
.winamp-btn-play:hover { background: linear-gradient(180deg, #4a8a4a 0%, #336633 100%) !important; }
.winamp-volume {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: 1;
    min-width: 0;
}
.winamp-vol-ico { font-size: 12px; flex-shrink: 0; }
.winamp-vol-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #556b2f, #7ccd7c);
    border: 1px solid #333;
    outline: none;
    min-width: 40px;
}
.winamp-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 8px;
    height: 14px;
    background: linear-gradient(180deg, #999, #555);
    border: 1px outset #aaa;
    cursor: pointer;
}
.winamp-vol-slider::-moz-range-thumb {
    width: 8px;
    height: 14px;
    background: linear-gradient(180deg, #999, #555);
    border: 1px outset #aaa;
    cursor: pointer;
}
.winamp-playlist {
    background: #0a0a1e;
    margin: 2px 3px 3px;
    border: 1px solid #333;
    min-height: 100px;
    max-height: none;
    overflow-y: auto;
    flex: 1;
}
.winamp-playlist-header {
    background: linear-gradient(180deg, #2a2a4a, #1a1a3a);
    color: #8899bb;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
}
.winamp-track {
    padding: 2px 6px;
    font-size: 10px;
    color: #88cc88;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.winamp-track:hover { background: #1a1a3a; color: #aaffaa; }
.winamp-track.active { background: #0a0a3a; color: #00ff66; }
.winamp-track.locked { color: #555; cursor: not-allowed; font-style: italic; }
.winamp-unlock-hint { color: #444; font-size: 8px; }
.winamp-playlist::-webkit-scrollbar { width: 5px; }
.winamp-playlist::-webkit-scrollbar-track { background: #0a0a0a; }
.winamp-playlist::-webkit-scrollbar-thumb { background: #333; }

/* ===========================
   TOR BROWSER / NOSACZ GAME
   =========================== */
.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: #3a3a3a;
    border-bottom: 1px solid #555;
    flex-shrink: 0;
}
.browser-nav {
    display: flex;
    gap: 2px;
}
.browser-nav-btn {
    width: 24px;
    height: 22px;
    background: #4a4a4a;
    border: 1px solid #666;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}
.browser-nav-btn:hover { background: #555; }
.browser-url {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #222;
    border: 1px solid #555;
    border-radius: 3px;
    padding: 3px 8px;
    font-size: 12px;
    color: #8f8;
    font-family: monospace;
}
/* ===========================
   TETRIS
   =========================== */
.tetris-body {
    background: #0a0a1a !important;
    gap: 0;
}
#tetrisCanvas {
    border-right: 1px solid #1a1a3e;
}
.tetris-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    color: #0ff;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    min-width: 120px;
    gap: 8px;
    background: linear-gradient(180deg, #0a0a1a 0%, #0f0f2e 100%);
}
.tetris-next-label {
    font-size: 10px;
    letter-spacing: 3px;
    opacity: 0.6;
    margin-bottom: 2px;
}
#tetrisNext {
    border: 1px solid #1a1a3e;
    border-radius: 4px;
    background: #050510;
}
.tetris-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.tetris-stat-label {
    font-size: 9px;
    letter-spacing: 2px;
    opacity: 0.5;
}
.tetris-stat-value {
    font-size: 18px;
    color: #f0f;
    text-shadow: 0 0 8px #f0f;
}
.tetris-controls-hint {
    margin-top: auto;
    font-size: 9px;
    opacity: 0.3;
    line-height: 1.6;
    text-align: center;
}

.browser-url-icon { font-size: 12px; }
.browser-url-text { opacity: 0.8; }
.browser-body {
    flex: 1;
    background: #1a1a2e;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}
.browser-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(36px, 8vw, 72px);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    text-align: center;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 0;
    letter-spacing: 4px;
    font-family: 'Arial Black', Arial, sans-serif;
    text-transform: uppercase;
}
.browser-nonet {
    text-align: center;
    color: #ccc;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 15%;
    height: 100%;
}
.browser-nonet-icon {
    font-size: 80px;
    margin-bottom: 16px;
    opacity: 0.6;
}
.browser-nonet h2 {
    color: #e0e0e0;
    font-family: Arial, sans-serif;
    font-size: 28px;
    font-weight: 300;
    margin: 0 0 12px;
    letter-spacing: 1px;
}
.browser-nonet p {
    font-size: 14px;
    margin: 4px 0;
    font-family: Arial, sans-serif;
    color: #bbb;
}
.browser-nonet-hint {
    margin-top: 20px !important;
    color: #999;
    font-size: 12px !important;
    animation: blink-hint 1.5s ease-in-out infinite;
}
@keyframes blink-hint {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
.nosacz-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.nosacz-canvas.hidden,
.nosacz-score.hidden,
.browser-nonet.hidden,
.browser-loading.hidden,
.browser-watermark.hidden,
.safari-inception.hidden {
    display: none;
}
.safari-inception {
    width: 100%;
    height: 100%;
    border: none;
}
.browser-loading {
    text-align: center;
    color: #aaa;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.browser-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top: 4px solid #4a90d9;
    border-radius: 50%;
    animation: ieSpin 1.2s linear infinite;
}
@keyframes ieSpin {
    to { transform: rotate(360deg); }
}
.browser-loading-text {
    font-size: 13px;
    font-family: Arial, sans-serif;
    margin: 0;
}
.browser-loading-bar {
    width: 200px;
    height: 16px;
    background: #333;
    border: 1px solid #555;
    border-radius: 2px;
    overflow: hidden;
}
.browser-loading-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3a7bd5, #4a90d9);
    animation: ieLoadBar 3s ease-in-out forwards;
}
@keyframes ieLoadBar {
    0% { width: 0%; }
    30% { width: 25%; }
    50% { width: 40%; }
    70% { width: 55%; }
    85% { width: 70%; }
    95% { width: 85%; }
    100% { width: 92%; }
}
.nosacz-score {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #DAA520;
    font-size: 18px;
    font-weight: bold;
    font-family: monospace;
    text-shadow: 0 0 6px rgba(218,165,32,0.4);
    z-index: 2;
}
/* Safari theme overrides for macOS */
[data-theme="macos"] .browser-toolbar {
    background: #f5f5f7;
    border-bottom: 1px solid #d1d1d6;
}
[data-theme="macos"] .browser-nav-btn {
    background: #e8e8ed;
    border: 1px solid #d1d1d6;
    color: #333;
    border-radius: 6px;
}
[data-theme="macos"] .browser-url {
    background: #e8e8ed;
    border: 1px solid #d1d1d6;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 8px;
}
[data-theme="macos"] .browser-body {
    background: #fff;
}
[data-theme="macos"] .browser-nonet h2 {
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
[data-theme="macos"] .browser-nonet p {
    color: #86868b;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
[data-theme="macos"] .browser-nonet-icon {
    opacity: 0.6;
}
[data-theme="macos"] .browser-loading {
    color: #333;
}
[data-theme="macos"] .browser-loading-spinner {
    border-color: #e8e8ed;
    border-top-color: #007aff;
}
[data-theme="macos"] .browser-loading-bar {
    background: #e8e8ed;
    border: 1px solid #d1d1d6;
    border-radius: 4px;
}
[data-theme="macos"] .browser-loading-fill {
    background: linear-gradient(90deg, #007aff, #34aadc);
    border-radius: 4px;
}
/* IE theme overrides for Windows */
[data-theme="win98"] .browser-toolbar,
[data-theme="winxp"] .browser-toolbar {
    background: #d4d0c8;
    border-bottom: 1px solid #808080;
}
[data-theme="win98"] .browser-nav-btn,
[data-theme="winxp"] .browser-nav-btn {
    background: #d4d0c8;
    border: 1px outset #fff;
    color: #333;
}
[data-theme="win98"] .browser-url,
[data-theme="winxp"] .browser-url {
    background: #fff;
    border: 1px inset #808080;
    color: #333;
    font-family: Arial, sans-serif;
}
[data-theme="win98"] .browser-body,
[data-theme="winxp"] .browser-body {
    background: #fff;
}
[data-theme="win98"] .browser-nonet h2,
[data-theme="winxp"] .browser-nonet h2 {
    color: #333;
}
[data-theme="win98"] .browser-nonet p,
[data-theme="winxp"] .browser-nonet p {
    color: #666;
}
[data-theme="win98"] .browser-nonet-icon,
[data-theme="winxp"] .browser-nonet-icon {
    opacity: 0.7;
}
[data-theme="win98"] .browser-loading,
[data-theme="winxp"] .browser-loading {
    color: #333;
}
[data-theme="win98"] .browser-loading-spinner,
[data-theme="winxp"] .browser-loading-spinner {
    border-color: #d4d0c8;
    border-top-color: #0078d7;
}
[data-theme="win98"] .browser-loading-bar,
[data-theme="winxp"] .browser-loading-bar {
    background: #d4d0c8;
    border: 1px inset #808080;
}

/* ===========================
   TERMINAL
   =========================== */
.terminal-body {
    background: #0c0c0c !important;
    color: #cccccc !important;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace !important;
    font-size: 13px;
    padding: 8px 12px !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.terminal-output {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 4px;
}
.terminal-line {
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.4;
}
.terminal-line.error {
    color: #ff6b6b;
}
.terminal-line.success {
    color: #69ff94;
}
.terminal-line.info {
    color: #6bc5ff;
}
.terminal-line.ascii-art {
    color: #ffd700;
    line-height: 1.15;
    font-size: 11px;
}
.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.terminal-prompt {
    color: #cccccc;
    font-family: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}
.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #cccccc;
    font-family: inherit;
    font-size: inherit;
    caret-color: #cccccc;
    padding: 0 0 0 4px;
}
.terminal-output::-webkit-scrollbar {
    width: 8px;
}
.terminal-output::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.terminal-output::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

/* Theme-specific terminal titles */
[data-theme="win98"] .terminal-title-text::after { content: none; }
[data-theme="winxp"] .terminal-title-text { font-size: 0; }
[data-theme="winxp"] .terminal-title-text::after { content: "Command Prompt"; font-size: 13px; }
[data-theme="macos"] .terminal-title-text { font-size: 0; }
[data-theme="macos"] .terminal-title-text::after { content: "Terminal — zsh"; font-size: 13px; }
[data-theme="linux"] .terminal-title-text { font-size: 0; }
[data-theme="linux"] .terminal-title-text::after { content: "jan@portfolio: ~"; font-size: 13px; }

/* Theme-specific terminal prompts via JS (see script.js) */
[data-theme="macos"] .terminal-body { background: rgba(30,30,30,0.95) !important; }
[data-theme="linux"] .terminal-body { background: #300a24 !important; }
[data-theme="linux"] .terminal-prompt { color: #8ae234; }
[data-theme="linux"] .terminal-input { color: #eeeeec; caret-color: #8ae234; }
[data-theme="linux"] .terminal-line { color: #eeeeec; }
[data-theme="macos"] .terminal-prompt { color: #69ff94; }
[data-theme="macos"] .terminal-input { color: #fff; }

/* ===========================
   DESKTOP ICONS – Theme-specific SVG icons
   =========================== */

/* --- Win98: 16-color pixel-art style --- */
[data-theme="win98"] .desktop-icon-img {
    image-rendering: pixelated;
    font-size: 32px;
}

/* --- WinXP: Smooth colorful icons with shadow --- */
[data-theme="winxp"] .desktop-icon-img {
    font-size: 36px;
    filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.3));
}

/* --- macOS: Large glossy icons --- */
[data-theme="macos"] .desktop-icon-img {
    font-size: 44px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
    transition: transform 0.15s;
}
[data-theme="macos"] .desktop-icon:hover .desktop-icon-img {
    transform: scale(1.15);
}
[data-theme="macos"] .desktop-icon span {
    font-size: 12px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* --- Linux: Monospace text icons --- */
[data-theme="linux"] .desktop-icon-img {
    font-size: 34px;
    filter: drop-shadow(0 0 4px rgba(233,84,32,0.4));
}

/* ===========================
   SCROLLBAR
   =========================== */
.window-body::-webkit-scrollbar {
    width: 16px;
}
.window-body::-webkit-scrollbar-track {
    background: var(--scrollbar-track, #f0f0f0);
}
.window-body::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb, #c0c0c0);
    border: var(--scrollbar-thumb-border, 1px solid #999);
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    .desktop {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .desktop-icons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-content: flex-start;
        gap: 8px;
        padding: 12px 8px;
        max-height: none;
    }
    .desktop-icon {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 72px;
        flex-shrink: 0;
    }
    .window {
        width: calc(100vw - 16px) !important;
        left: 8px !important;
        top: 8px !important;
        max-height: calc(100vh - var(--taskbar-height, 36px) - 16px);
    }
    .about-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .start-text {
        display: none;
    }
    .taskbar {
        z-index: 10000;
    }
    .lang-toggle {
        font-size: 11px;
        padding: 2px 6px;
    }
    .mobile-fab {
        display: block !important;
    }
}

/* Mobile floating settings button */
.mobile-fab {
    display: none;
    position: fixed;
    bottom: 44px;
    right: 8px;
    z-index: 10001;
}
.mobile-fab-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mobile-fab-panel {
    position: absolute;
    bottom: 52px;
    right: 0;
    background: rgba(30,30,40,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    min-width: 180px;
}
.mobile-fab-panel.hidden {
    display: none;
}
.mobile-fab-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
}
.mobile-fab-row span {
    color: #aaa;
    font-size: 12px;
    font-family: sans-serif;
    min-width: 36px;
}
.mobile-fab-row .theme-btn-small,
.mobile-fab-row .lang-btn {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.mobile-fab-row .theme-btn-small:hover,
.mobile-fab-row .lang-btn:hover {
    background: rgba(255,255,255,0.25);
}

/* ===========================
   NOTEPAD
   =========================== */
.notepad-body {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}
#notepadText {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    padding: 8px;
    font-family: monospace;
    font-size: 13px;
    background: transparent;
    color: inherit;
    outline: none;
    box-sizing: border-box;
}

/* ===========================
   SAW GAME (Vim Easter Egg)
   =========================== */
.saw-terminal-fullscreen {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80vw !important;
    height: 65vh !important;
    z-index: 99999 !important;
    transition: all 0.5s ease !important;
    max-height: none !important;
    max-width: none !important;
}
.saw-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 99998;
    transition: background 1s ease;
    pointer-events: none;
}
.saw-timer-container {
    position: fixed;
    z-index: 100000;
    top: calc(50% - 33vh - 20px);
    left: 10vw;
    width: 80vw;
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}
.saw-timer-bar {
    height: 100%;
    width: 100%;
    background: #ff0000;
    transition: width 1s linear;
    border-radius: 4px;
}
.saw-timer-bar.urgent {
    animation: sawTimerPulse 0.5s ease-in-out infinite alternate;
}
@keyframes sawTimerPulse {
    from { background: #ff0000; }
    to { background: #ff4444; box-shadow: 0 0 10px #ff0000; }
}
.saw-timer-text {
    position: fixed;
    z-index: 100000;
    top: calc(50% - 33vh - 40px);
    left: 10vw;
    width: 80vw;
    text-align: center;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    color: #ff4444;
}
.saw-life {
    position: fixed !important;
    bottom: 3vh !important;
    z-index: 99999 !important;
    pointer-events: none !important;
    transition: left 0.5s ease, opacity 0.3s ease !important;
    transform: scale(0.8) !important;
}
.saw-life-dying {
    animation: sawLifeDie 0.8s ease forwards !important;
}
@keyframes sawLifeDie {
    0% { transform: scale(0.8); opacity: 1; filter: brightness(1); }
    20% { transform: scale(1.2); filter: brightness(3) sepia(1) hue-rotate(-30deg); }
    100% { transform: scale(0) rotate(90deg); opacity: 0; filter: brightness(0); }
}
.saw-crack {
    position: fixed;
    z-index: 100001;
    pointer-events: none;
    opacity: 0;
    animation: sawCrackAppear 0.3s ease forwards;
}
@keyframes sawCrackAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 0.85; transform: scale(1); }
}
@keyframes sawScreenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -3px); }
    20% { transform: translate(4px, 5px); }
    30% { transform: translate(-6px, 2px); }
    40% { transform: translate(3px, -4px); }
    50% { transform: translate(-2px, 5px); }
    60% { transform: translate(5px, -2px); }
    70% { transform: translate(-3px, 3px); }
    80% { transform: translate(4px, -5px); }
    90% { transform: translate(-4px, 1px); }
}
.saw-shake {
    animation: sawScreenShake 0.4s ease;
}
.saw-bloody-text {
    color: #8b0000 !important;
    text-shadow: 0 0 10px #ff0000, 0 0 20px #8b0000;
    font-size: 24px !important;
    text-align: center;
    animation: sawBloodyPulse 2s ease-in-out infinite alternate;
}
@keyframes sawBloodyPulse {
    from { text-shadow: 0 0 10px #ff0000, 0 0 20px #8b0000; }
    to { text-shadow: 0 0 20px #ff0000, 0 0 40px #8b0000, 0 0 60px #4a0000; }
}
.saw-game-over-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    /* No fade — instant black to prevent flash */
}
@keyframes sawFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.saw-lives-counter {
    position: fixed;
    z-index: 100000;
    bottom: calc(3vh + 80px);
    left: 50%;
    transform: translateX(-50%);
    font-family: monospace;
    font-size: 12px;
    color: #ff4444;
    text-align: center;
}

/* Copilot tour spotlight on icons/elements */
.copilot-spotlight {
    animation: copilotSpotlight 0.4s ease forwards;
    z-index: 100 !important;
    position: relative;
}
@keyframes copilotSpotlight {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
    100% { transform: scale(1.25); filter: drop-shadow(0 0 12px rgba(255,220,100,0.8)); }
}
.copilot-spotlight-out {
    animation: copilotSpotlightOut 0.3s ease forwards;
}
@keyframes copilotSpotlightOut {
    0% { transform: scale(1.25); filter: drop-shadow(0 0 12px rgba(255,220,100,0.8)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
}
