* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Chicago', 'Geneva', 'Helvetica', sans-serif;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./tiled-kitty-wallpaper-from-mac-os-system-7-upscaled-to-v0-uuowrgzqd5va1.webp');
    background-size: auto;
    background-position: center;
    background-repeat: repeat;
    filter: grayscale(100%) contrast(1.1);
    z-index: 0;
}

/* Classic Mac Desktop Background */
#desktop-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Trash Title Bar */
#trash-title {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border: 1px solid #999;
    border-radius: 6px 6px 0 0;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: bold;
    color: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 300px;
    cursor: pointer;
    transition: background 0.2s;
}

#trash-title:hover {
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
}

#trash-title:active {
    background: linear-gradient(to bottom, #d0d0d0 0%, #c0c0c0 100%);
}

.title-text {
    flex: 1;
    text-align: center;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
}

.control.close {
    background: linear-gradient(to bottom, #ff5f57 0%, #ff3b30 100%);
}

.control.minimize {
    background: linear-gradient(to bottom, #ffbd2e 0%, #ff9500 100%);
}

.control.maximize {
    background: linear-gradient(to bottom, #28cd41 0%, #00c918 100%);
}

/* Floating Files (Screenshots) */
#floating-files {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
}

.file-icon {
    position: absolute;
    width: 120px;
    text-align: center;
    cursor: pointer !important;
    pointer-events: all !important;
    transition: transform 0.2s;
    z-index: 100;
}

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

.file-icon img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    background: #fff;
    display: block;
    margin: 0 auto;
}

.file-icon .file-name {
    margin-top: 4px;
    font-size: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.5);
    padding: 2px 4px;
    border-radius: 3px;
    word-wrap: break-word;
}

/* Floating Signifiers */
#floating-signifiers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.floating-signifier {
    position: absolute;
    font-size: 12px;
    color: #fff;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer !important;
    pointer-events: all !important;
    animation: float 4s ease-in-out infinite;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    font-family: 'Geneva', 'Helvetica', sans-serif;
    font-size: 11px;
    z-index: 50;
}

.floating-signifier:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    border-color: #666;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) translateX(0px); 
    }
    25% { 
        transform: translateY(-10px) translateX(5px); 
    }
    50% { 
        transform: translateY(-5px) translateX(-5px); 
    }
    75% { 
        transform: translateY(-15px) translateX(3px); 
    }
}

/* Floating HTML Links */
#floating-html-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
    pointer-events: none;
}

.html-link-icon {
    position: absolute;
    width: 180px;
    text-align: center;
    cursor: pointer !important;
    pointer-events: all !important;
    background: rgba(255,255,255,0.95);
    border: 2px solid #000;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
    transition: all 0.2s;
    z-index: 75;
}

/* Mac-style folded corner */
.html-link-icon::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent #000 transparent transparent;
}

.html-link-icon::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 18px 18px 0;
    border-color: transparent #ccc transparent transparent;
}

.html-link-icon:hover {
    background: #000;
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0,0,0,0.3);
}

.html-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
}

.html-link-icon .link-name {
    font-size: 11px;
    font-weight: bold;
    color: #000;
    margin-bottom: 4px;
    font-family: 'Chicago', 'Geneva', monospace;
}

.html-link-icon:hover .link-name {
    color: #fff;
}

.link-description {
    font-size: 9px;
    font-style: italic;
    color: #666;
    line-height: 1.3;
    margin-top: 4px;
}

.html-link-icon:hover .link-description {
    color: #ccc;
}

/* Schrödinger's Box (Top Left) */
#schrodinger-box {
    position: fixed;
    top: 20px;
    left: 20px;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s, filter 0.3s;
    padding: 15px 20px;
    border-radius: 12px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: box-float 3s ease-in-out infinite;
}

#schrodinger-box:hover {
    transform: scale(1.1) rotate(5deg);
    filter: brightness(1.2);
}

.box-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.box-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-weight: bold;
}

@keyframes box-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

/* Exit Sign (Top Right) */
#exit-sign {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s;
    padding: 15px;
    border-radius: 12px;
    filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 40px rgba(0, 255, 0, 0.4));
    animation: exit-glow 2s ease-in-out infinite;
}

#exit-sign:hover {
    transform: scale(1.1);
}

.exit-sign-image {
    width: 100px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

@keyframes exit-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(0, 255, 0, 0.6)) drop-shadow(0 0 40px rgba(0, 255, 0, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(0, 255, 0, 0.8)) drop-shadow(0 0 60px rgba(0, 255, 0, 0.6));
    }
}

/* Trash Icon */
#trash-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 100px;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.trash-icon-image {
    width: 64px;
    height: 64px;
    background: linear-gradient(to bottom, #e8e8e8 0%, #c0c0c0 100%);
    border: 2px solid #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.3);
}

.trash-icon-label {
    font-size: 11px;
    color: #000;
    background: rgba(255,255,255,0.9);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
    border: 1px solid #000;
}

#trash-icon:hover {
    transform: scale(1.05);
}

#trash-icon:hover .trash-icon-image {
    background: linear-gradient(to bottom, #fff 0%, #d0d0d0 100%);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.4);
}

/* Webcam Container */
#webcam-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 240px;
    height: 180px;
    background: #000;
    border: 2px solid #999;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 50;
    overflow: hidden;
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#close-webcam {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff5f57;
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

/* File Preview Modal (Mac-style) */
#file-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-window {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    max-width: 80%;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-titlebar {
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border-bottom: 1px solid #999;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    flex: 1;
    text-align: center;
}

.modal-content {
    padding: 20px;
    overflow-y: auto;
    max-height: 70vh;
}

#modal-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border: 1px solid #ccc;
}

.restore-prompt {
    text-align: center;
    margin: 20px 0;
}

.restore-prompt p {
    font-size: 14px;
    margin-bottom: 15px;
    color: #333;
}

.restore-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.mac-button {
    background: linear-gradient(to bottom, #f5f5f5 0%, #e0e0e0 100%);
    border: 1px solid #999;
    border-radius: 4px;
    padding: 6px 20px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Geneva', 'Helvetica', sans-serif;
    color: #000;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.mac-button:hover {
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
}

.mac-button:active {
    background: linear-gradient(to bottom, #d0d0d0 0%, #e0e0e0 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.mac-button.cancel {
    background: linear-gradient(to bottom, #fff 0%, #f0f0f0 100%);
}

#modal-concepts {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

#modal-concepts h3 {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
}

#modal-concepts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.concept-tag {
    background: #e8e8e8;
    border: 1px solid #999;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    color: #000;
}

.concept-tag:hover {
    background: #5b9bd5;
    color: #fff;
    border-color: #4a7ba7;
}

/* Text Passage Viewer */
#passage-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.passage-window {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    max-width: 700px;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.passage-titlebar {
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border-bottom: 1px solid #999;
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.passage-title-text {
    font-size: 13px;
    font-weight: bold;
    color: #000;
    flex: 1;
    text-align: center;
}

.passage-content-area {
    padding: 20px;
    overflow-y: auto;
    max-height: 60vh;
}

#passage-lines {
    margin-bottom: 20px;
}

.passage-line {
    margin-bottom: 12px;
    padding: 8px;
    background: #f9f9f9;
    border-left: 3px solid #5b9bd5;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

#related-concepts {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

#related-concepts h3 {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
}

#concepts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Scrollbar styling (Mac-like) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 6px;
    border: 2px solid #f0f0f0;
}

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

/* ASCII Art Icon (Bottom Left) */
#ascii-art-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s, filter 0.3s;
    padding: 15px 20px;
    border-radius: 12px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    animation: ascii-pulse 2s ease-in-out infinite;
}

#ascii-art-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.3);
}

.ascii-icon {
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.ascii-label {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
    font-weight: bold;
}

@keyframes ascii-pulse {
    0%, 100% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
}

/* Schrödinger's Cat Modal */
#schrodinger-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.schrodinger-window {
    background: #d3d3d3;
    border-radius: 0;
    box-shadow: 2px 2px 0 #000, inset 1px 1px 0 #fff;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    border: 2px solid #000;
}

.schrodinger-content {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 40px);
    color: #000;
    line-height: 1.8;
    background: #d3d3d3;
}

.schrodinger-content h2 {
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: left;
    font-weight: bold;
}

.poetic-text {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: left;
    color: #000;
    line-height: 1.6;
}

.poetic-text em {
    font-style: italic;
}

.poetic-text strong {
    font-weight: bold;
}

.poetic-text a {
    color: #0000ff;
    text-decoration: underline;
}

.poetic-text a:hover {
    color: #ff0000;
}

.box-links {
    margin-top: 30px;
    padding: 20px;
    background: #c0c0c0;
    border: 2px inset #fff;
}

.box-links h3 {
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: left;
    font-weight: bold;
}

.dimension-link {
    display: block;
    padding: 10px 20px;
    background: #c0c0c0;
    color: #000;
    text-decoration: none;
    border: 2px outset #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    transition: all 0.1s;
    margin-bottom: 10px;
}

.dimension-link:hover {
    border-style: inset;
    background: #a0a0a0;
}

.link-description {
    margin-top: 5px;
    font-size: 12px;
    color: #000;
    text-align: left;
    font-style: italic;
    font-family: 'Courier New', monospace;
}

/* HTML Popup Modal */
#html-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.html-popup-content {
    width: 90%;
    height: 90%;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 8px 8px 0 rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.html-popup-content .modal-titlebar {
    height: 24px;
    background: #000;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    font-family: 'Chicago', 'Geneva', monospace;
    font-size: 12px;
    font-weight: bold;
}

#html-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}
