/* ============================================
   Windows93 OS - Main Styles
   Retro Windows 93/95 Aesthetic
   ============================================ */

/* CSS Variables - Windows 93 Color Palette */
:root {
    /* Classic Windows Colors */
    --win-desktop: #008080;
    --win-gray-light: #dfdfdf;
    --win-gray: #c0c0c0;
    --win-gray-dark: #808080;
    --win-gray-darker: #404040;
    --win-white: #ffffff;
    --win-black: #000000;

    /* Title Bar Colors */
    --win-titlebar: #000080;
    --win-titlebar-inactive: #808080;
    --win-titlebar-text: #ffffff;

    /* Button Colors */
    --win-btn-face: #c0c0c0;
    --win-btn-highlight: #ffffff;
    --win-btn-shadow: #808080;
    --win-btn-dark-shadow: #000000;

    /* Selection */
    --win-selection: #000080;
    --win-selection-text: #ffffff;

    /* Typography */
    --font-system: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    --font-mono: 'Fixedsys', 'Consolas', 'Courier New', monospace;
    --font-size-sm: 11px;
    --font-size-md: 12px;
    --font-size-lg: 14px;

    /* Z-Index Layers */
    --z-desktop: 1;
    --z-window: 100;
    --z-taskbar: 1000;
    --z-start-menu: 1001;
    --z-context-menu: 2000;
    --z-notification: 3000;
    --z-boot: 9999;
}

/* 3D Border Mixins via Box Shadow */
.win-border-outset {
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow:
        inset 1px 1px 0 var(--win-btn-highlight),
        inset -1px -1px 0 var(--win-btn-shadow);
}

.win-border-inset {
    border: 2px solid;
    border-color: var(--win-btn-dark-shadow) var(--win-btn-highlight) var(--win-btn-highlight) var(--win-btn-dark-shadow);
    box-shadow:
        inset 1px 1px 0 var(--win-btn-shadow),
        inset -1px -1px 0 var(--win-btn-highlight);
}

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

/* Base Styles */
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-system);
    font-size: var(--font-size-md);
    color: var(--win-black);
    background: var(--win-desktop);
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
    user-select: none;
    image-rendering: pixelated;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.no-select {
    user-select: none;
    -webkit-user-select: none;
}

/* Windows 93 Scrollbar */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: repeating-conic-gradient(var(--win-gray) 0% 25%, var(--win-white) 0% 50%) 50% / 2px 2px;
}

::-webkit-scrollbar-thumb {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
}

::-webkit-scrollbar-button {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    display: block;
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-corner {
    background: var(--win-gray);
}

/* ============================================
   CLASSIC WINDOWS BOOT SCREEN
   ============================================ */

#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000080;
    z-index: var(--z-boot);
    display: flex;
    align-items: center;
    justify-content: center;
}

.boot-content {
    text-align: center;
}

/* Tux Penguin Logo */
.boot-logo {
    margin-bottom: 20px;
}

.tux-image {
    width: 120px;
    height: auto;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.5));
}

.tux-icon {
    font-size: 100px;
    line-height: 1;
    filter: drop-shadow(4px 4px 8px rgba(0,0,0,0.5));
}

.boot-subtitle {
    font-family: var(--font-system);
    font-size: 18px;
    color: #cccccc;
    margin-bottom: 30px;
    font-style: italic;
}

/* Boot Title */
.boot-title {
    font-family: var(--font-system);
    font-size: 48px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 40px;
    text-shadow: 3px 3px 0 #000000;
}

.boot-93 {
    font-style: italic;
}

/* Boot Progress Bar */
.boot-progress {
    width: 300px;
    height: 20px;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-shadow) var(--win-btn-highlight) var(--win-btn-highlight) var(--win-btn-shadow);
    margin: 0 auto 20px;
    padding: 2px;
}

.boot-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--win-titlebar);
    transition: width 0.1s linear;
}

/* Boot Status Text */
.boot-status {
    font-family: var(--font-system);
    font-size: 14px;
    color: #ffffff;
}

/* ============================================
   START BUTTON PENGUIN
   ============================================ */

.start-penguin {
    font-size: 20px;
    line-height: 1;
}

/* ============================================
   WINDOWS 93 UI ELEMENTS
   ============================================ */

/* Selection */
::selection {
    background: var(--win-selection);
    color: var(--win-selection-text);
}

/* Focus Styles */
:focus {
    outline: 1px dotted var(--win-black);
    outline-offset: -4px;
}

/* Classic Windows Button */
button, .win-button {
    font-family: var(--font-system);
    font-size: var(--font-size-md);
    background: var(--win-btn-face);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow:
        inset 1px 1px 0 var(--win-white),
        inset -1px -1px 0 var(--win-btn-shadow);
    padding: 4px 12px;
    cursor: pointer;
    color: var(--win-black);
    min-width: 75px;
}

button:active, .win-button:active {
    border-color: var(--win-btn-dark-shadow) var(--win-btn-highlight) var(--win-btn-highlight) var(--win-btn-dark-shadow);
    box-shadow:
        inset 1px 1px 0 var(--win-btn-shadow),
        inset -1px -1px 0 var(--win-white);
    padding: 5px 11px 3px 13px;
}

button:disabled {
    color: var(--win-gray-dark);
    text-shadow: 1px 1px 0 var(--win-white);
}

/* Input Fields */
input, textarea, select {
    font-family: var(--font-system);
    font-size: var(--font-size-md);
    background: var(--win-white);
    border: 2px solid;
    border-color: var(--win-btn-shadow) var(--win-btn-highlight) var(--win-btn-highlight) var(--win-btn-shadow);
    box-shadow:
        inset 1px 1px 0 var(--win-btn-dark-shadow);
    padding: 3px 4px;
    color: var(--win-black);
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Checkbox & Radio - Windows 93 Style */
input[type="checkbox"], input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 13px;
    height: 13px;
    background: var(--win-white);
    border: 2px solid;
    border-color: var(--win-btn-shadow) var(--win-btn-highlight) var(--win-btn-highlight) var(--win-btn-shadow);
    box-shadow: inset 1px 1px 0 var(--win-btn-dark-shadow);
    cursor: pointer;
    vertical-align: middle;
    margin-right: 4px;
}

input[type="checkbox"]:checked {
    background: var(--win-white);
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    display: block;
    font-size: 10px;
    font-weight: bold;
    color: var(--win-black);
    text-align: center;
    line-height: 9px;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="radio"]:checked::after {
    content: '';
    display: block;
    width: 5px;
    height: 5px;
    background: var(--win-black);
    border-radius: 50%;
    margin: 2px;
}

/* ============================================
   CONTEXT MENU
   ============================================ */

#context-menu {
    position: fixed;
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow:
        inset 1px 1px 0 var(--win-white),
        2px 2px 0 rgba(0, 0, 0, 0.3);
    min-width: 180px;
    padding: 2px;
    z-index: var(--z-context-menu);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 20px 4px 8px;
    cursor: pointer;
    font-size: var(--font-size-md);
}

.context-menu-item:hover {
    background: var(--win-selection);
    color: var(--win-selection-text);
}

.context-icon {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.context-menu-divider {
    height: 1px;
    background: var(--win-btn-shadow);
    border-bottom: 1px solid var(--win-btn-highlight);
    margin: 4px 2px;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

#notifications-container {
    position: fixed;
    bottom: 50px;
    right: 8px;
    z-index: var(--z-notification);
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    pointer-events: none;
}

.notification {
    background: var(--win-gray);
    border: 2px solid;
    border-color: var(--win-btn-highlight) var(--win-btn-dark-shadow) var(--win-btn-dark-shadow) var(--win-btn-highlight);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    max-width: 300px;
    animation: slideIn 0.2s ease;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.notification.removing {
    animation: slideOut 0.2s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 2px;
    font-size: var(--font-size-md);
}

.notification-message {
    font-size: var(--font-size-sm);
    color: var(--win-gray-darker);
}

.notification-close {
    padding: 0;
    min-width: auto;
    width: 16px;
    height: 16px;
    font-size: 10px;
    line-height: 1;
}

/* ============================================
   COMMON ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Windows 93 Open Animation */
@keyframes windowOpen {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Windows 93 Close Animation */
@keyframes windowClose {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}
