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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: url('brand_assets/background_images/b081-on-saskatchewan-glacier.jpg') center/cover no-repeat;
    background-attachment: fixed;
    height: 100vh;
    width: 100vw;
}

.menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 13px;
    color: white;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.apple-logo {
    font-size: 14px;
    margin-right: 10px;
}

.menu-item {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

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

.menu-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
}

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

.background-nav {
    display: none; /* Temporarily hidden until more high-quality backgrounds are added */
    align-items: center;
    gap: 4px;
    margin-right: 8px;
}

.bg-arrow {
    width: 20px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bg-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.bg-arrow:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.menu-icon {
    font-size: 12px;
}

.time {
    font-weight: 500;
    min-width: 60px;
    text-align: right;
}

/* System Volume Control */
.volume-menu {
    position: relative;
}

.volume-icon {
    cursor: pointer;
    transition: all 0.2s ease;
}

.volume-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.volume-popup {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    min-width: 150px;
    z-index: 1000;
}

.volume-popup.show {
    display: block;
    animation: volumePopupIn 0.2s ease-out;
}

@keyframes volumePopupIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.volume-popup-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.volume-label {
    color: white;
    font-size: 11px;
    font-weight: 500;
}

.system-volume-slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.system-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.system-volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.volume-percentage {
    color: #ccc;
    font-size: 10px;
    font-weight: 500;
}

.desktop {
    position: relative;
    height: calc(100vh - 24px);
    top: 24px;
    width: 100vw;
}

.workspace {
    position: absolute;
    top: 0;
    left: 0;
    right: 90px;
    bottom: 0;
    overflow: hidden;
}

.welcome-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.2);
    padding: 40px 60px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.welcome-message h1 {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.welcome-message p {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.dock {
    position: fixed;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 100;
}

.dock-item {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dock-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.dock-item:active {
    transform: scale(0.95);
}

.app-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.app-name {
    font-size: 10px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    font-weight: 500;
    text-align: center;
    line-height: 1;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 4px 8px;
}

.window {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    min-width: 300px;
    min-height: 200px;
    z-index: 10;
    overflow: hidden;
}

.window.active {
    z-index: 100;
}

.window-header {
    background: rgba(240, 240, 240, 0.9);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: move;
    user-select: none;
}

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

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.6);
}

.window-control.close {
    background: #ff5f57;
}

.window-control.close::before {
    content: '×';
    font-size: 10px;
    line-height: 1;
}

.window-control.minimize {
    background: #ffbd2e;
}

.window-control.minimize::before {
    content: '−';
    font-size: 8px;
    line-height: 1;
}

.window-control.maximize {
    background: #28ca42;
}

.window-control.maximize::before {
    content: '+';
    font-size: 8px;
    line-height: 1;
}

.window-control:hover {
    transform: scale(1.1);
}

.window-control:hover::before {
    color: rgba(0, 0, 0, 0.8);
}

.window.maximized {
    border-radius: 0 !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3) !important;
}

.window-title {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.window-content {
    padding: 20px;
    height: calc(100% - 60px);
    overflow: auto;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 20px;
}

.placeholder-content h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.placeholder-content p {
    color: #666;
    font-size: 16px;
}

.youtube-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.youtube-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(-45deg, transparent 0%, transparent 40%, #ddd 40%, #ddd 60%, transparent 60%);
}

/* iPod Styling */
.ipod-container {
    background: linear-gradient(145deg, #f0f0f0, #d8d8d8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        inset 0 1px 3px rgba(255, 255, 255, 0.8),
        inset 0 -1px 3px rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Helvetica', 'Arial', sans-serif;
}

.ipod-screen {
    background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(255, 255, 255, 0.1);
    flex: 1;
    color: white;
    border: 2px solid #333;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
}

.battery {
    color: #4CAF50;
}

.title {
    font-weight: bold;
    font-size: 14px;
}

.now-playing {
    text-align: center;
    margin: 20px 0;
}

.song-info {
    margin-bottom: 15px;
}

.song-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.artist-name {
    font-size: 12px;
    color: #ccc;
}

.visualizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    margin: 15px 0;
    padding: 0 20px;
}

.bar {
    width: 3px;
    height: 5px;
    background: linear-gradient(to top, #ff6b35, #f7931e, #ffcc02);
    border-radius: 1px;
    transition: height 0.1s ease;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 15px 0 10px 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.progress-bar:hover {
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00ccff);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.3);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
}

.ipod-controls {
    display: flex;
    justify-content: center;
}

.clickwheel {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f5f5f5, #d8d8d8, #b8b8b8);
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 -2px 6px rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    border: 3px solid #ccc;
}

.select-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e0e0e0, #c0c0c0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.1s ease;
}

.select-btn:active {
    background: linear-gradient(145deg, #c0c0c0, #a0a0a0);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 1px 2px rgba(255, 255, 255, 0.5);
}

.menu-btn, .play-btn, .prev-btn, .next-btn {
    position: absolute;
    font-size: 10px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.1s ease;
}

.menu-btn:hover, .play-btn:hover, .prev-btn:hover, .next-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menu-btn {
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 8px;
}

.play-btn {
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
}

.prev-btn {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.next-btn {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

/* Playlist Styling */
.playlist-view {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-title {
    font-size: 14px;
    font-weight: bold;
    color: #00ff88;
}

.go-back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.go-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.playlist-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.mode-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
    width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.volume-icon {
    font-size: 10px;
    opacity: 0.7;
}

.volume-slider {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00ff88;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00ff88;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(0, 255, 136, 0.5);
}

.playlist-items {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.playlist-items::-webkit-scrollbar {
    display: none;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 8px 5px;
    margin-bottom: 2px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 11px;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: linear-gradient(90deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 255, 0.2));
    color: #00ff88;
}

.track-number {
    width: 20px;
    text-align: center;
    color: #666;
    font-size: 10px;
}

.playlist-item.active .track-number {
    color: #00ff88;
}

.track-info {
    flex: 1;
    margin-left: 8px;
    overflow: hidden;
}

.track-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.track-artist {
    font-size: 9px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.playlist-item.active .track-artist {
    color: #00ccff;
}

.play-indicator {
    width: 15px;
    text-align: center;
    color: #00ff88;
    font-size: 10px;
}

/* Game Styling */

/* Tetris Game */
.tetris-container {
    display: flex;
    height: 100%;
    gap: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.tetris-game-area {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 8px;
    border: 2px solid #333;
}

#tetris-canvas {
    display: block;
    background: #222;
    border: 2px solid #444;
    border-radius: 4px;
    width: 100%;
    height: 100%;
    max-width: 300px;
    max-height: 600px;
    object-fit: contain;
}

#tetris-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

#tetris-game-over {
    display: none;
}

.start-screen, .game-over-screen {
    text-align: center;
    color: white;
    padding: 30px;
    border: 2px solid #00ff00;
    border-radius: 10px;
    background: rgba(0, 20, 0, 0.9);
}

.start-screen h2, .game-over-screen h2 {
    margin: 0 0 15px 0;
    color: #00ff00;
    font-size: 24px;
    text-shadow: 0 0 10px #00ff00;
}

.start-screen p, .game-over-screen p {
    margin: 10px 0;
    color: #ccc;
    font-size: 14px;
}

.start-screen .play-btn, .game-over-screen .play-btn {
    background: #00ff00;
    color: #000;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
}

.start-screen .play-btn:hover, .game-over-screen .play-btn:hover {
    background: #00cc00;
    box-shadow: 0 0 15px #00ff00;
}

.tetris-ui {
    width: 160px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: white;
}

.stats {
    background: linear-gradient(135deg, #2a2a3e, #1f1f2e);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.label {
    color: #ccc;
}

.value {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.next-preview {
    background: linear-gradient(135deg, #2a2a3e, #1f1f2e);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.next-preview h4 {
    margin: 0 0 10px 0;
    color: #00ff00;
    font-size: 14px;
}

#next-canvas {
    display: block;
    margin: 0 auto;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
}

.game-controls {
    background: linear-gradient(135deg, #2a2a3e, #1f1f2e);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
}

.control-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 5px;
}

.control-btn {
    background: #333;
    color: white;
    border: 1px solid #555;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: monospace;
    min-width: 40px;
}

.control-btn:hover, .control-btn:active {
    background: #00ff00;
    color: #000;
    transform: scale(0.95);
}

/* Mario Game */
.mario-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'Courier New', monospace;
    background: #5C94FC;
    border-radius: 8px;
    overflow: hidden;
}

.mario-game {
    position: relative;
    flex: 1;
    background: #5C94FC;
}

#mario-canvas {
    display: block;
    width: 100%;
    height: auto;
    background: #5C94FC;
    max-width: 100%;
    border: 2px solid #333;
}

.mario-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.mario-start, .mario-game-over {
    text-align: center;
    color: white;
    padding: 30px;
    border: 2px solid #ff6b35;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.9);
}

.mario-start h2, .mario-game-over h2 {
    margin: 0 0 15px 0;
    color: #ff6b35;
    font-size: 24px;
    text-shadow: 0 0 10px #ff6b35;
}

.mario-ui {
    display: flex;
    background: #000;
    padding: 10px;
    gap: 20px;
    border-top: 2px solid #333;
    min-height: 60px;
}

.mario-score-panel {
    display: flex;
    gap: 20px;
    flex: 1;
    align-items: center;
}

.mario-score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-size: 12px;
}

.mario-score-item .score-value {
    color: #ff6b35;
    font-weight: bold;
    font-size: 14px;
}

.mario-controls-panel {
    color: white;
    background: #222;
    padding: 8px;
    border-radius: 4px;
    min-width: 120px;
}

.mario-controls-panel h4 {
    margin: 0 0 8px 0;
    color: #ff6b35;
    font-size: 12px;
    text-align: center;
}

.mario-mobile-controls {
    display: none;
}

.mario-btn-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.mario-mobile-btn {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mario-mobile-btn:hover, .mario-mobile-btn:active {
    background: #e55a2b;
    transform: scale(0.95);
}

/* Mobile Game Controls */
@media (max-width: 480px) {
    .mobile-controls, .mario-mobile-controls {
        display: block !important;
    }
    
    .controls-panel, .mario-controls-panel {
        display: none;
    }
    
    .tetris-container {
        flex-direction: column;
        padding: 5px;
    }
    
    .tetris-ui {
        width: 100%;
        flex-direction: row;
        height: auto;
        gap: 10px;
    }
    
    .stats, .next-preview {
        flex: 1;
        min-width: 0;
    }
    
    .game-controls {
        display: block !important;
    }
    
    .mario-ui {
        flex-direction: column;
        gap: 10px;
    }
    
    .mario-score-panel {
        justify-content: space-around;
    }
    
    #tetris-canvas {
        width: 100%;
        height: auto;
        max-height: 400px;
    }
    
    #mario-canvas {
        width: 100% !important;
        height: auto !important;
        max-height: 250px;
    }
}

/* Wallpaper App */
.wallpaper-app {
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    height: 100%;
    overflow-y: auto;
}


.wallpaper-upload-section {
    margin-bottom: 20px;
}


.upload-area {
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #007AFF;
    background: rgba(0, 122, 255, 0.05);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 10px 0 5px 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.upload-area small {
    color: #666;
    font-size: 12px;
}


.wallpaper-actions {
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.reset-btn {
    background: #ff3b30;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 15px;
}

.reset-btn:hover {
    background: #e12d20;
    transform: translateY(-1px);
}

.wallpaper-note {
    margin: 0;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Simple Floating Sticky Note */
.floating-sticky {
    font-family: 'Segoe UI', Arial, sans-serif;
    position: relative;
}

.floating-sticky button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.floating-sticky textarea {
    box-sizing: border-box;
}

.floating-sticky textarea:focus {
    outline: none;
}

/* Resize handles */
.resize-handle {
    position: absolute;
    z-index: 10;
}

.resize-handle:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

.resize-nw {
    top: -5px;
    left: -5px;
    cursor: nw-resize;
}

.resize-ne {
    top: -5px;
    right: -5px;
    cursor: ne-resize;
}

.resize-sw {
    bottom: -5px;
    left: -5px;
    cursor: sw-resize;
}

.resize-se {
    bottom: -5px;
    right: -5px;
    cursor: se-resize;
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .workspace {
        right: 80px;
    }
    
    .dock {
        right: 6px;
    }
    
    .dock-item {
        width: 56px;
        height: 56px;
    }
    
    .app-icon {
        font-size: 28px;
    }
    
    .window {
        min-width: 280px;
        min-height: 180px;
    }
    
    .ipod-container {
        padding: 18px;
    }
    
    .clickwheel {
        width: 110px;
        height: 110px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .menu-bar {
        height: 28px;
        font-size: 12px;
        padding: 0 12px;
    }
    
    .menu-left {
        gap: 15px;
    }
    
    .menu-item {
        display: none;
    }
    
    .menu-item:first-of-type {
        display: inline;
    }
    
    .desktop {
        height: calc(100vh - 28px);
        top: 28px;
    }
    
    .workspace {
        right: 70px;
    }
    
    .dock {
        right: 4px;
        gap: 6px;
        padding: 6px;
    }
    
    .dock-item {
        width: 48px;
        height: 48px;
    }
    
    .app-icon {
        font-size: 24px;
    }
    
    .app-name {
        font-size: 9px;
    }
    
    .window {
        min-width: 260px;
        min-height: 160px;
        border-radius: 8px;
    }
    
    .window-header {
        padding: 8px 15px;
        touch-action: none;
    }
    
    .window-content {
        padding: 15px;
    }
    
    .welcome-message {
        padding: 25px 35px;
        border-radius: 15px;
    }
    
    .welcome-message h1 {
        font-size: 28px;
    }
    
    .welcome-message p {
        font-size: 14px;
    }
    
    .ipod-container {
        padding: 15px;
    }
    
    .clickwheel {
        width: 100px;
        height: 100px;
    }
    
    .select-btn {
        width: 30px;
        height: 30px;
    }
    
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
        padding: 12px;
    }
    
    .note-modal-content {
        width: 450px;
        max-width: 95vw;
    }
}

/* Mobile Phones - Large */
@media (max-width: 480px) {
    .menu-bar {
        height: 32px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    .menu-left span:not(.apple-logo):not(:first-of-type) {
        display: none;
    }
    
    .menu-right {
        gap: 8px;
    }
    
    .menu-right .menu-icon:not(.volume-icon):nth-child(n+2):nth-child(-n+3) {
        display: none;
    }
    
    .time {
        min-width: 45px;
        font-size: 10px;
    }
    
    .desktop {
        height: calc(100vh - 32px);
        top: 32px;
    }
    
    .workspace {
        right: 0;
        bottom: 80px;
    }
    
    .dock {
        position: fixed;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        top: auto;
        right: auto;
        flex-direction: row;
        padding: 8px 12px;
        gap: 8px;
        border-radius: 20px;
        max-width: calc(100vw - 16px);
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .dock::-webkit-scrollbar {
        display: none;
    }
    
    .dock-item {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
        border-radius: 16px;
    }
    
    .app-icon {
        font-size: 26px;
        margin-bottom: 1px;
    }
    
    .app-name {
        font-size: 8px;
        line-height: 1;
    }
    
    .dock-divider {
        width: 1px;
        height: 40px;
        margin: 6px 4px;
    }
    
    .window {
        min-width: 280px;
        min-height: 200px;
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 120px);
        border-radius: 12px;
    }
    
    .window-header {
        padding: 12px;
        touch-action: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .window-control {
        width: 16px;
        height: 16px;
    }
    
    .window-title {
        font-size: 15px;
    }
    
    .window-content {
        padding: 16px;
        height: calc(100% - 68px);
    }
    
    .welcome-message {
        padding: 20px 25px;
        border-radius: 12px;
    }
    
    .welcome-message h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .welcome-message p {
        font-size: 13px;
    }
    
    /* iPod/Music Pod Mobile Adjustments */
    .ipod-container {
        padding: 12px;
    }
    
    .ipod-screen {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .clickwheel {
        width: 90px;
        height: 90px;
        border-width: 2px;
    }
    
    .select-btn {
        width: 28px;
        height: 28px;
    }
    
    .menu-btn, .play-btn, .prev-btn, .next-btn {
        font-size: 8px;
        padding: 6px;
    }
    
    .play-btn {
        font-size: 12px;
    }
    
    .prev-btn {
        font-size: 10px;
    }
    
    .next-btn {
        font-size: 10px;
    }
    
    .song-title {
        font-size: 14px;
    }
    
    .artist-name {
        font-size: 11px;
    }
    
    .playlist-item {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .track-title {
        font-size: 12px;
    }
    
    .track-artist {
        font-size: 10px;
    }
    
    /* Sticky Notes Mobile */
    .notes-header {
        padding: 12px 16px 8px;
    }
    
    .search-input {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .add-note-btn {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        padding: 10px 16px 100px;
    }
    
    .note-card {
        min-height: 100px;
        padding: 12px;
        border-radius: 6px;
    }
    
    .note-card-title {
        font-size: 13px;
    }
    
    .note-card-content {
        font-size: 12px;
        -webkit-line-clamp: 3;
    }
    
    .note-date {
        font-size: 10px;
    }
    
    .note-modal-content {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 40px);
        margin: 10px;
        border-radius: 8px;
    }
    
    .note-modal-header {
        padding: 16px 16px 12px;
        gap: 12px;
    }
    
    .note-title-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .color-option {
        width: 24px;
        height: 24px;
    }
    
    .note-content-input {
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 150px;
    }
    
    .note-modal-footer {
        padding: 12px 16px 16px;
    }
    
    .volume-popup {
        right: -20px;
        min-width: 140px;
    }
}

/* Mobile Phones - Small */
@media (max-width: 360px) {
    .dock {
        padding: 6px 8px;
        gap: 6px;
    }
    
    .dock-item {
        width: 44px;
        height: 44px;
    }
    
    .app-icon {
        font-size: 22px;
    }
    
    .app-name {
        font-size: 7px;
    }
    
    .welcome-message {
        padding: 16px 20px;
    }
    
    .welcome-message h1 {
        font-size: 20px;
    }
    
    .welcome-message p {
        font-size: 12px;
    }
    
    .notes-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 8px 12px 100px;
    }
    
    .note-card {
        min-height: 90px;
        padding: 10px;
    }
    
    .clickwheel {
        width: 80px;
        height: 80px;
    }
    
    .select-btn {
        width: 24px;
        height: 24px;
    }
}

/* Landscape mode adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .welcome-message {
        padding: 15px 25px;
    }
    
    .welcome-message h1 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .welcome-message p {
        font-size: 12px;
    }
    
    .dock {
        padding: 4px 8px;
    }
    
    .dock-item {
        width: 40px;
        height: 40px;
    }
    
    .app-icon {
        font-size: 20px;
    }
    
    .app-name {
        font-size: 7px;
    }
    
    .window {
        max-height: calc(100vh - 80px);
    }
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .dock-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .window-control {
        min-width: 16px;
        min-height: 16px;
    }
    
    .menu-item {
        padding: 6px 10px;
    }
    
    .modal-btn {
        padding: 8px;
        min-width: 32px;
        min-height: 32px;
    }
    
    .floating-sticky {
        width: 200px !important;
        min-height: 150px !important;
        font-size: 12px !important;
    }
    
    .floating-sticky textarea {
        font-size: 12px !important;
        padding: 8px !important;
        height: 120px !important;
    }
}