/* ========================================
   DREAMER'S EDGE: THE BEDROOM - Styles
   Consolidated from index.html
   ======================================== */

/* ----------------------------------------
   RESET & BASE
   ---------------------------------------- */
* {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
}

/* ----------------------------------------
   CRT EFFECTS
   ---------------------------------------- */
.crt-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a1a1a;
    overflow: hidden;
    overscroll-behavior: none;
}

.crt-screen {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 50%, #0f0f1a 100%);
    overflow: hidden;
}

/* Scanlines */
.crt-screen::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Screen curvature effect */
.crt-screen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 999;
}

/* Glow effect */
.glow {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 40px currentColor;
}

/* ----------------------------------------
   DESKTOP
   ---------------------------------------- */
.desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px;
    display: flex;
    flex-direction: column;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
    overflow: hidden;
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

/* ----------------------------------------
   SANITY METER (Floating)
   ---------------------------------------- */
.sanity-meter {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.sanity-meter-label {
    font-size: 9px;
    color: #888;
    letter-spacing: 1px;
    font-weight: bold;
}

.sanity-meter-bar {
    width: 80px;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

.sanity-meter-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s, background-color 0.3s;
}

.sanity-meter-status {
    font-size: 10px;
    color: #4CAF50;
    font-weight: bold;
    letter-spacing: 1px;
}

/* ----------------------------------------
   TASKBAR
   ---------------------------------------- */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, #c0c0c0 0%, #a0a0a0 100%);
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    padding: 2px 10px;
    z-index: 500;
    transition: opacity 0.5s ease-out;
    opacity: 0;
}

.start-button {
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 8px 15px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    position: relative;
}

.start-button:active {
    border-color: #808080 #fff #fff #808080;
    transform: scale(0.98);
}

.taskbar-divider {
    width: 2px;
    height: 35px;
    background: linear-gradient(90deg, #808080 0%, #fff 50%, #808080 100%);
    margin: 0 8px;
}

.taskbar-time {
    margin-left: auto;
    background: #a0a0a0;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
    padding: 5px 12px;
    font-size: 14px;
    font-weight: bold;
}

/* ----------------------------------------
   START MENU
   ---------------------------------------- */
.start-menu {
    position: fixed;
    bottom: 55px;
    left: 5px;
    width: 220px;
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    display: none;
    z-index: 600;
    padding: 5px;
}

.start-menu.active {
    display: block;
}

.start-menu-header {
    background: linear-gradient(180deg, #000080 0%, #000060 100%);
    color: #fff;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 14px;
    margin: -5px -5px 10px -5px;
    border-bottom: 2px solid #808080;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 13px;
}

.start-menu-item:hover {
    background: linear-gradient(180deg, #000080 0%, #000060 100%);
    color: #fff;
    border: 1px solid #808080;
}

.start-menu-divider {
    height: 2px;
    background: linear-gradient(90deg, #808080 0%, #fff 50%, #808080 100%);
    margin: 8px 5px;
}

.start-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
}

.start-menu-toggle span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    width: 40px;
    height: 20px;
    background: #808080;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    border: 1px solid #fff;
}

.toggle-switch.active {
    background: #00aa00;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    top: 1px;
    left: 2px;
    transition: transform 0.2s;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

.start-menu-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #808080;
    text-align: center;
    font-size: 11px;
    color: #666;
}

/* ----------------------------------------
   DESKTOP ICONS
   ---------------------------------------- */
.desktop-icons {
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    padding-bottom: 60px;
}

.icon {
    z-index: 51;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px 5px;
    border: 2px dotted transparent;
    border-radius: 8px;
}

.icon:hover {
    background: rgba(0, 100, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.icon:active {
    background: rgba(0, 100, 255, 0.4);
    transform: scale(0.95);
}

.icon-img {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 8px;
}

.icon-text {
    color: #fff;
    font-size: 12px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    word-wrap: break-word;
}

/* ----------------------------------------
   WINDOWS (Base)
   ---------------------------------------- */
.window {
    position: fixed;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    display: none;
    z-index: 200;
    max-width: 95vw;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.window.active {
    display: flex;
    flex-direction: column;
}

.window-header {
    background: linear-gradient(180deg, #000080 0%, #000060 100%);
    color: #fff;
    padding: 8px 12px;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.window-close {
    width: 32px;
    height: 32px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.window-close:active {
    border-color: #808080 #fff #fff #808080;
    transform: scale(0.9);
}

.window-content {
    padding: 12px;
    color: #000;
    font-size: 14px;
    overflow: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

/* ----------------------------------------
   AIM WINDOW
   ---------------------------------------- */
.aim-window {
    width: 90vw;
    top: 5vh;
    left: 5vw;
}

.aim-buddy-list {
    height: 40vh;
    overflow-y: auto;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #fff #fff #808080;
}

.aim-buddy {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
}

.aim-buddy:hover {
    background: #e0e0ff;
}

.aim-status {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aim-online { background: #00ff00; }
.aim-away { background: #ffff00; }
.aim-offline { background: #808080; }

/* ----------------------------------------
   EMAIL WINDOW (AOL Style)
   ---------------------------------------- */
.email-window {
    width: calc(100% - 40px);
    max-width: 450px;
    max-height: 85vh;
    top: 5vh;
    left: 20px;
    right: 20px;
    margin: 0 auto;
}

.email-window.active {
    display: flex;
    flex-direction: column;
}

.email-header {
    background: linear-gradient(180deg, #6600cc 0%, #440099 100%);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.email-logo {
    background: #ffcc00;
    color: #6600cc;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 11px;
}

.email-toolbar {
    background: #f0f0f0;
    padding: 8px 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    gap: 8px;
    font-size: 11px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.email-toolbar button {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    border-radius: 3px;
}

.email-toolbar button:active {
    border-color: #808080 #fff #fff #808080;
    transform: scale(0.95);
}

.email-list {
    flex: 1;
    min-height: 200px;
    max-height: 50vh;
    overflow-y: auto;
    background: #fff;
    border: 2px solid #808080;
    border-top: none;
    -webkit-overflow-scrolling: touch;
}

.email-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.email-item:hover {
    background: #e0e0ff;
}

.email-item:active {
    background: #ccccff;
}

.email-item.unread {
    font-weight: bold;
    background: #ffffcc;
}

.email-check {
    width: 18px;
    height: 18px;
    border: 1px solid #999;
    border-radius: 2px;
    flex-shrink: 0;
}

.email-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.email-info {
    flex: 1;
    min-width: 0;
}

/* Consolidated: removed duplicate .email-from/.email-subject/.email-date */
.email-from {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-subject {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-date {
    font-size: 10px;
    color: #999;
    flex-shrink: 0;
}

.email-footer {
    background: #e0e0e0;
    padding: 8px 12px;
    border-top: 1px solid #999;
    font-size: 11px;
    color: #666;
    flex-shrink: 0;
}

/* You've Got Mail popup */
.you-got-mail-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    border: 4px solid #cc6600;
    border-radius: 15px;
    padding: 30px 40px;
    z-index: 3000;
    text-align: center;
    display: none;
    animation: bounce 0.5s ease;
}

.you-got-mail-popup.active {
    display: block;
}

.ygm-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
}

.ygm-close:hover {
    background: rgba(0,0,0,0.4);
}

@keyframes bounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.you-got-mail-popup h2 {
    color: #cc6600;
    font-size: 24px;
    margin: 0 0 10px 0;
    font-family: Arial Black, sans-serif;
}

.you-got-mail-popup p {
    color: #fff;
    font-size: 16px;
    margin: 0;
}

.you-got-mail-popup .envelope {
    font-size: 60px;
    margin-bottom: 10px;
}

/* ----------------------------------------
   JOURNAL WINDOW
   ---------------------------------------- */
.journal-window {
    width: calc(100% - 30px);
    max-width: 600px;
    max-height: 85vh;
    top: 5vh;
    left: 15px;
    right: 15px;
    margin: 0 auto;
    overflow: hidden;
    display: none;
    flex-direction: column;
    z-index: 50;
}

.journal-window.active {
    display: flex;
    flex-direction: column;
}

.journal-header {
    flex-shrink: 0;
    background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    touch-action: manipulation;
}

/* Journal Progress Section */
.journal-progress {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: 15px;
    border-bottom: 2px solid #e94560;
    font-family: "Calibri", "Verdana", sans-serif;
}

.progress-header {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
    letter-spacing: 1px;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    background: linear-gradient(90deg, #e94560 0%, #ff6b6b 50%, #e94560 100%);
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.5);
}

.progress-stats {
    font-size: 12px;
    color: #a0a0a0;
    margin-bottom: 8px;
    text-align: right;
}

.progress-breakdown {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    font-size: 10px;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.progress-item.complete {
    color: #4ade80;
}

.progress-item.incomplete {
    color: #666;
}

.progress-item .check {
    width: 12px;
    text-align: center;
}

.journal-content {
    flex: 1;
    min-height: 200px;
    height: calc(100% - 45px);
    max-height: 60vh;
    background: linear-gradient(135deg, #fffef0 0%, #faf5e6 100%);
    border-left: 3px solid #8b4513;
    border-right: 3px solid #8b4513;
    border-bottom: 3px solid #8b4513;
    border-radius: 0 0 8px 8px;
    padding: 15px;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    font-family: "Calibri", "Verdana", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #2c2c2c;
    scrollbar-width: thin;
    scrollbar-color: #8b4513 transparent;
}

.journal-content::-webkit-scrollbar {
    width: 12px;
}

.journal-content::-webkit-scrollbar-track {
    background: #f0e6d6;
    border-left: 1px solid #8b4513;
}

.journal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b4513 0%, #654321 100%);
    border: 1px solid #fff;
    border-radius: 6px;
}

.journal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a0522d 0%, #8b4513 100%);
}

.journal-content::-webkit-scrollbar-corner {
    background: #f0e6d6;
}

.journal-entry {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px dashed rgba(139, 69, 19, 0.3);
}

.journal-date {
    color: #8b0000;
    font-size: 14px;
    font-weight: bold;
    font-family: "Arial Black", sans-serif;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.journal-text {
    white-space: pre-wrap;
}

/* Journal text decorations */
.highlight-red { background: linear-gradient(180deg, transparent 60%, rgba(255, 0, 0, 0.3) 60%); font-weight: bold; }
.highlight-yellow { background: linear-gradient(180deg, transparent 60%, rgba(255, 255, 0, 0.4) 60%); }
.highlight-blue { background: linear-gradient(180deg, transparent 60%, rgba(0, 191, 255, 0.3) 60%); }
.highlight-green { background: linear-gradient(180deg, transparent 60%, rgba(144, 238, 144, 0.4) 60%); }
.highlight-pink { background: linear-gradient(180deg, transparent 60%, rgba(255, 182, 193, 0.4) 60%); }

.underline-single { border-bottom: 2px solid #333; display: inline; }
.underline-double { border-bottom: 4px double #333; display: inline; }
.underline-wavy { border-bottom: 3px wavy #ff4500; display: inline; }
.underline-red { border-bottom: 2px solid #ff0000; display: inline; color: #8b0000; }
.underline-green { border-bottom: 2px solid #228b22; display: inline; }

.strike { text-decoration: line-through; opacity: 0.6; }

.emphasis-bold { font-weight: bold; }
.emphasis-italic { font-style: italic; font-family: "Brush Script MT", cursive; }
.emphasis-caps { text-transform: uppercase; letter-spacing: 2px; }

/* Doodles and decorations */
.doodle-container { margin: 15px 0; padding: 10px; text-align: center; }
.doodle-text { font-size: 14px; color: #666; font-style: italic; font-family: "Comic Sans MS", cursive; }
.doodle-rainbow {
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    font-size: 18px;
}
.doodle-sparkle { color: #ffd700; text-shadow: 0 0 5px #ffd700; }
.doodle-heart { color: #ff69b4; }
.doodle-music { font-size: 20px; }

/* Sticky notes */
.sticky-note { background: #ffeb3b; padding: 15px; border-radius: 2px; box-shadow: 2px 2px 8px rgba(0,0,0,0.2); transform: rotate(-1deg); margin: 10px 0; font-family: "Comic Sans MS", cursive; }
.sticky-note-pink { background: #ffb6c1; transform: rotate(1deg); }
.sticky-note-blue { background: #add8e6; transform: rotate(-2deg); }
.sticky-note-green { background: #98fb98; transform: rotate(1deg); }

/* Margin notes */
.margin-note { position: relative; font-size: 12px; color: #666; font-style: italic; padding-left: 20px; border-left: 2px solid #ccc; }
.margin-note-red { color: #8b0000; border-left-color: #ff0000; }
.margin-note-blue { color: #0000ff; border-left-color: #0000ff; }
.margin-note-green { color: #228b22; border-left-color: #228b22; }
.margin-note-pencil { color: #4a4a4a; font-family: "Brush Script MT", cursive; }

/* Emojis */
.emoji-rain { font-size: 18px; }
.emoji-music { font-size: 20px; }
.emoji-heart { color: #ff1493; }

/* Text sizes */
.text-small { font-size: 12px; }
.text-large { font-size: 20px; }
.text-tiny { font-size: 10px; color: #999; }

/* Handwriting variations */
.handwriting-neat { font-family: "Segoe Print", "Bradley Hand", cursive; }
.handwriting-rushed { font-family: "Comic Sans MS", cursive; letter-spacing: -1px; }
.handwriting-shaky { font-family: "Brush Script MT", cursive; }

/* Drawn boxes */
.drawn-box { border: 2px solid #333; padding: 15px; margin: 15px 0; border-radius: 4px; }
.drawn-box-dashed { border: 2px dashed #999; padding: 15px; margin: 15px 0; }
.drawn-box-dotted { border: 3px dotted #666; padding: 15px; margin: 15px 0; }

/* Chapter headers */
.chapter-header { font-size: 24px; font-family: "Impact", sans-serif; color: #4a0080; text-align: center; margin: 20px 0; text-shadow: 2px 2px 0px rgba(74, 0, 128, 0.2); }

/* Quote style */
.quote-style { font-style: italic; border-left: 4px solid #6600cc; padding-left: 15px; margin: 10px 0; color: #555; }

/* ----------------------------------------
   SOLITAIRE WINDOW
   ---------------------------------------- */
.solitaire-window {
    width: 450px !important;
    background: linear-gradient(180deg, #1a5c1a 0%, #0d3d0d 100%);
    border: 2px solid;
    border-color: #2a8a2a #0a2a0a #0a2a0a #2a8a2a;
    top: 5vh;
    left: 5vw;
}

.solitaire-window .window-header {
    background: linear-gradient(180deg, #2a6a2a 0%, #1a4a1a 100%);
}

.solitaire-area {
    height: 350px;
    position: relative;
    background: linear-gradient(180deg, #1a5c1a 0%, #0d3d0d 100%);
    border: 1px solid #2a8a2a;
    touch-action: manipulation;
}

.card {
    position: absolute;
    width: 45px;
    height: 65px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.1s, box-shadow 0.1s;
}

.card:hover {
    transform: translateY(-2px);
}

.card:active {
    transform: scale(0.95);
}

.card.red { color: #cc0000; }
.card.black { color: #000; }

.card.back {
    background: linear-gradient(135deg, #1a3a6a 0%, #0a2040 100%) !important;
    border: 2px solid #3a6aaa;
}

.card.back:hover {
    background: linear-gradient(135deg, #2a4a7a 0%, #1a3050 100%) !important;
}

/* ----------------------------------------
   BROWSER WINDOW (Netscape Navigator)
   ---------------------------------------- */
.browser-window {
    width: 95vw;
    max-width: 500px;
    top: 5vh;
    left: 2.5vw;
    background: #c0c0c0;
}

.browser-window.active {
    background: #c0c0c0;
}

.browser-toolbar {
    background: linear-gradient(180deg, #dddddd 0%, #bbbbbb 100%);
    padding: 6px 8px;
    border-bottom: 1px solid #888;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.browser-btn {
    background: linear-gradient(180deg, #eeeeee 0%, #cccccc 100%);
    border: 1px solid;
    border-color: #ffffff #666666 #666666 #ffffff;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 50px;
    justify-content: center;
}

.browser-btn:hover {
    background: linear-gradient(180deg, #ffffff 0%, #dddddd 100%);
}

.browser-btn:active {
    border-color: #666666 #ffffff #ffffff #666666;
    background: linear-gradient(180deg, #cccccc 0%, #eeeeee 100%);
}

.browser-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.browser-separator {
    width: 2px;
    height: 20px;
    background: linear-gradient(90deg, #888888 0%, #ffffff 50%, #888888 100%);
    margin: 0 6px;
}

.browser-url-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    background: #fff;
    border: 1px solid #888;
    padding: 2px 6px;
    flex: 1;
    min-width: 0;
}

.browser-url-label {
    font-size: 11px;
    color: #666;
    font-weight: bold;
    white-space: nowrap;
}

.browser-url-bar input {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    font-size: 11px;
    border: none;
    outline: none;
    font-family: Arial, sans-serif;
    max-width: 100%;
}

.browser-go-btn {
    background: #dddddd;
    border: 1px solid;
    border-color: #ffffff #666666 #666666 #ffffff;
    padding: 2px 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.browser-go-btn:active {
    border-color: #666666 #ffffff #ffffff #666666;
}

.browser-content {
    background: #fff;
    padding: 0;
    height: calc(100% - 80px);
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #808080;
    border-top: none;
    font-family: Arial, Helvetica, sans-serif;
    -webkit-overflow-scrolling: touch;
}

.browser-status {
    background: #c0c0c0;
    padding: 4px 8px;
    font-size: 11px;
    color: #333;
    border-top: 1px solid #888;
    display: flex;
    justify-content: space-between;
}

/* ----------------------------------------
   CHAT WINDOW
   ---------------------------------------- */
.chat-window {
    width: 320px;
    height: 420px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
    background: #fff;
    z-index: 300;
    display: none;
    flex-direction: column;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: linear-gradient(180deg, #5a7dc8 0%, #3d5a96 100%);
    color: #fff;
    flex-shrink: 0;
    height: 44px;
    box-sizing: border-box;
}

.chat-buddy-icon {
    width: 32px;
    height: 32px;
    background: #ffcc00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.chat-buddy-info {
    flex: 1;
}

.chat-buddy-name {
    font-weight: bold;
    font-size: 14px;
}

.chat-buddy-status {
    font-size: 11px;
    opacity: 0.9;
}

.sanity-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 2px 6px;
    border-radius: 10px;
}

.sanity-indicator span {
    font-size: 12px;
}

.sanity-bar-bg {
    width: 50px;
    height: 6px;
    background: rgba(0,0,0,0.4);
    border-radius: 3px;
    overflow: hidden;
}

.sanity-bar {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s, background-color 0.3s;
}

.chat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    max-height: calc(100% - 44px);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    padding: 10px;
    font-size: 13px;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
    min-height: 0;
}

/* AI Status indicator in chat header */
.chat-ai-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}
.chat-ai-status.online {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}
.chat-ai-status.offline {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}
.ai-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.ai-online-dot {
    background: #4CAF50;
    box-shadow: 0 0 4px #4CAF50;
    animation: ai-pulse 2s infinite;
}
.ai-offline-dot {
    background: #f44336;
}
@keyframes ai-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Message remaining counter */
.chat-msg-remaining {
    font-size: 9px;
    color: #888;
    white-space: nowrap;
    padding: 0 4px;
}

/* Typing indicator (bouncing dots) */
.chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    background: #e8e8e8;
    border-radius: 12px;
    margin: 4px 0;
}
.typing-dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ============================================
   AIM BUDDY LIST - Idle & Status States
   ============================================ */

/* Idle (yellow) status dot */
.aim-status.aim-idle {
    background: #FF9800;
    box-shadow: 0 0 3px #FF9800;
}

/* Buddy flash animation (when unprompted message arrives) */
.aim-buddy-flash {
    animation: buddy-flash 0.5s ease-in-out 3;
    background: rgba(255, 200, 0, 0.15);
}
@keyframes buddy-flash {
    0%, 100% { background: transparent; }
    50% { background: rgba(255, 200, 0, 0.3); }
}

/* Buddy hover shows status text via title */
.aim-buddy[title]:hover::after {
    content: attr(title);
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    color: #888;
    white-space: nowrap;
    pointer-events: none;
}
.aim-buddy { position: relative; }

/* ============================================
   UNPROMPTED IM NOTIFICATION TOAST
   ============================================ */

.aim-notification {
    position: absolute;
    bottom: 50px;
    right: 10px;
    background: #ffffcc;
    border: 2px solid #808080;
    border-color: #fff #808080 #808080 #fff;
    padding: 8px 12px;
    max-width: 250px;
    z-index: 9999;
    cursor: pointer;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: notif-slide-in 0.3s ease-out;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}
.aim-notification:hover {
    background: #ffff99;
}
.aim-notif-header {
    font-weight: bold;
    font-size: 11px;
    color: #006;
    margin-bottom: 4px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 3px;
}
.aim-notif-msg {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
}
.aim-notif-fadeout {
    animation: notif-fade-out 0.5s ease-out forwards;
}
@keyframes notif-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes notif-fade-out {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(10px); }
}

/* ============================================
   SYSTEM MESSAGES in chat (signed off, away)
   ============================================ */

.chat-message.system .chat-msg-bubble {
    background: transparent;
    color: #888;
    font-style: italic;
    font-size: 11px;
    text-align: center;
    padding: 4px 8px;
}
.chat-message.system {
    display: flex;
    justify-content: center;
    margin: 4px 0;
}

/* ============================================
   DYNAMIC EMAIL - New arrival animation
   ============================================ */

/* Chat links - clickable URLs in buddy messages */
.chat-link {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
.chat-link:hover {
    color: #0099ff;
    background: rgba(0, 102, 204, 0.1);
    border-radius: 2px;
}

/* Dynamic journal entries */
.journal-dynamic-entry {
    padding: 12px 15px;
    margin: 8px 0;
    background: rgba(138, 43, 226, 0.08);
    border-left: 3px solid #8a2be2;
    border-radius: 0 4px 4px 0;
    font-style: italic;
    animation: journal-appear 0.5s ease-out;
}
.journal-dynamic-entry .journal-dynamic-time {
    font-size: 10px;
    color: #888;
    margin-bottom: 4px;
}
.journal-dynamic-entry .journal-dynamic-text {
    color: #5a3a7a;
    line-height: 1.5;
}
@keyframes journal-appear {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Journal new entry indicator */
.journal-new-badge {
    display: inline-block;
    background: #ff6600;
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.email-new-arrival {
    animation: email-arrive 0.6s ease-out;
    border-left: 3px solid #ff6600;
}
@keyframes email-arrive {
    from { transform: translateX(-20px); opacity: 0; background: #ffffcc; }
    to { transform: translateX(0); opacity: 1; }
}

/* Consolidated: removed duplicate .chat-input-area */
.chat-input-area {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px;
    background: #e0e0e0;
    border-top: 1px solid #c0c0c0;
    height: 50px;
    box-sizing: border-box;
}

.chat-input-area input {
    flex: 1;
    padding: 8px 10px;
    font-size: 14px;
    border: 2px solid #808080;
    border-radius: 4px;
}

.chat-input-area input:focus {
    outline: none;
    border-color: #5a7dc8;
}

.chat-input-area button {
    padding: 8px 15px;
    background: linear-gradient(180deg, #5a7dc8 0%, #3d5a96 100%);
    border: 2px solid;
    border-color: #fff #2c4a8a #2c4a8a #fff;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
}

.chat-input-area button:active {
    border-color: #2c4a8a #fff #fff #2c4a8a;
}

/* Chat message styles */
.chat-message {
    margin-bottom: 10px;
    max-width: 85%;
}

.chat-message.buddy {
    margin-right: auto;
}

.chat-message.you {
    margin-left: auto;
    text-align: right;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 15px;
    display: inline-block;
    max-width: 100%;
    word-wrap: break-word;
}

.chat-message.buddy .chat-msg-bubble {
    background: #e8e8e8;
    border-bottom-left-radius: 3px;
}

.chat-message.you .chat-msg-bubble {
    background: #5a7dc8;
    color: #fff;
    border-bottom-right-radius: 3px;
}

.chat-msg-time {
    font-size: 10px;
    color: #888;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-message.you .chat-msg-time {
    text-align: right;
}

/* ----------------------------------------
   TERMINAL WINDOW
   ---------------------------------------- */
.terminal-window {
    width: 700px;
    height: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border: 2px solid #404040;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.terminal-window.active {
    display: flex;
    flex-direction: column;
}

.terminal-window .window-header {
    background: linear-gradient(180deg, #404040 0%, #303030 100%);
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 6px 10px;
    flex-shrink: 0;
}

.terminal-content {
    flex: 1;
    background: #0c0c0c;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.4;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.terminal-line {
    margin-bottom: 2px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-prompt { color: #00ff00; }
.terminal-command { color: #ffffff; }
.terminal-output { color: #88ff88; }
.terminal-error { color: #ff4444; }
.terminal-ascii { color: #00ffff; font-size: 12px; line-height: 1.1; }

.terminal-input-line {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 40px;
    box-sizing: border-box;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    outline: none;
    caret-color: #00ff00;
}

/* ----------------------------------------
   NES EMULATOR WINDOW
   ---------------------------------------- */
.nes-window {
    width: 90vw;
    max-width: 600px;
    height: auto;
    top: 20vh;
    left: 5vw;
    background: #000;
    z-index: 600;
}

.nes-content { background: #111; padding: 0; }

.nes-screen {
    background: #000;
    border: 2px solid #333;
    margin: 10px;
    padding: 40px 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.nes-message {
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    text-shadow: 0 0 10px #00ff00;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

.nes-controls { background: #222; padding: 10px; border-top: 1px solid #444; }
.nes-menu { display: flex; gap: 20px; margin-bottom: 10px; }
.nes-menu-item { color: #aaa; font-size: 12px; cursor: pointer; }
.nes-menu-item:hover { color: #fff; }
.nes-status { color: #666; font-size: 10px; font-family: monospace; }

/* ROM Selection Window */
.rom-window {
    width: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    z-index: 601;
}

.rom-content { padding: 10px; background: #111; }
.rom-list { background: #000; border: 1px solid #333; }

.rom-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    transition: background 0.2s;
}

.rom-item:hover { background: #1a1a3a; }
.rom-item:last-child { border-bottom: none; }
.rom-icon { margin-right: 15px; }
.rom-name { flex: 1; color: #00ff00; font-family: monospace; }
.rom-size { color: #666; font-size: 12px; }

/* OOBE Game Window */
.oobe-window {
    width: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    z-index: 700;
    display: none;
}

.oobe-window.active { display: flex; }
.oobe-content { background: #000; padding: 0; }

.oobe-screen {
    background: #000;
    padding: 40px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.oobe-title { color: #00ffff; font-size: 24px; text-shadow: 0 0 10px #00ffff; margin-bottom: 10px; animation: pulse 2s infinite; }
.oobe-subtitle { color: #ff00ff; font-size: 16px; margin-bottom: 40px; text-shadow: 0 0 10px #ff00ff; }
.oobe-press { color: #ffff00; font-size: 20px; animation: blink 0.5s infinite; margin-bottom: 40px; }
.oobe-credit { color: #666; font-size: 12px; }

/* SUPER M. Game Window */
.superm-window {
    width: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #5c94fc;
    z-index: 700;
    display: none;
}

.superm-window.active { display: flex; }
.superm-content { background: #5c94fc; padding: 0; }

.superm-screen {
    background: #5c94fc;
    padding: 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    position: relative;
    height: 200px;
    overflow: hidden;
}

.superm-title { color: #fff; font-size: 28px; text-shadow: 2px 2px #000; font-weight: bold; }
.superm-world { color: #fff; font-size: 14px; margin: 10px 0; text-shadow: 1px 1px #000; }
.superm-ground { position: absolute; bottom: 20px; left: 0; right: 0; color: #c84c0c; font-size: 20px; letter-spacing: 5px; }
.superm-mario { position: absolute; bottom: 40px; left: 50px; font-size: 30px; }
.superm-cloud { position: absolute; top: 30px; right: 80px; font-size: 24px; }
.superm-enemy { position: absolute; bottom: 40px; right: 100px; font-size: 24px; }
.superm-hud { background: #000; color: #fff; padding: 5px 10px; display: flex; justify-content: space-between; font-family: monospace; font-size: 12px; }

/* MARIO BROS. Game Window */
.mario-window {
    width: 600px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    z-index: 700;
    display: none;
}

.mario-window.active { display: flex; }
.mario-content { background: #000; padding: 0; }

.mario-screen { background: #000; padding: 50px 20px; text-align: center; font-family: 'Courier New', monospace; }
.mario-title { color: #ff0000; font-size: 36px; text-shadow: 0 0 10px #ff0000; font-weight: bold; margin-bottom: 5px; }
.mario-subtitle { color: #ffff00; font-size: 18px; margin-bottom: 50px; }
.mario-press { color: #00ff00; font-size: 20px; animation: blink 0.5s infinite; margin-bottom: 30px; }
.mario-controls { color: #666; font-size: 10px; letter-spacing: 2px; }

/* ----------------------------------------
   WINAMP WINDOW
   ---------------------------------------- */
.winamp-window {
    width: 275px !important;
    background: linear-gradient(180deg, #e0e0e0 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    top: 15vh;
    left: 10vw;
}

.winamp-content {
    padding: 3px;
    overflow-y: auto;
    max-height: 65vh;
}

.winamp-main {
    background: linear-gradient(180deg, #4a4a6a 0%, #2a2a4a 100%);
    border: 1px solid #666;
    padding: 5px;
}

.winamp-title-bar {
    background: linear-gradient(180deg, #333366 0%, #222244 100%);
    padding: 2px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.winamp-logo { color: #00ff00; font-family: Arial, sans-serif; font-size: 10px; font-weight: bold; text-shadow: 1px 1px 2px #000; }
.winamp-minimize { color: #fff; cursor: pointer; font-size: 12px; }

.winamp-visualizer { background: #000; border: 1px solid #333; margin-bottom: 5px; }
.winamp-visualizer canvas { width: 100%; height: 45px; }

.winamp-track-info { background: #000; border: 1px solid #333; padding: 3px; margin-bottom: 5px; }
.winamp-track-name { color: #00ff00; font-family: Arial, sans-serif; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winamp-track-time { color: #ffff00; font-family: Arial, sans-serif; font-size: 10px; text-align: right; }

.winamp-progress { background: #000; border: 1px solid #333; height: 12px; margin-bottom: 5px; cursor: pointer; }
.winamp-progress-fill { background: linear-gradient(180deg, #00ff00 0%, #00aa00 100%); height: 100%; width: 0%; transition: width 0.1s; }

.winamp-controls { display: flex; justify-content: center; gap: 3px; margin-bottom: 5px; }

.winamp-btn {
    background: linear-gradient(180deg, #666 0%, #444 100%);
    border: 1px solid #333;
    color: #fff;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    min-width: 36px;
}

.winamp-btn:active { background: linear-gradient(180deg, #444 0%, #666 100%); }

.winamp-volume { display: flex; align-items: center; gap: 5px; color: #fff; }
.winamp-volume input[type="range"] { flex: 1; height: 15px; }

.winamp-playlist { background: #e0e0e0; border: 1px solid #666; margin-top: 5px; max-height: 200px; overflow: hidden; }
.winamp-playlist.collapsed { max-height: 25px; }

.winamp-playlist-header { background: linear-gradient(180deg, #c0c0c0 0%, #a0a0a0 100%); padding: 3px 5px; display: flex; justify-content: space-between; align-items: center; font-size: 11px; cursor: pointer; }
.winamp-playlist-toggle { background: none; border: none; cursor: pointer; font-size: 10px; }

.winamp-playlist-items { background: #fff; max-height: 175px; overflow-y: auto; }
.winamp-playlist-item { padding: 4px 8px; font-size: 11px; cursor: pointer; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 5px; }
.winamp-playlist-item:hover { background: #e0e0ff; }
.winamp-playlist-item.playing { background: #ccccff; color: #000; }
.winamp-playlist-item .track-num { color: #666; font-size: 10px; width: 20px; }
.winamp-playlist-item .track-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winamp-playlist-item .track-time { color: #666; font-size: 10px; }

.winamp-display { text-align: center; padding: 20px; }
.winamp-icon { font-size: 64px; margin-bottom: 15px; }
.winamp-track { font-size: 18px; margin-bottom: 20px; }

/* ----------------------------------------
   SCREENSAVER - After Dark Flying Toasters
   ---------------------------------------- */
.screen-saver {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    z-index: 1500;
    overflow: hidden;
    cursor: pointer;
}

.screen-saver.active { display: block; }

/* Toaster container — flies diagonally upper-right to lower-left */
.ft-toaster {
    position: absolute;
    width: 64px;
    height: 52px;
    top: calc(var(--row) * 14%);
    animation: ftFly var(--speed, 12s) linear var(--delay, 0s) infinite;
}

/* Diagonal flight: top-right → bottom-left */
@keyframes ftFly {
    0% { left: calc(100% + 80px); top: calc(var(--row) * 14% - 10%); }
    100% { left: -120px; top: calc(var(--row) * 14% + 60%); }
}

/* Chrome toaster body */
.ft-body {
    position: absolute;
    bottom: 0;
    left: 8px;
    width: 48px;
    height: 36px;
    background: linear-gradient(135deg, #d0d0d0 0%, #a0a0a0 30%, #e8e8e8 50%, #909090 70%, #c0c0c0 100%);
    border-radius: 6px 6px 4px 4px;
    border: 1px solid #666;
    box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Toaster slot on top */
.ft-slot {
    position: absolute;
    bottom: 30px;
    left: 18px;
    width: 28px;
    height: 6px;
    background: #222;
    border-radius: 2px;
    border: 1px solid #555;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Toast popping out of slot */
.ft-toast-pop {
    position: absolute;
    bottom: 34px;
    left: 20px;
    width: 24px;
    height: 18px;
    background: linear-gradient(180deg, #c8a050 0%, #e8c878 40%, #d4a848 100%);
    border-radius: 3px 3px 1px 1px;
    border: 1px solid #a08030;
    animation: ftToastBob 2s ease-in-out infinite;
}

@keyframes ftToastBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Angel wings */
.ft-wing {
    position: absolute;
    bottom: 24px;
    width: 26px;
    height: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(220, 220, 240, 0.85) 100%);
    border-radius: 50% 50% 20% 20%;
    animation: ftFlap 0.4s ease-in-out infinite alternate;
    transform-origin: bottom center;
}

.ft-wing-l {
    left: -14px;
    border-radius: 50% 30% 10% 40%;
    animation-name: ftFlapL;
}

.ft-wing-r {
    right: -14px;
    border-radius: 30% 50% 40% 10%;
    animation-name: ftFlapR;
}

/* Feather detail on wings */
.ft-wing::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 80%;
    height: 2px;
    background: rgba(200, 200, 220, 0.6);
    border-radius: 1px;
}

.ft-wing-l::before { left: 4px; }
.ft-wing-r::before { right: 4px; }

.ft-wing::after {
    content: '';
    position: absolute;
    top: 10px;
    width: 60%;
    height: 1px;
    background: rgba(200, 200, 220, 0.4);
}

.ft-wing-l::after { left: 6px; }
.ft-wing-r::after { right: 6px; }

/* Wing flapping animations */
@keyframes ftFlapL {
    0% { transform: rotate(25deg) scaleY(1); }
    100% { transform: rotate(-15deg) scaleY(0.8); }
}

@keyframes ftFlapR {
    0% { transform: rotate(-25deg) scaleY(1); }
    100% { transform: rotate(15deg) scaleY(0.8); }
}

/* Loose toast slices — no toaster, just floating diagonally */
.ft-loose-toast {
    position: absolute;
    width: 22px;
    height: 26px;
    background: linear-gradient(180deg, #c8a050 0%, #e8c878 30%, #d4a848 60%, #b89040 100%);
    border-radius: 3px;
    border: 1px solid #a08030;
    top: calc(var(--trow) * 14%);
    animation: ftFlyToast var(--tspeed, 16s) linear var(--tdelay, 0s) infinite;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Burnt spots on toast */
.ft-loose-toast::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 5px;
    width: 12px;
    height: 8px;
    background: rgba(139, 90, 30, 0.4);
    border-radius: 50%;
}

.ft-loose-toast::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 8px;
    width: 8px;
    height: 5px;
    background: rgba(139, 90, 30, 0.3);
    border-radius: 50%;
}

@keyframes ftFlyToast {
    0% { left: calc(100% + 40px); top: calc(var(--trow) * 14% - 5%); transform: rotate(0deg); }
    100% { left: -60px; top: calc(var(--trow) * 14% + 50%); transform: rotate(-30deg); }
}

/* ----------------------------------------
   GLITCH & RAIN EFFECTS
   ---------------------------------------- */
.glitch { animation: glitch 0.5s infinite; }

@keyframes glitch {
    0% { filter: hue-rotate(0deg); }
    25% { filter: hue-rotate(90deg); }
    50% { filter: hue-rotate(180deg); }
    75% { filter: hue-rotate(270deg); }
    100% { filter: hue-rotate(360deg); }
}

.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><line x1="10" y1="0" x2="10" y2="30" stroke="%23000" stroke-width="0.5"/></svg');
    animation: rain 0.3s linear infinite;
}

@keyframes rain {
    0% { background-position: 0 0; }
    100% { background-position: 20px 100px; }
}

/* ----------------------------------------
   PROGRESS MODAL
   ---------------------------------------- */
.progress-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.progress-modal.active { display: flex; }

.progress-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #e94560;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(233, 69, 96, 0.3);
}

.progress-modal-header {
    background: linear-gradient(180deg, #e94560 0%, #c73e54 100%);
    color: #fff;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.progress-modal-body {
    padding: 15px;
    color: #fff;
    max-height: 60vh;
    overflow-y: auto;
}

.progress-section {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.progress-section-title {
    font-size: 12px;
    color: #e94560;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-item-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
    font-size: 12px;
}

.progress-item-row .check { width: 18px; color: #4ade80; }
.progress-item-row .check.pending { color: #666; }
.progress-item-row .name { flex: 1; }

/* ----------------------------------------
   SHUTDOWN OVERLAY
   ---------------------------------------- */
.shutdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: none;
    z-index: 5000;
    overflow: hidden;
}

.shutdown-overlay.active { display: block; }

.shutdown-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, #000 150%);
    animation: vignettePulse 2s ease-in-out infinite;
}

@keyframes vignettePulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.shutdown-spiral {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid rgba(138, 43, 226, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spiralExpand 4s ease-out forwards;
}

@keyframes spiralExpand {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 300vmax; height: 300vmax; opacity: 0; border-width: 50px; }
}

.shutdown-particles { position: absolute; width: 100%; height: 100%; overflow: hidden; }

.shutdown-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: floatAway 3s ease-out forwards;
}

@keyframes floatAway {
    0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(720deg); }
}

.shutdown-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 5001;
}

.shutdown-text {
    color: #fff;
    font-family: "Calibri", Arial, sans-serif;
    font-size: clamp(24px, 6vw, 48px);
    text-align: center;
    opacity: 0;
    text-shadow: 0 0 20px rgba(138, 43, 226, 0.8), 0 0 40px rgba(138, 43, 226, 0.4);
    animation: textFadeIn 1s ease-out 1s forwards;
}

@keyframes textFadeIn {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.shutdown-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-family: "Calibri", Arial, sans-serif;
    font-size: clamp(14px, 3vw, 20px);
    margin-top: 20px;
    opacity: 0;
    animation: textFadeIn 1s ease-out 2s forwards;
}

.shutdown-breath {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 30px;
    opacity: 0;
    animation: textFadeIn 1s ease-out 3s forwards;
}

.breath-dot {
    width: 20px;
    height: 20px;
    background: rgba(138, 43, 226, 0.6);
    border-radius: 50%;
    animation: breathPulse 4s ease-in-out infinite;
}

.breath-dot:nth-child(2) { animation-delay: 0.3s; }
.breath-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes breathPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.5); opacity: 1; }
}

.shutdown-fadeout {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0;
    animation: fadeToBlack 2s ease-in 6s forwards;
}

@keyframes fadeToBlack {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.shutdown-return {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: "Calibri", Arial, sans-serif;
    font-size: clamp(18px, 4vw, 32px);
    text-align: center;
    opacity: 0;
    animation: returnFadeIn 1s ease-out 8s forwards;
}

@keyframes returnFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ----------------------------------------
   DREAM SEQUENCE
   ---------------------------------------- */
.dream-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 25%, #0a1a2e 50%, #1a0a2e 75%, #0a0a1a 100%);
    opacity: 0;
    visibility: hidden;
    z-index: 5000;
    overflow: hidden;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

.dream-sequence.active { opacity: 1; visibility: visible; }

.intro-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 20%, #000 150%);
    z-index: 5001;
}

.intro-spiral {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: transparent;
    border: 2px solid rgba(138, 43, 226, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: introSpiralExpand 4s ease-out forwards;
    z-index: 5002;
}

@keyframes introSpiralExpand {
    0% { width: 10px; height: 10px; opacity: 1; }
    100% { width: 300vmax; height: 300vmax; opacity: 0; border-width: 50px; }
}

/* Click Gate - "Click to Begin" overlay */
#intro-gate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5050;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.8s ease;
}

#intro-gate.hidden {
    opacity: 0;
    pointer-events: none;
}

.gate-title {
    font-family: "Georgia", serif;
    font-size: clamp(32px, 7vw, 64px);
    font-style: italic;
    color: #fff;
    text-shadow: 0 0 30px rgba(138, 43, 226, 0.8), 0 0 60px rgba(138, 43, 226, 0.4);
    letter-spacing: 3px;
    margin-bottom: 20px;
    opacity: 0;
    animation: gateFadeIn 2s ease-out 0.5s forwards;
}

.gate-subtitle {
    font-family: "Georgia", serif;
    font-size: clamp(14px, 2.5vw, 20px);
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 60px;
    opacity: 0;
    animation: gateFadeIn 2s ease-out 1.5s forwards;
}

.gate-prompt {
    font-family: "Calibri", Arial, sans-serif;
    font-size: clamp(14px, 2.5vw, 18px);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    opacity: 0;
    animation: gateFadeIn 1.5s ease-out 2.5s forwards, gatePulse 3s ease-in-out 4s infinite;
}

@keyframes gateFadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes gatePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Unified Skip Button */
#intro-skip-btn {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 24px;
    font-family: "Calibri", Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 5200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

#intro-skip-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

#intro-skip-btn:hover {
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Video Loading Spinner */
#intro-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border: 3px solid rgba(138, 43, 226, 0.3);
    border-top-color: rgba(138, 43, 226, 0.9);
    border-radius: 50%;
    z-index: 5150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    animation: loaderSpin 1s linear infinite;
}

#intro-loader.visible { opacity: 1; }

@keyframes loaderSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video Cutscene */
.intro-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 5100;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

.intro-video.visible {
    opacity: 1;
}

/* Credits Animation */
@keyframes creditsScroll {
    0% { transform: translateY(100vh); }
    100% { transform: translateY(-100%); }
}

#credits-scroll { animation: creditsScroll 60s linear forwards; }

/* Nebula */
.nebula {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(0, 191, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 20, 147, 0.15) 0%, transparent 60%);
    animation: nebulaFloat 30s ease-in-out infinite;
}

@keyframes nebulaFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-2%, 2%) rotate(1deg); }
    50% { transform: translate(0, 4%) rotate(0deg); }
    75% { transform: translate(2%, 2%) rotate(-1deg); }
}

/* Stars */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #fff, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 160px 120px, #fff, transparent),
        radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 250px 160px, #fff, transparent),
        radial-gradient(2px 2px at 300px 100px, rgba(255,255,255,0.5), transparent);
    animation: twinkle 4s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Dream Particles */
.dream-particles { position: absolute; width: 100%; height: 100%; overflow: hidden; }

.dream-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.8; }
    25% { transform: translateY(-100px) translateX(50px) scale(1.2); opacity: 1; }
    50% { transform: translateY(-200px) translateX(-30px) scale(0.8); opacity: 0.6; }
    75% { transform: translateY(-150px) translateX(40px) scale(1.1); opacity: 0.9; }
}

/* Dream Door */
.dream-door {
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 200px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    border: 3px solid rgba(138, 43, 226, 0.5);
    border-radius: 60px 60px 0 0;
    opacity: 0;
}

.dream-door.animate {
    animation: doorAppear 3s ease-out forwards;
}

@keyframes doorAppear {
    0% { opacity: 0; transform: translateX(-50%) scale(0.5); }
    100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
}

.dream-door::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    background: rgba(138, 43, 226, 0.2);
    border-radius: 40px 40px 0 0;
}

.dream-door::after {
    content: '';
    position: absolute;
    bottom: 40px;
    right: 15px;
    width: 12px;
    height: 12px;
    background: rgba(255, 215, 0, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Dream Figure */
.dream-figure {
    position: absolute;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 100px;
    opacity: 0;
}

.dream-figure.animate {
    animation: figureFloat 6s ease-in-out forwards;
}

@keyframes figureFloat {
    0% { opacity: 0; transform: translateX(-50%) translateY(50px); }
    50% { opacity: 0.5; transform: translateX(-50%) translateY(-30px); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-100px); }
}

.dream-figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.dream-figure::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px 25px 0 0;
}

/* Story */
.story-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; pointer-events: none; z-index: 5060; padding-top: 10vh; box-sizing: border-box; }
.story-text { max-width: 600px; padding: 0 20px; text-align: center; color: #fff; opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s ease; }
.story-text.active { opacity: 1; transform: translateY(0); }
.story-text.fade-out { opacity: 0; transform: translateY(-20px); }

.story-title { font-family: "Georgia", serif; font-size: clamp(28px, 6vw, 48px); font-style: italic; margin-bottom: 30px; text-shadow: 0 0 30px rgba(138, 43, 226, 0.8), 0 0 60px rgba(138, 43, 226, 0.4); letter-spacing: 2px; }
.story-body { font-family: "Georgia", serif; font-size: clamp(16px, 3vw, 22px); line-height: 1.8; color: rgba(255, 255, 255, 0.9); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); }
.story-quote { font-size: clamp(18px, 3.5vw, 26px); font-style: italic; color: rgba(255, 255, 255, 0.95); margin: 20px 0; padding: 20px; border-left: 3px solid rgba(138, 43, 226, 0.6); background: rgba(138, 43, 226, 0.1); }
.story-subtitle { font-family: "Arial", sans-serif; font-size: clamp(14px, 2.5vw, 18px); color: rgba(255, 255, 255, 0.6); margin-top: 40px; letter-spacing: 4px; text-transform: uppercase; }

/* Vignette */
.dream-vignette { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.4) 70%, rgba(0,0,0,0.9) 100%); pointer-events: none; }

/* Orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.4; animation: orbMove 20s ease-in-out infinite; }
.orb-1 { width: 300px; height: 300px; background: rgba(138, 43, 226, 0.5); top: 10%; left: 10%; animation-delay: 0s; }
.orb-2 { width: 400px; height: 400px; background: rgba(0, 191, 255, 0.3); top: 50%; right: 5%; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: rgba(255, 20, 147, 0.4); bottom: 10%; left: 30%; animation-delay: -10s; }

@keyframes orbMove {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    33% { transform: translate(30px, -30px) scale(1.1); opacity: 0.5; }
    66% { transform: translate(-20px, 20px) scale(0.9); opacity: 0.3; }
}

/* DNA Helix */
.dna-helix {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(138, 43, 226, 0.3) 2px,
        rgba(138, 43, 226, 0.3) 4px
    );
    animation: dnaScroll 10s linear infinite;
}

@keyframes dnaScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(100px); }
}

/* ----------------------------------------
   RECYCLE BIN WINDOW
   ---------------------------------------- */
.recycle-window { width: 400px; max-height: 80vh; top: 5vh; left: calc(50% - 200px); }
.recycle-window .window-header { background: linear-gradient(180deg, #c0c0c0 0%, #a0a0a0 100%); }

.recycle-content { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; background: #f0f0f0; }
.recycle-folder { display: flex; align-items: center; padding: 8px; margin: 5px 0; background: #fff; border: 1px solid #c0c0c0; cursor: not-allowed; opacity: 0.7; }
.recycle-folder:hover { background: #e0e0e0; }
.recycle-folder-icon { font-size: 24px; margin-right: 10px; }
.recycle-folder-info { flex: 1; }
.recycle-folder-name { font-size: 12px; color: #000; }
.recycle-folder-date { font-size: 10px; color: #666; }
.recycle-x { color: #c0392b; font-size: 16px; font-weight: bold; }

/* ----------------------------------------
   PHOTOS WINDOW
   ---------------------------------------- */
.photos-window { width: 95vw; max-width: 500px; max-height: 85vh; top: 5vh; left: 2.5vw; }
.photos-window .window-header { background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%); }

.photos-content { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 10px; background: #1a1a2e; -webkit-overflow-scrolling: touch; }
.photos-content::-webkit-scrollbar { width: 16px; }
.photos-content::-webkit-scrollbar-track { background: #dfdfdf; }
.photos-content::-webkit-scrollbar-thumb { background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; }
.photos-content::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }
.photos-content::-webkit-scrollbar-button { background: #c0c0c0; height: 16px; border: 2px solid; border-color: #fff #808080 #808080 #fff; }

.photos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding-bottom: 20px; }
.photo-item { background: #16213e; border: 2px solid #0f3460; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.photo-item:hover { transform: scale(1.05); border-color: #e94560; }
.photo-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.photo-item svg { width: 100%; height: 120px; display: block; }
.photo-caption { padding: 8px; text-align: center; font-size: 11px; color: #fff; background: #0f3460; }

/* Photo Viewer */
.photo-viewer { width: 90vw; max-width: 500px; max-height: 90vh; top: 5vh; left: 5vw; transform: none; }
.photo-viewer .window-header { background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%); }
.photo-viewer .window-content { background: #000; padding: 10px; }
.photo-viewer img { max-width: 100%; max-height: 70vh; object-fit: contain; }

/* ----------------------------------------
   MEDIA QUERIES
   ---------------------------------------- */

/* Portrait mode */
@media (orientation: portrait) {
    .desktop-icons {
        z-index: 50;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .icon-img {
        width: 48px;
        height: 48px;
        font-size: 40px;
    }
}

/* Landscape mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .desktop-icons {
        z-index: 50;
        grid-template-columns: repeat(6, 1fr);
    }
    .icon-img {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
}

/* Tablet+ */
@media (min-width: 768px) {
    .browser-window {
        width: 95vw;
        max-width: 500px;
        left: 2.5vw;
    }
    .terminal-window {
        width: 700px;
        height: 500px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .terminal-content {
        font-size: 14px;
    }
    .nes-window {
        width: 600px;
        height: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

/* Mobile (max-width: 500px) */
@media (max-width: 500px) {
    /* Browser */
    .browser-url-bar {
        width: 100%;
        margin-top: 4px;
        margin-left: 0;
    }

    /* Winamp */
    .winamp-window {
        width: 400px !important;
        left: auto !important;
        top: 50% !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }
    .winamp-controls { flex-wrap: wrap; }
    .winamp-btn { padding: 8px 12px; min-width: 44px; }
    .winamp-visualizer canvas { height: 60px; }
    .winamp-track-name { font-size: 13px; }
    .winamp-track-time { font-size: 12px; }

    /* Solitaire */
    .solitaire-window {
        width: 95vw !important;
        left: 2.5vw !important;
        top: 50% !important;
    }
    .solitaire-area { height: 400px; }
    .card {
        width: 38px !important;
        height: 50px !important;
        font-size: 14px;
    }

    /* Chat */
    .chat-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        transform: none !important;
        z-index: 9999 !important;
        border: none !important;
        border-radius: 0 !important;
    }
    .chat-window.active {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    .chat-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        min-height: 0 !important;
    }
    .chat-messages {
        flex: 1 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        font-size: 13px !important;
        max-height: 100% !important;
        min-height: 0 !important;
    }
    .chat-input-area {
        flex-shrink: 0 !important;
        padding: 8px !important;
        position: sticky !important;
        bottom: 0 !important;
        background: #e0e0e0 !important;
    }
    #chat-input { font-size: 16px !important; padding: 10px !important; }
    .chat-send-btn { padding: 10px 18px !important; }
    .chat-buddy-info { display: none !important; }
    .chat-buddy-icon { margin: 0 auto !important; }
    .window-close { position: absolute !important; right: 5px !important; }

    /* General window fixes */
    .window {
        max-width: 95vw !important;
        width: auto !important;
        left: 2.5vw !important;
        right: 2.5vw !important;
        transform: none !important;
    }
    .window.email-viewer-window {
        top: 5vh !important;
        height: 85vh !important;
    }
    .desktop-icons { gap: 8px !important; }
    .desktop-icon { width: 60px !important; height: 60px !important; }
    .desktop-icon img { width: 32px !important; height: 32px !important; }
    .desktop-icon span { font-size: 10px !important; }
}
