/* ═══════════════════════════════════════════════════
   BRENT FAIYAZ CLONE — Windows 95/98 Aesthetic
   ═══════════════════════════════════════════════════ */
:root {
    --win-bg: #c0c0c0;
    --win-border-light: #ffffff;
    --win-border-dark: #808080;
    --win-border-black: #000000;
    --win-blue: #000080;
    --desktop: #008080;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(-45deg, #2b3a4a, #111827, #374151, #1e293b);
    background-size: 400% 400%;
    animation: win8Shift 12s ease infinite;
    color: #000;
    font-family: 'Tahoma', 'Verdana', sans-serif;
    font-size: 11px;
    margin: 0;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: none;
    cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxOCI+CjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxIiBkPSJNMCAwbDEwIDEwSDZMNCAxNnoiLz4KPC9zdmc+"), auto;
}

@keyframes win8Shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

a {
    color: #000080;
    text-decoration: underline;
}

a:hover {
    color: #000;
}

/* ═══ CRT OVERLAY ═══ */
.crt-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 99999;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%);
    background-size: 100% 4px;
    opacity: 0.3;
}

/* ═══ DESKTOP ═══ */
#desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - 28px);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.desktop-icon {
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyNCI+CjxwYXRoIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLXdpZHRoPSIxIiBkPSJNOSAxNWMwLTItMi00LTEtNWMtMiAxLTQtMS00LTFzMS0yIDItMmMtMS0xLTItMi0yLTNTNSAzIDYgNGwtMSAyYzEtMSAyLTIgMi0yIDAtMSAwLTIgMC0zIDEgMSAxIDIgMSAyczAgMyAwIDRjMCAxIDEgMiA0IDEgMSAwIDAgMSAwIDJtMi0zYzEgMiAxIDIgMyAycy0xLTIgMC0yYzEuMiAwIDIuNSAwIDIgMSAwIDEgMSAyIDMgMSAyLTItMS41LTItMi0ycy0yIDEuNS0zIDFjLTIgMC0xLjUtMS0zLTF6Ii8+Cjwvc3ZnPg=="), pointer;
}

.desktop-icon.selected .icon-text,
.desktop-icon:hover .icon-text {
    background-color: var(--win-blue);
    color: #fff;
    outline: 1px dotted #fff;
}

.icon-text {
    color: #fff;
    padding: 2px 4px;
    outline: 1px dotted transparent;
}

.icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
    text-shadow: 1px 1px 0 #000;
}

/* Mock Emojis as Pixel Icons */
.notepad-icon::after {
    content: "📝";
}

.folder-icon::after {
    content: "📁";
}

.ie-icon::after {
    content: "🌐";
}

.paint-icon::after {
    content: "🎨";
}

.mine-icon::after {
    content: "💣";
}

.snake-icon::after {
    content: "🐍";
}

.recycle-icon::after {
    content: "🗑️";
}

.file-video::after {
    content: "🎬";
    font-size: 24px;
}

.file-html::after {
    content: "📄";
    font-size: 24px;
}

.file-doc::after {
    content: "📋";
    font-size: 24px;
}

/* Small Menu Icons */
.notepad-sm::after {
    content: "📝";
    font-size: 14px;
    text-shadow: none;
}

.folder-sm::after {
    content: "📁";
    font-size: 14px;
    text-shadow: none;
}

.ie-sm::after {
    content: "🌐";
    font-size: 14px;
    text-shadow: none;
}

.media-sm::after {
    content: "📼";
    font-size: 14px;
    text-shadow: none;
}

.paint-sm::after {
    content: "🎨";
    font-size: 14px;
    text-shadow: none;
}

.mine-sm::after {
    content: "💣";
    font-size: 14px;
    text-shadow: none;
}

.snake-sm::after {
    content: "🐍";
    font-size: 14px;
    text-shadow: none;
}

.glass-sm::after {
    content: "🔍";
    font-size: 14px;
    text-shadow: none;
}

.shut-sm::after {
    content: "🔌";
    font-size: 14px;
    text-shadow: none;
}

.back-sm::after {
    content: "⬅️";
    font-size: 14px;
    text-shadow: none;
}

.fwd-sm::after {
    content: "➡️";
    font-size: 14px;
    text-shadow: none;
}

.up-sm::after {
    content: "⬆️";
    font-size: 14px;
    text-shadow: none;
}

.copy-sm::after {
    content: "📑";
    font-size: 14px;
    text-shadow: none;
}

.paste-sm::after {
    content: "📋";
    font-size: 14px;
    text-shadow: none;
}

/* ═══ W95 BEVELS ═══ */
.w95-outset {
    background: var(--win-bg);
    border-top: 1px solid var(--win-border-light);
    border-left: 1px solid var(--win-border-light);
    border-bottom: 1px solid var(--win-border-black);
    border-right: 1px solid var(--win-border-black);
    box-shadow: inset -1px -1px var(--win-border-dark), inset 1px 1px #dfdfdf;
}

.w95-inset {
    background: #fff;
    border-top: 1px solid var(--win-border-dark);
    border-left: 1px solid var(--win-border-dark);
    border-bottom: 1px solid var(--win-border-light);
    border-right: 1px solid var(--win-border-light);
    box-shadow: inset 1px 1px #000, inset -1px -1px #dfdfdf;
}

.w95-btn {
    background: var(--win-bg);
    border-top: 1px solid var(--win-border-light);
    border-left: 1px solid var(--win-border-light);
    border-bottom: 1px solid var(--win-border-black);
    border-right: 1px solid var(--win-border-black);
    box-shadow: inset -1px -1px var(--win-border-dark), inset 1px 1px #dfdfdf;
    padding: 2px 8px;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    outline: none;
}

.w95-btn:active,
.w95-btn.active {
    border-top: 1px solid var(--win-border-black);
    border-left: 1px solid var(--win-border-black);
    border-bottom: 1px solid var(--win-border-light);
    border-right: 1px solid var(--win-border-light);
    box-shadow: inset 1px 1px var(--win-border-dark), inset -1px -1px #dfdfdf;
    padding: 3px 7px 1px 9px;
}

/* ═══ TASKBAR ═══ */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    padding: 2px;
    display: flex;
    z-index: 9999;
}

#start-btn {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    height: 100%;
    font-size: 12px;
}

.divider {
    width: 2px;
    height: 20px;
    border-left: 1px solid var(--win-border-dark);
    border-right: 1px solid var(--win-border-light);
    margin: 0 4px;
    align-self: center;
}

#taskbar-tasks {
    flex-grow: 1;
    display: flex;
    gap: 4px;
    overflow: hidden;
}

.task-item {
    width: auto;
    max-width: 300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

.task-item.active {
    background: #dfdfdf;
    outline: 1px dotted #000;
    outline-offset: -4px;
    border-top: 1px solid var(--win-border-black);
    border-left: 1px solid var(--win-border-black);
    border-bottom: 1px solid var(--win-border-light);
    border-right: 1px solid var(--win-border-light);
    box-shadow: inset 1px 1px var(--win-border-dark), inset -1px -1px #dfdfdf;
    padding: 1px 5px 0 7px;
}

#tray {
    display: flex;
    align-items: center;
    padding: 0 8px;
    align-self: center;
    height: 22px;
    margin-right: 2px;
}

/* ═══ WINDOW COMPONENTS ═══ */
.window {
    position: absolute;
    display: flex;
    flex-direction: column;
    padding: 3px;
    z-index: 10;
    box-shadow: 1px 1px 0 #000;
}

.window.active {
    z-index: 100;
}

.title-bar {
    background: var(--win-border-dark);
    color: #c0c0c0;
    padding: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    cursor: default;
}

.window.active .title-bar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: #fff;
}

.title-bar-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 16px;
    height: 14px;
    padding: 0;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--win-bg);
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-bottom: 1px solid #000;
    border-right: 1px solid #000;
    box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
    cursor: pointer;
}

.min-btn {
    line-height: 0;
    padding-bottom: 6px;
}

.win-btn:active {
    border-top: 1px solid #000;
    border-left: 1px solid #000;
    border-bottom: 1px solid #fff;
    border-right: 1px solid #fff;
    box-shadow: inset 1px 1px #808080, inset -1px -1px #dfdfdf;
}

.close-btn {
    font-weight: 800;
    font-family: sans-serif;
    font-size: 9px;
}

.window-body {
    padding: 4px;
    flex-grow: 1;
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.menu-bar {
    display: flex;
    gap: 8px;
    padding: 2px 4px 6px;
}

.menu-bar span {
    cursor: pointer;
    padding: 2px 6px;
}

.menu-bar span:hover {
    background: var(--win-blue);
    color: #fff;
}

/* NOTEPAD */
.notepad-area {
    flex-grow: 1;
    width: 100%;
    height: 280px;
    resize: none;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    padding: 4px;
    outline: none;
}

/* PAINT */
.paint-area {
    flex-grow: 1;
    width: 100%;
    height: 300px;
    background: #fff;
    cursor: crosshair;
}

/* MINESWEEPER */
.mine-cell {
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    font-family: 'Arial', sans-serif;
    font-weight: 900;
    font-size: 13px;
    line-height: 20px;
    text-align: center;
}

.mine-cell-revealed {
    width: 20px;
    height: 20px;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    border-left: 1px solid #808080;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-family: 'Arial', sans-serif;
    font-size: 13px;
    box-sizing: border-box;
}

/* EXPLORER */
.toolbar {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-bottom: 1px solid #808080;
    border-top: 1px solid #fff;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    font-size: 10px;
    padding: 2px;
    cursor: pointer;
}

.tool-btn:hover {
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-bottom: 1px solid #808080;
    border-right: 1px solid #808080;
}

.tool-divider {
    width: 1px;
    height: 32px;
    border-left: 1px solid #808080;
    border-right: 1px solid #fff;
    margin: 0 4px;
}

.address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    margin-bottom: 4px;
}

.address-input {
    flex-grow: 1;
    padding: 2px 4px;
    display: flex;
    align-items: center;
}

.explorer-content {
    display: flex;
    flex-grow: 1;
}

.sidebar {
    width: 180px;
    background: #fff;
    padding: 4px;
    overflow-y: auto;
    margin-right: 4px;
}

.tree-item {
    margin-bottom: 2px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tree-item.selected {
    background: var(--win-blue);
    color: #fff;
    outline: 1px dotted #000;
}

.tree-children {
    margin-left: 16px;
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.main-view {
    flex-grow: 1;
    padding: 12px;
    display: flex;
    gap: 24px;
    align-content: flex-start;
    flex-wrap: wrap;
    overflow-y: auto;
}

/* File Items */
.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    text-align: center;
    cursor: pointer;
    gap: 4px;
}

.file-item.selected .file-text,
.file-item:hover .file-text {
    background: var(--win-blue);
    color: #fff;
    outline: 1px dotted #000;
}

.file-text {
    padding: 1px 2px;
    outline: 1px dotted transparent;
    word-break: break-all;
    font-size: 11px;
}

/* MEDIA PLAYER */
.player-body {
    padding: 8px;
}

.player-media {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    margin-bottom: 8px;
    position: relative;
}

.player-media iframe {
    width: 100%;
    height: 100%;
    z-index: 2;
    position: relative;
}

.player-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.player-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 8px;
    background: #000;
    color: #32cd32;
    font-family: 'Courier New', monospace;
    flex-grow: 1;
    height: 40px;
}

.player-info h3 {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
}

.player-info p {
    margin: 0;
    font-size: 10px;
    color: #00ff00;
}

.player-buttons {
    display: flex;
    gap: 4px;
}


/* ═══ START MENU ═══ */
#start-menu {
    position: absolute;
    bottom: 28px;
    left: 0;
    width: 220px;
    z-index: 10000;
    display: flex;
    flex-direction: row;
}

.start-sidebar {
    width: 26px;
    background: linear-gradient(#000080, #1084d0);
    color: #fff;
    display: flex;
    align-items: flex-end;
    padding: 6px;
    font-weight: bold;
    font-family: 'Arial Black', Arial, sans-serif;
    font-size: 18px;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

.start-items {
    flex-grow: 1;
    padding: 2px;
    display: flex;
    flex-direction: column;
}

.start-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 12px;
}

.start-item:hover {
    background: var(--win-blue);
    color: #fff;
}

.start-divider {
    height: 1px;
    background: var(--win-border-dark);
    border-bottom: 1px solid var(--win-border-light);
    margin: 4px 2px;
}

/* ═══ BOOT SCREEN ═══ */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    color: #c0c0c0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

@keyframes winLoad {
    0% {
        left: -60px;
    }

    100% {
        left: 240px;
    }
}