/* MacOS System 7.1 Theme Styles */

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-smooth: never;
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
}

/* Desktop Icons */
.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.desktop-icon:hover {
    transform: translateY(-2px);
}

.desktop-icon:hover span {
    background-color: #D6E3FF !important;
}

.desktop-icon:active {
    transform: translateY(0);
}

/* Folder Items */
.folder-item {
    padding: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.folder-item:hover {
    background-color: #D6E3FF;
    border-color: #0066CC;
}

.folder-item:active {
    background-color: #B5D5FF;
}

/* Mac Buttons */
.mac-button {
    background: linear-gradient(to bottom, #F5F5F7, #E0E0E0);
    border: 1px solid #86868B;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    cursor: pointer;
    box-shadow: inset -1px -1px 0px 0px #000, inset 1px 1px 0px 0px #fff;
    transition: all 0.2s;
}

.mac-button:hover {
    background: linear-gradient(to bottom, #E8E8E8, #D0D0D0);
}

.mac-button:active {
    box-shadow: inset 1px 1px 0px 0px #000, inset -1px -1px 0px 0px #fff;
    background: linear-gradient(to bottom, #D0D0D0, #E8E8E8);
}

.mac-button:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* Control Panel Items */
.control-panel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.control-panel-item:hover {
    background-color: #D6E3FF;
    border-color: #0066CC;
}

.control-panel-item:active {
    background-color: #B5D5FF;
}

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

::-webkit-scrollbar-track {
    background: #C0C0C0;
    border: 1px solid #808080;
    box-shadow: inset 1px 1px 0px 0px #fff;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #F5F5F7, #E0E0E0);
    border: 1px solid #86868B;
    box-shadow: inset -1px -1px 0px 0px #000, inset 1px 1px 0px 0px #fff;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #E8E8E8, #D0D0D0);
}

/* Selection Styling */
::selection {
    background-color: #0066CC;
    color: white;
}

/* Window Animation */
@keyframes windowOpen {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.window-open {
    animation: windowOpen 0.3s ease-out;
}

/* System Font Rendering */
.system-font {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.5px;
}

/* Pixelated Border Effects */
.pixel-border {
    border-style: solid;
    border-width: 2px;
    border-color: #fff #808080 #808080 #fff;
}

.pixel-border-inset {
    border-style: solid;
    border-width: 2px;
    border-color: #808080 #fff #fff #808080;
}

/* Gradient Backgrounds */
.gradient-desktop {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .desktop-icon {
        transform: scale(0.8);
    }
    
    .desktop-icon:hover {
        transform: scale(0.8) translateY(-2px);
    }
    
    .folder-item {
        padding: 4px;
    }
}

/* Loading Animation */
@keyframes classic-loading {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.classic-loading {
    animation: classic-loading 1.5s infinite;
}