body, html {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: fixed;
}

.content-wrapper {
    min-height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    padding-bottom: 100px;
    padding-top: 60px;
    position: relative;
}

/* ==================== MENU BAR ==================== */

.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
    border-bottom: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    z-index: 10001;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    font-family: 'Lucida Grande', 'Helvetica Neue', Arial, sans-serif;
}

.menu-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-bar-logo {
    font-size: 18px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 3px;
    transition: background 0.2s;
}

.menu-bar-logo:hover {
    background: rgba(0,0,0,0.1);
}

.menu-bar-item {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

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

.menu-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-bar-time {
    font-size: 12px;
    color: #333;
    font-weight: 500;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* ==================== WINDOWS ==================== */

.window {
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    width: 100%;
    max-width: 600px;
    font-family: 'Lucida Grande', 'Helvetica Neue', Arial, sans-serif;
    transition: opacity 0.3s ease;
    border: 1px solid #999;
    position: absolute;
    cursor: default;
    z-index: 1;
}

.window.dragging {
    transition: none;
}

.window.closed {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.window.minimized {
    transform: scale(0) translateY(100vh);
    opacity: 0;
}


/* ==================== TITLE BAR ==================== */

.title-bar {
    background: linear-gradient(to bottom, #b8b8b8, #888888);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #666;
    cursor: default;
    user-select: none;
}

.title-bar-controls {
    display: flex;
    gap: 8px;
    order: -1;
}

.title-spacer {
    width: 60px;
}

.mac-button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.5);
}

.mac-button.close {
    background: linear-gradient(to bottom, #ff5f52, #e0443e);
}

.mac-button.minimize {
    background: linear-gradient(to bottom, #ffbd2e, #e0a32e);
}

.mac-button.maximize {
    background: linear-gradient(to bottom, #28ca42, #24a73e);
}

.mac-button.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

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

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

.title-bar-text {
    color: #333;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    flex: 1;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.window-body {
    padding: 12px;
    background: linear-gradient(to bottom, #e8e8e8, #d0d0d0);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ==================== MEDIA PLAYER ==================== */

.window .video-container,
.window .player-container {
    background: #000;
    border-radius: 4px;
    padding: 0;
    position: relative;
    width: 100%;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.window .video-container {
    height: 340px;
}

.window .player-container {
    height: 166px;
}

.window .video-container iframe,
.window .player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
}

/* QuickTime-style floating controls */
.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 10;
}

#youtubeWindow:hover .controls {
    opacity: 1;
}

.qt-panel {
    background: rgba(18, 18, 28, 0.72);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 8px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    width: 88%;
    border: 1px solid rgba(255,255,255,0.1);
}

.qt-row {
    display: flex;
    align-items: center;
}

.qt-top {
    justify-content: space-between;
    gap: 8px;
}

.qt-bottom {
    gap: 8px;
}

.qt-vol {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.qt-btns {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qt-right {
    flex: 1;
}

.qt-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    line-height: 1;
}

.qt-btn i {
    font-size: 14px;
    display: block;
}

.qt-btn:hover { color: white; }
.qt-btn:active { opacity: 0.5; }

.qt-play-btn i {
    font-size: 22px;
}

/* Volume slider — tall hit area, thin visual bar via ::before */
.qt-vol-track {
    flex: 1;
    height: 16px;
    position: relative;
    cursor: pointer;
    max-width: 80px;
}

.qt-vol-track::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
}

.qt-vol-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: rgba(255,255,255,0.85);
    border-radius: 2px;
    width: 50%;
    pointer-events: none;
}

.qt-vol-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 11px;
    height: 11px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* Scrubber — tall hit area, thin visual bar via ::before */
.qt-scrubber {
    flex: 1;
    height: 16px;
    position: relative;
    cursor: pointer;
}

.qt-scrubber::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    background: rgba(255,255,255,0.25);
    border-radius: 1px;
}

.qt-scrubber-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    background: rgba(255,255,255,0.85);
    border-radius: 1px;
    width: 0%;
    pointer-events: none;
}

.qt-scrubber-knob {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    pointer-events: none;
}

.qt-time {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
    font-family: 'Monaco', 'Courier New', monospace;
    min-width: 30px;
    white-space: nowrap;
}

/* ==================== DOCK ==================== */

.dock {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(232, 232, 232, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 4px 20px;
    display: flex;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 10000;
}

.dock-item {
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.dock-item:hover {
    transform: translateY(-8px);
}

.dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.45);
    position: relative;
    overflow: hidden;
}

/* Aqua gloss */
.dock-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 52%;
    background: linear-gradient(to bottom,
        rgba(255,255,255,0.65) 0%,
        rgba(255,255,255,0.25) 60%,
        rgba(255,255,255,0) 100%);
    border-radius: 11px 11px 50% 50%;
    pointer-events: none;
    z-index: 1;
}

.dock-item:hover .dock-icon {
    filter: brightness(1.12);
    box-shadow: 0 6px 14px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.5);
}

/* Image-based icons: no box, no gloss, no hover square */
.dock-icon:has(img) {
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.dock-icon:has(img)::before {
    display: none;
}

.dock-item:hover .dock-icon:has(img) {
    box-shadow: none;
    background: none;
    filter: none;
}

.dock-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.15s;
}

.dock-item:hover .dock-icon img {
    filter: brightness(1.08);
}

.dock-indicator {
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 0;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    box-shadow: inset 1px 1px 1px rgba(0,0,0,0.5);
}

.dock-item.active .dock-indicator {
    display: block;
}

.dock-label {
    position: absolute;
    bottom: 68px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.dock-label::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0,0,0,0.75);
}

.dock-item:hover .dock-label {
    opacity: 1;
}

/* ==================== WINDOW-SPECIFIC OVERRIDES ==================== */

#musicWindow {
    left: 100px;
    top: 60px;
    width: 280px;
    max-width: 280px;
}

#musicWindow .window-body {
    padding: 0;
    overflow: hidden;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.sc-player {
    background: #1a1a1a;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
}

.sc-artwork-wrap {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-artwork-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-info {
    padding: 10px 14px 4px;
}

.sc-title {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.sc-artist {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.sc-controls {
    padding: 6px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sc-scrubber-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#aboutWindow {
    width: 350px;
    max-width: 350px;
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
}

#aboutWindow .window-body {
    padding: 10px 20px;
    text-align: center;
    overflow: hidden;
}

.about-logo {
    width: 400px;
    height: auto;
    margin-bottom: 5px;
    display: block;
    margin-left: 50%;
    transform: translateX(-50%);
}

#aboutWindow h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

#aboutWindow .about-version {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

#aboutWindow .about-definition {
    margin: 20px 0 10px 0;
    font-size: 11px;
    color: #666;
    line-height: 1.6;
}

#aboutWindow .about-year {
    margin: 15px 0 5px 0;
    font-size: 11px;
    color: #666;
}

#aboutWindow .about-copyright {
    margin: 5px 0;
    font-size: 10px;
    color: #999;
}

#youtubeWindow .window-body {
    padding: 0;
    overflow: hidden;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

#photosWindow {
    width: auto;
    max-width: none;
}

#photosWindow .window-body {
    padding: 0;
}

#photosWindow .player-container {
    height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photosWindow img {
    display: block;
    max-width: 400px;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: 0 0 8px 8px;
}

#videoWindow2 {
    width: auto;
    max-width: none;
}

#videoWindow2 .window-body {
    padding: 0;
}

#videoWindow2 .video-container {
    height: auto;
    padding: 0;
}

#videoWindow2 video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 400px;
    max-height: 300px;
    border-radius: 0 0 8px 8px;
}

#notesWindow {
    width: auto;
    max-width: 280px;
}

#notesWindow .window-body {
    padding: 20px;
    background: #fffbcc;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

#notesWindow .window-body strong {
    font-size: 15px;
}

#notesWindow .window-body ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
