* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
body {
    width: 100vw; height: 100vh; overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #000;
}

#orientation-lock {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #1e1e1e; z-index: 99999; color: white;
    justify-content: center; align-items: center; text-align: center;
}
.rotate-icon { font-size: 50px; margin-bottom: 20px; animation: spin 2s infinite linear; }
@keyframes spin { 100% { transform: rotate(90deg); } }


@media screen and (orientation: portrait) {
    #orientation-lock { display: flex; }
    #desktop { display: none; }
}

#desktop {
    width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?auto=format&fit=crop&w=1920&q=80') center/cover;
    position: relative; transition: filter 0.3s;
}

.menu-bar {
    height: 30px; background: rgba(0,0,0,0.5); backdrop-filter: blur(20px);
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; color: white; font-size: 13px; font-weight: 500;
    z-index: 5000; position: relative;
}
.left-menu, .right-menu { display: flex; gap: 18px; align-items: center; }
.bold { font-weight: 700; }

.menu-item-wrap { position: relative; cursor: pointer; }
.dropdown {
    position: absolute; top: 25px; left: 0; background: rgba(230,230,230,0.95);
    backdrop-filter: blur(10px); color: black; border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); width: 150px; display: none;
    flex-direction: column; overflow: hidden;
}
.dropdown.show { display: flex; }
.dropdown div { padding: 8px 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.dropdown div:hover { background: #007aff; color: white; }
.dropdown div:last-child { border: none; }

#control-center {
    position: absolute; top: 35px; right: 10px; width: 320px;
    background: rgba(30, 30, 30, 0.75); backdrop-filter: blur(30px);
    border-radius: 16px; border: 1px solid rgba(255,255,255,0.1);
    padding: 15px; display: none; flex-direction: column; gap: 15px;
    z-index: 6000; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
#control-center.open { display: flex; animation: slideDown 0.2s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.cc-grid { display: flex; flex-direction: column; gap: 12px; }
.cc-block { background: rgba(255,255,255,0.1); border-radius: 12px; padding: 12px; }
.toggles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cc-btn {
    height: 50px; border-radius: 25px; background: rgba(255,255,255,0.1);
    display: flex; justify-content: center; align-items: center; font-size: 18px;
    color: white; transition: 0.2s; cursor: pointer;
}
.cc-btn.active { background: #007aff; color: white; }
.brightness { display: flex; flex-direction: column; gap: 8px; color: white; font-size: 12px; }
input[type=range] { width: 100%; accent-color: white; }

.window {
    position: absolute; background: #f5f5f7; border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    display: flex; flex-direction: column; overflow: hidden;
    min-width: 200px; min-height: 150px;
    opacity: 0; transform: scale(0.9); pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s;
}
.window.open { opacity: 1; transform: scale(1); pointer-events: auto; }

#win-preview { transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s; }

.title-bar {
    height: 28px; background: #ebebeb; border-bottom: 1px solid #d1d1d1;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.traffic-lights { position: absolute; left: 8px; display: flex; gap: 6px; }
.light { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); cursor: pointer; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.title { font-size: 13px; color: #444; font-weight: 600; }
.window-content { flex: 1; position: relative; overflow: auto; background: #fff; }

.files-body { display: flex; flex-direction: column; background: #fff; }
.files-toolbar { padding: 10px; border-bottom: 1px solid #eee; display:flex; gap:10px; align-items:center; background:#f9f9f9;}
.upload-btn { background: #007aff; color: white; padding: 6px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); padding: 15px; gap: 15px; }
.file-icon { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; text-align: center; }
.file-icon i { font-size: 32px; color: #555; }
.file-icon span { font-size: 11px; color: #333; word-break: break-all;}

.settings-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.settings-body h3 { font-weight: 600; color: #333; }
.wallpaper-preview { width: 100%; height: 150px; background: #ddd; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid #ccc; }
.btn-danger { padding: 8px; background: #ff3b30; color: white; border:none; border-radius: 6px; cursor:pointer; width: fit-content;}

.browser-body { display: flex; flex-direction: column; height: 100%; }
.browser-nav { display: flex; padding: 8px; gap: 8px; background: #f0f0f0; border-bottom: 1px solid #ddd; }
#browser-url { flex: 1; padding: 5px 10px; border-radius: 4px; border: 1px solid #ccc; outline: none; }
.browser-nav button { padding: 5px 12px; border: none; background: #007aff; color: white; border-radius: 4px; cursor: pointer; }
#browser-frame { flex: 1; width: 100%; border: none; background: white; }

.terminal-body { background: #1a1a1a; color: #33ff00; font-family: monospace; padding: 10px; font-size: 13px; cursor: text; }
.input-line { display: flex; margin-top: 5px; }
#cmd-input { background: transparent; border: none; color: white; width: 100%; outline: none; font-family: inherit; }

.music-body { background: #222; color: white; display: flex; flex-direction: column; height: 100%; }
.album-art { height: 150px; background: #333; display: flex; justify-content: center; align-items: center; font-size: 50px; color: #555; }
.song-info { padding: 15px; text-align: center; }
.music-controls { display: flex; justify-content: center; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid #444; }
.music-controls button { background: none; border: none; color: white; font-size: 20px; cursor: pointer; }
.playlist { flex: 1; overflow-y: auto; background: #1a1a1a; }
.track-item { padding: 10px 15px; border-bottom: 1px solid #333; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; }
.track-item:hover { background: #333; }

.photos-body { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 5px; padding: 5px; background: #111; }
.photo-item {
    height: 100px; background-size: cover; background-position: center;
    border-radius: 4px; cursor: pointer; transition: transform 0.2s; background-color: #333;
}
.photo-item:hover { transform: scale(1.05); z-index: 2; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }

.video-body { background: #000; height: 100%; display: flex; flex-direction: column; }
.video-list-container { height: 150px; background: #1a1a1a; overflow-y: auto; color: white; }
.video-list-title { padding: 5px 10px; background: #333; font-size: 12px; font-weight: bold; }
.video-item { padding: 10px; border-bottom: 1px solid #333; cursor: pointer; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.video-item:hover { background: #333; }

.notes-area { width: 100%; height: 100%; border: none; padding: 15px; font-family: sans-serif; font-size: 15px; outline: none; background: #fffbe6; resize: none; }

.dock-wrapper { position: absolute; bottom: 10px; width: 100%; display: flex; justify-content: center; z-index: 4000; }
.dock {
    height: 70px; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 20px;
    display: flex; align-items: center; padding: 0 15px; gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.dock-item { transition: 0.2s cubic-bezier(0.25, 1.5, 0.5, 1); cursor: pointer; }
.dock-item:hover { transform: scale(1.2) translateY(-15px); margin: 0 5px; }
.dock-icon {
    width: 50px; height: 50px; border-radius: 12px; font-size: 24px;
    display: flex; justify-content: center; align-items: center; color: white;
    background: #555; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}


@media (max-width: 932px) and (orientation: landscape) {
 
    .dock { height: 50px; padding: 0 10px; gap: 8px; border-radius: 15px; }
    .dock-icon { width: 35px; height: 35px; font-size: 16px; border-radius: 8px; }
    .dock-item:hover { transform: scale(1.1) translateY(-5px); }

    
    .window {
        max-width: 90vw !important;
        max-height: 75vh !important;
      
        top: 40px !important; 
        left: 5vw !important;
    }

  
    .files-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
    .file-icon i { font-size: 24px; }
    
    .music-body .album-art { height: 100px; font-size: 30px; }
    
    .menu-bar { font-size: 11px; padding: 0 15px; }
    .left-menu, .right-menu { gap: 10px; }
}
