@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* Custom Cursor */
html, * {
    cursor: url('components/cursor.cur'), auto;
}

/* Desktop Icons */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-decoration: none;
    color: #dfffc7;
    pointer-events: auto !important;
    transition: transform 0.2s;
    cursor: pointer;
    z-index: 10;
    position: relative;
}

.desktop-icon:hover {
    transform: scale(1.05);
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: all 0.2s;
    background: transparent;
}

.desktop-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.desktop-icon:hover .desktop-icon-img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)) brightness(1.1);
}

.icon-label {
    text-align: center;
    font-size: 12px;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

/* Windows 7 Taskbar */
.windows7-taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background-image: url('public/taskbar-texture.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    backdrop-filter: blur(4px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    padding: 0 4px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
    pointer-events: auto !important;
}

/* Start Button */
.start-button {
    height: 100%;
    width: 46px;
    min-width: 46px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: filter 0.1s;
    margin: 0;
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
}

.start-button:hover {
    filter: brightness(1.1);
}

.start-button:active {
    filter: brightness(0.95);
}

.start-button.active {
    filter: brightness(0.9);
}

.start-orb {
    width: 46px;
    height: 46px;
    background-image: url('public/start-orb.png');
    background-size: 46px 46px;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    pointer-events: none;
}

/* Taskbar Items */
.taskbar-items {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 0 4px;
    height: 100%;
}

.taskbar-item {
    height: 40px;
    min-width: 160px;
    max-width: 200px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 0 10px;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
}

.taskbar-item-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.taskbar-close-btn {
    width: 16px;
    height: 16px;
    min-width: 16px;
    background: transparent;
    border: none;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    opacity: 0.7;
    transition: all 0.15s;
    color: white;
    pointer-events: auto !important;
}

.taskbar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
}

.taskbar-close-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.taskbar-close-btn svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

.taskbar-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

.taskbar-item.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.taskbar-item-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

/* System Tray */
.system-tray {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 8px;
    height: 100%;
    pointer-events: auto !important;
    position: relative;
    z-index: 1001;
}

.taskbar-time {
    color: white;
    font-size: 11px;
    font-weight: 400;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 4px 8px;
    border-radius: 2px;
    transition: background 0.2s;
}

.taskbar-time:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 48px;
    left: 0;
    width: 550px;
    height: 600px;
    background: linear-gradient(180deg,
        rgba(250, 250, 250, 0.1) 0%,
        rgba(250, 250, 250, 0.1) 40%,
        rgba(140, 140, 140, 0.1) 43%,
        rgba(170, 170, 170, 0.1) 100%
    );
    backdrop-filter: blur(8px) brightness(0.5);
    border: 1px solid rgba(180, 180, 180, 0.5);
    border-radius: 0 8px 8px 0;
    box-shadow: 
        0 0 0 1px rgba(180, 180, 180, 0.5),
        0 0 8px 3px rgba(10, 10, 10, 0.3);
    z-index: 99999;
    display: flex;
    overflow: hidden;
    pointer-events: auto;
    will-change: transform, opacity;
    transform-origin: bottom left;
}

.start-menu.hidden {
    display: none;
}

.start-menu-left {
    flex: 0 0 62%;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 1);
    border-radius: 4px;
    border: solid 1px rgba(0, 0, 0, 0.4);
    margin: 5px;
    overflow: hidden;
}

.start-menu-programs {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 0;
    will-change: scroll-position;
}

.start-menu-programs::-webkit-scrollbar {
    width: 8px;
}

.start-menu-programs::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.start-menu-section {
    padding: 0 10px;
}

.start-menu-item {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 15px;
    cursor: pointer;
    color: #333;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.1s;
    border-radius: 2px;
    margin: 2px 0;
    will-change: background;
}

.start-menu-item:hover {
    background: rgba(0, 120, 215, 0.1);
}

.start-menu-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.start-menu-search {
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.start-search-input {
    width: 100%;
    line-height: 30px;
    padding: 0 5px;
    font-size: 15px;
    border: solid 1px rgba(1, 1, 1, 0.5);
    background: rgba(255, 255, 255, 1);
    border-radius: 2px;
    height: 30px;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.start-menu-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px;
}

.start-menu-user-section {
    padding: 10px;
}

.start-menu-user {
    color: white;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.shutdown-button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s;
    color: white;
}

.shutdown-button:hover {
    background: rgba(255, 255, 255, 0.2);
}


/* Code Rain */
#code-rain {
    background: transparent;
    overflow: hidden;
}

/* Windows 7 Aero Window Styles */
.window {
    position: absolute;
    width: 600px;
    min-height: 400px;
    background: #FFFFFF;
    backdrop-filter: blur(7px) brightness(1);
    border: none;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.8),
        0 0 8px 3px rgba(10, 10, 10, 0.8);
    border-radius: 8px;
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.8) translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 400px;
    font-size: 15px;
    color: #000000;
}

.window.opening {
    animation: genieOpen 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes genieOpen {
    0% {
        opacity: 0;
        transform: scale(0.1) translateY(200px) perspective(1000px) rotateX(45deg);
        filter: blur(15px);
    }
    30% {
        opacity: 0.5;
        transform: scale(0.6) translateY(50px) perspective(1000px) rotateX(15deg);
        filter: blur(8px);
    }
    60% {
        opacity: 0.8;
        transform: scale(1.05) translateY(-10px) perspective(1000px) rotateX(-5deg);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0) perspective(1000px) rotateX(0deg);
        filter: blur(0);
    }
}

.window-header {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    color: #000000;
    font-weight: 600;
    cursor: move;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.window-header .title {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-grow: 1;
    height: 100%;
    line-height: 32px;
}

.window-header .title img {
    width: 20px;
    margin-right: 5px;
    vertical-align: middle;
}

.window-controls {
    display: flex;
    gap: 2px;
    align-items: center;
}

.window-control {
    width: 28px;
    height: 19px;
    border-radius: 0;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.1s;
    position: relative;
    background: linear-gradient(180deg,
        rgba(200, 200, 200, 0.5) 0%,
        rgba(200, 200, 200, 0.5) 40%,
        rgba(110, 110, 110, 0.4) 60%,
        rgba(150, 150, 150, 0.4) 90%,
        rgba(180, 180, 180, 0.4) 100%
    );
    backdrop-filter: grayscale(1);
    box-shadow: 
        0 0 3px rgba(255, 255, 255, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.5),
        inset 0 0 1px 2px rgba(255, 255, 255, 0.4);
}

.window-control:not(:last-child) {
    border-right: solid 1px rgba(0, 0, 0, 0.4);
}

.window-control:hover {
    filter: brightness(1.3);
}

.window-control:active {
    filter: brightness(0.9);
}

.window-control img {
    height: 13px;
    margin-top: 2px;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
    pointer-events: none;
}

.window-control.maximize-btn img.maximize-icon {
    height: 11px;
    margin-top: 3px;
}

.window-control.close-btn {
    width: 46px;
}

.window-header:has(.focused) .window-control.close-btn,
.window-header.focused .window-control.close-btn {
    background: linear-gradient(180deg,
        rgba(255, 107, 63, 0.8) 0%,
        rgba(212, 116, 91, 0.7) 40%,
        rgba(192, 55, 44, 0.9) 55%,
        rgba(204, 33, 33, 0.7) 80%,
        rgba(255, 125, 125, 0.9) 100%
    );
}

.window-content {
    flex-grow: 1;
    border: solid 1px rgba(10, 10, 10, 0.5);
    overflow: hidden;
    margin: 0 5px 5px 5px;
    max-width: calc(100% - 10px);
    background: #FFFFFF;
    color: #000000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.window-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
}

.window-content > div:not(:has(iframe)) {
    padding: 16px;
    overflow-y: auto;
    background: #FFFFFF;
    color: #000000;
}

/* Window States */
.window.minimized {
    display: none !important;
    visibility: hidden;
}

.window.maximized {
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 120px) !important;
    top: 20px !important;
    left: 20px !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #17152d;
}

::-webkit-scrollbar-thumb {
    background: #532bdc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #dfffc7;
}

