/* General Styles */
body {
    background-color: #c0c0c0; /* Light gray background */
    font-family: 'Chicago', 'Silom', 'SF Mono', monospace; /* Classic Mac font or fallback */
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px; /* Add padding around the body */
    box-sizing: border-box; /* Include padding in height/width */
    image-rendering: pixelated; /* Keep icons sharp */
    /* Optional: Add the dithered background pattern */
    background-image: repeating-linear-gradient(45deg, #b0b0b0 0, #b0b0b0 1px, #c0c0c0 1px, #c0c0c0 2px);
}

/* Window Styling */
.mac-window {
    width: 450px;
    max-width: 100%; /* Ensure it doesn't overflow small screens */
    background-color: #ffffff; /* White window background */
    border: 1px solid #000000;
    box-sizing: border-box; /* Include padding/border in width */
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1); /* Simple shadow */
    position: relative; /* For positioning scrollbars/resize */
    padding-bottom: 16px; /* Space for horizontal scrollbar */
    padding-right: 16px; /* Space for vertical scrollbar */
}

/* Title Bar */
.title-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #000000;
    height: 18px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    position: relative;
}

.title-bar-lines {
    position: absolute;
    left: 5px;
    right: 5px;
    top: 5px;
    height: 8px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    pointer-events: none; /* Allow clicks through */
}
.title-bar-lines::before,
.title-bar-lines::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #000;
}
.title-bar-lines::before { top: 2px; }
.title-bar-lines::after { top: 4px; }


.title-text {
    flex-grow: 1;
    text-align: center;
    font-weight: bold;
    line-height: 18px; /* Vertically center */
    position: relative; /* Ensure text is above lines */
    z-index: 1;
    background-color: #fff; /* Cover lines behind text */
    padding: 0 5px; /* Space around text */
    display: inline-block; /* Fit content width */
    margin: 0 auto; /* Center */
}

.title-bar-controls {
    display: flex;
    position: absolute;
    right: 5px;
    top: 2px;
    z-index: 2;
}

.close-box {
    width: 14px;
    height: 14px;
    border: 1px solid #000;
    margin-right: 3px;
    background-color: #fff;
    position: relative; /* For inner square */
}
.close-box::before { /* Inner square */
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 6px;
    height: 6px;
    border: 1px solid #000;
}


.zoom-box {
    width: 14px;
    height: 14px;
    border: 1px solid #000;
    background-color: #fff;
    position: relative;
}
.zoom-box::before, .zoom-box::after { /* Overlapping squares */
    content: '';
    position: absolute;
    border: 1px solid #000;
}
.zoom-box::before { /* Top-left square */
    width: 6px;
    height: 6px;
    top: 2px;
    left: 2px;
}
.zoom-box::after { /* Bottom-right square */
    width: 6px;
    height: 6px;
    top: 4px;
    left: 4px;
    background-color: #fff; /* Cover overlap */
}


/* Status Bar (Below Title Bar) */
.status-bar {
    height: 18px;
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    display: flex;
    justify-content: flex-end; /* Align items to the right */
    gap: 2rem; /* Add spacing between spans */
    align-items: center;
    padding: 0 10px;
    font-size: 11px;
    background-color: #fff; /* Match window */
}

/* Window Content */
.window-content {
    padding: 20px;
    min-height: 150px; /* Ensure some space */
    text-align: center;
}

.icon-container {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 60px; /* Fixed width for alignment */
}

.icon img {
    width: 32px; /* Standard icon size */
    height: 32px;
    margin-bottom: 5px;
    /* Removed placeholder border */
}

.icon span {
    font-size: 11px;
    background-color: #fff; /* Ensure readability over potential background */
    padding: 0 2px;
}

.status-text {
    margin-top: 15px;
    font-size: 14px;
    font-weight: bold;
}

/* Scroll Bars */
.scroll-bar-v, .scroll-bar-h {
    position: absolute;
    background-color: #fff;
    border: 1px solid #000;
}
.scroll-track-v, .scroll-track-h {
    background-color: #e0e0e0; /* Lighter gray track */
     background-image: repeating-linear-gradient(0deg, #b0b0b0 0, #b0b0b0 1px, #e0e0e0 1px, #e0e0e0 2px); /* Dither pattern */
    position: relative;
}
.scroll-thumb-v, .scroll-thumb-h {
    background-color: #fff;
    border: 1px solid #000;
    position: absolute;
}

/* Vertical Scroll Bar */
.scroll-bar-v {
    width: 15px;
    height: calc(100% - 36px); /* Full height minus title/status and bottom bar */
    top: 18px; /* Below title bar */
    right: 0;
    bottom: 15px; /* Above horizontal scrollbar */
}
.scroll-track-v {
    height: calc(100% - 30px); /* Full height minus arrows */
    width: 13px;
    margin: 15px 0;
}
.scroll-thumb-v {
    width: 11px;
    height: 30px; /* Example thumb size */
    left: 0px;
    top: 10px; /* Example position */
}
.scroll-arrow-up, .scroll-arrow-down {
    height: 14px;
    width: 13px;
    border-bottom: 1px solid #000;
    position: absolute;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.scroll-arrow-down {
    border-bottom: none;
    border-top: 1px solid #000;
    bottom: 0;
}
.scroll-arrow-up { top: 0; }

/* Arrow pseudo-elements */
.scroll-arrow-up::before, .scroll-arrow-down::before,
.scroll-arrow-left::before, .scroll-arrow-right::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
}
.scroll-arrow-up::before { /* Triangle pointing up */
    border-width: 0 4px 5px 4px;
    border-color: transparent transparent #000 transparent;
}
.scroll-arrow-down::before { /* Triangle pointing down */
     border-width: 5px 4px 0 4px;
    border-color: #000 transparent transparent transparent;
}


/* Horizontal Scroll Bar */
.scroll-bar-h {
    height: 15px;
    width: calc(100% - 15px); /* Full width minus vertical scrollbar */
    bottom: 0;
    left: 0;
    right: 15px; /* Next to vertical scrollbar */
}
.scroll-track-h {
    width: calc(100% - 30px); /* Full width minus arrows */
    height: 13px;
    margin: 0 15px;
}
.scroll-thumb-h {
    height: 11px;
    width: 40px; /* Example thumb size */
    top: 0px;
    left: 20px; /* Example position */
}
.scroll-arrow-left, .scroll-arrow-right {
    width: 14px;
    height: 13px;
    border-right: 1px solid #000;
    position: absolute;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.scroll-arrow-right {
    border-right: none;
    border-left: 1px solid #000;
    right: 0;
}
.scroll-arrow-left { left: 0; }

.scroll-arrow-left::before { /* Triangle pointing left */
    border-width: 4px 5px 4px 0;
    border-color: transparent #000 transparent transparent;
}
.scroll-arrow-right::before { /* Triangle pointing right */
    border-width: 4px 0 4px 5px;
    border-color: transparent transparent transparent #000;
}

/* Resize Handle */
.resize-handle {
    width: 15px;
    height: 15px;
    background-color: #fff;
    border-left: 1px solid #000;
    border-top: 1px solid #000;
    position: absolute;
    bottom: 0;
    right: 0;
    /* Add inner squares for classic look */
    background-image:
        linear-gradient(to right, black 1px, transparent 1px),
        linear-gradient(to bottom, black 1px, transparent 1px);
    background-size: 5px 5px;
    background-position: bottom 2px right 2px;
    background-repeat: no-repeat;

}
.resize-handle::before { /* Inner square */
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    border: 1px solid #000;
    bottom: 2px;
    right: 2px;
}
