* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background-image: url('bg.jpg');
    background-size: cover;
    background-position: center;
    background-color: #d1e5f0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#desktop {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 24px;
    padding: 30px;
    height: 100%;
}

.icon {
    width: 90px;
    text-align: center;
    border-radius: 12px;
    padding: 10px 5px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.15));
    transition: transform 0.2s;
}

.icon span {
    display: block;
    color: white;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.4);
    background-color: transparent;
    border-radius: 8px;
    padding: 4px;
    transition: background 0.2s;
}

.icon:hover {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.icon:hover img {
    transform: translateY(-2px);
}

/* BASE WINDOWS */
.window-frame, .glass-widget {
    position: absolute;
    display: none;
    z-index: 10;
    overflow: hidden;
    background: rgba(250, 250, 255, 0.95); 
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateZ(0); 
}

.is-dragging {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.9) !important; 
}

.window-frame {
    width: 350px;
}

.window-header {
    background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(240,240,245,0.7) 100%);
    color: #444;
    padding: 8px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    font-weight: 800;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    letter-spacing: 0.5px;
    cursor: move;
}

.close-btn {
    width: 14px;
    height: 14px;
    background: #ff5f56;
    border: 1px solid #e0443e;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5);
    transition: background 0.1s;
    font-size: 0;
    cursor: pointer;
}

.close-btn:hover { background: #ff766e; }
.close-btn:active { background: #d64a42; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2); }

.window-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
}

.window-content.no-padding { padding: 0; }

/* WIDGETS */
.glass-widget {
    background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(240,245,255,0.85) 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 20px;
}

/* TEXT EDITOR */
.text-editor {
    font-family: 'Inter', monospace;
    font-size: 13px;
    color: #555;
    background: rgba(255,255,255,0.7);
    cursor: text;
}

/* IMAGE VIEWER */
.image-viewer {
    width: 280px;
    background: rgba(245, 245, 250, 0.7);
}
.image-viewer .custom-header {
    background: rgba(255, 255, 255, 0.5);
    color: #555;
    border-bottom: none;
}
.pixel-art-img {
    width: 100%;
    display: block;
    border-radius: 0 0 12px 12px;
}

/* BROWSER WINDOW */
.browser-window { background: rgba(250, 250, 255, 0.85); }
.browser-window .browser-header { background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%); color: #333; }

.browser-toolbar {
    background: rgba(240, 242, 245, 0.6);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 8px 12px;
}
.browser-address-bar { display: flex; align-items: center; gap: 8px; }

.win-btn {
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 4px 10px;
    color: #555;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.1s;
    cursor: pointer;
}
.win-btn:hover { background: #f8f8f8; border-color: #bbb; }
.win-btn:active { background: #e5e5e5; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }

.url-input-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    flex-grow: 1;
    padding: 4px 12px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}
.url-input-container input {
    border: none;
    outline: none;
    width: 100%;
    margin-left: 5px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    color: #555;
    background: transparent;
}

/* OSU CLASSIC TABLE */
.osu-classic-page {
    background: rgba(248, 249, 252, 0.5);
    font-family: 'Inter', sans-serif;
    color: #333;
    min-height: 400px;
}
.osu-header-tabs {
    display: flex;
    background: rgba(230, 235, 245, 0.6);
    padding: 10px 10px 0 10px;
    border-bottom: 1px solid #d0d7e5;
}
.osu-header-tabs .tab {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    border-radius: 8px 8px 0 0;
    margin-right: 4px;
    transition: background 0.2s;
    cursor: pointer;
}
.osu-header-tabs .tab.active {
    background: #fff;
    color: #f062a1;
    border: 1px solid #d0d7e5;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
}
.osu-classic-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.osu-classic-table th {
    background: rgba(255, 255, 255, 0.7);
    color: #555;
    padding: 10px 6px;
    text-align: center;
    font-weight: 700;
    border-bottom: 2px solid #e0e5f0;
}
.osu-classic-table tr { transition: background 0.2s; }
.osu-classic-table tr:nth-child(odd) { background: rgba(255, 255, 255, 0.4); }
.osu-classic-table tr:nth-child(even) { background: rgba(245, 247, 252, 0.4); }
.osu-classic-table tr:hover { background: rgba(240, 98, 161, 0.08); }
.osu-classic-table td { padding: 8px 6px; text-align: center; vertical-align: middle; }
.osu-classic-table td:nth-child(2) { text-align: left; color: #3b82f6; font-weight: 700; }

/* MSN WINDOW */
.msn-window { border: 1px solid rgba(255, 255, 255, 0.9); }
.msn-header { background: linear-gradient(180deg, #a1c4fd 0%, #c2e9fb 100%); color: #1e3a8a; border-bottom: 1px solid rgba(255,255,255,0.6); }
.msn-bg { background: rgba(255, 255, 255, 0.85); }

.msn-my-profile {
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(240,248,255,0.8) 100%);
    border-bottom: 1px solid #d1e1f0;
    display: flex;
    padding: 12px;
    align-items: center;
}
.msn-my-avatar {
    width: 52px;
    height: 52px;
    border: 2px solid #a1c4fd;
    border-radius: 12px;
    padding: 2px;
    background: #FFF;
    margin-right: 12px;
    box-shadow: 0 2px 6px rgba(161,196,253,0.4);
}
.msn-my-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.msn-my-info { display: flex; flex-direction: column; }
.msn-my-name { font-size: 14px; font-weight: 800; color: #1e3a8a; }
.msn-my-sub { 
    font-size: 11px; 
    color: #3b82f6; 
    text-decoration: none; 
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 12px;
    margin-top: 4px;
    display: inline-block;
    transition: background 0.2s;
}
.msn-my-sub:hover { background: rgba(59, 130, 246, 0.2); }

.msn-group-header {
    background-color: rgba(241, 246, 253, 0.8);
    border-bottom: 1px solid #d1e1f0;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.msn-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: transparent;
    flex-grow: 1;
    overflow-y: auto;
}
.msn-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}
.msn-item:hover {
    background: rgba(241, 246, 253, 0.9);
    border-radius: 8px;
    margin: 0 4px;
}
.msn-avatar-box {
    width: 36px;
    height: 36px;
    min-width: 36px; 
    border: 2px solid #d1e1f0;
    border-radius: 10px;
    padding: 2px;
    background: #FFF;
    margin-right: 10px;
}
.msn-avatar-box img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.msn-name { font-size: 12px; font-weight: 700; color: #333; }
.msn-status-text { font-size: 11px; color: #888; }

/* WIDGETS EXTRA */
.widget {
    position: absolute;
    z-index: 5;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
}
#widget-clock { text-align: center; min-width: 160px; color: #444; }
.clock-time { font-size: 38px; font-weight: 800; letter-spacing: -2px; text-shadow: 0 2px 10px rgba(255,255,255,0.8); margin-bottom: -5px; }
.clock-date { font-size: 13px; font-weight: 600; color: #666; text-transform: uppercase; letter-spacing: 1px; }

.mp3-widget { display: flex; gap: 15px; align-items: center; padding: 15px 20px; min-width: 250px; }
.mp3-widget img { width: 60px; height: 60px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); pointer-events: none; }
.player-info { display: flex; flex-direction: column; flex-grow: 1; }
.song-title { font-weight: 800; font-size: 15px; color: #333; }
.song-artist { font-size: 12px; color: #777; margin-bottom: 8px; }

.player-controls { display: flex; gap: 10px; align-items: center; }
.ctrl-btn {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.8);
    color: #555;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s;
    cursor: pointer;
}
.ctrl-btn:hover { background: #fff; transform: scale(1.1); color: #f062a1; }
.play-btn { width: 34px; height: 34px; font-size: 14px; background: #fff; color: #3b82f6;}

.progress-bar { width: 100%; height: 4px; background: rgba(0,0,0,0.1); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.progress-fill { width: 35%; height: 100%; background: linear-gradient(90deg, #3b82f6, #f062a1); border-radius: 4px; }

.sticky-note {
    background: linear-gradient(135deg, #fef5a9 0%, #fde767 100%);
    width: 200px;
    height: 200px;
    padding: 25px 15px 15px 15px;
    border-bottom-right-radius: 30px 5px;
    box-shadow: 2px 8px 15px rgba(0,0,0,0.1);
}
.pin {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 30% 30%, #ff766e, #d64a42);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 3px 5px rgba(0,0,0,0.2), inset -2px -2px 4px rgba(0,0,0,0.2);
}
.sticky-note textarea {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    font-family: 'Inter', sans-serif; 
    font-size: 14px;
    color: #5d531a;
    line-height: 1.5;
    cursor: text;
}

/* =======================================================
   LAZER UI & REPLAY PLAYER (ESTILOS ESCUROS BLINDADOS)
   ======================================================= */

.lazer-window {
    background: rgba(20, 20, 25, 0.96) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.dark-header {
    background: rgba(30, 30, 40, 0.6) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

.lazer-ui {
    display: flex;
    height: calc(100% - 35px);
    max-height: none !important; 
    background: transparent !important;
    color: #ffffff;
    font-family: 'Inter', sans-serif !important;
    overflow: hidden; 
}

.lazer-sidebar {
    width: 220px;
    min-width: 220px; /* Trava a largura da barra esquerda contra empurrões */
    flex-shrink: 0;
    background: rgba(20, 20, 30, 0.4);
    border-right: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.lazer-search {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lazer-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px 14px;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s;
    cursor: text;
}
.lazer-search input:focus {
    border-color: #ff66aa;
    background: rgba(0, 0, 0, 0.5);
}

.lazer-player-list {
    flex-grow: 1;
    overflow-y: auto; 
}
.lazer-player-list::-webkit-scrollbar, 
.lazer-scores::-webkit-scrollbar { width: 6px; }
.lazer-player-list::-webkit-scrollbar-track, 
.lazer-scores::-webkit-scrollbar-track { background: transparent; }
.lazer-player-list::-webkit-scrollbar-thumb, 
.lazer-scores::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; 

}

.lazer-player {
    padding: 12px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #a0a0b5;
    border-left: 3px solid transparent;
    cursor: pointer;
    
    /* 1. Transição apenas visual, ignorando larguras/fontes */
    transition: background 0.2s, color 0.2s; 
    
    /* 2. Impede o texto de quebrar pra segunda linha (o que causava o "abre e fecha") */
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; /* Adiciona "..." se o nick for muito grande */
}
.lazer-player:hover { 
    background: rgba(255,255,255,0.05); 
    color: #fff; 
}

.lazer-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: transparent;
    overflow: hidden; 
}

.lazer-player.active {
    background: linear-gradient(90deg, rgba(255,102,170,0.15) 0%, transparent 100%);
    color: #ff66aa;
    border-left: 3px solid #ff66aa;
    
    /* 3. Truque mágico: Cria o efeito de Negrito (bold) com sombra, sem alargar a palavra! */
    font-weight: 500; 
    text-shadow: 0.5px 0 0 #ff66aa; 
}

.lazer-header {
    padding: 25px 30px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lazer-header h2 { font-size: 28px; margin: 0; font-weight: 800; letter-spacing: -0.5px; }
.lazer-subtitle { font-size: 13px; color: #888899; }

.lazer-scores {
    flex-grow: 1;
    padding: 20px 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lazer-card {
    background: rgba(25, 25, 35, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    backdrop-filter: blur(10px);
}
.lazer-card:hover {
    transform: translateY(-3px);
    background: rgba(35, 35, 45, 0.8);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.card-rank { font-size: 32px; font-weight: 900; width: 45px; text-align: center; }
.rank-ss { color: #d6e2e6; text-shadow: 0 0 12px rgba(214,226,230,0.6); }
.rank-ssh { color: #d6e2e6; text-shadow: 0 0 12px rgba(214,226,230,0.8); }
.rank-s { color: #eecf44; text-shadow: 0 0 12px rgba(238,207,68,0.6); }
.rank-sh { color: #d6e2e6; text-shadow: 0 0 12px rgba(214,226,230,0.3); }
.rank-a { color: #66cc88; }
.rank-b { color: #3b82f6; }
.rank-c { color: #a855f7; }
.rank-d { color: #ef4444; }

.card-info { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.card-mods { color: #ff66aa; font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.card-stats { font-size: 12px; color: #a0a0b5; display: flex; align-items: center; gap: 8px; }
.card-stats b { color: #fff; font-weight: 700; }
.dot { color: #444455; font-size: 10px; }

.lazer-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.2s;
    cursor: pointer;
}
.lazer-btn:hover {
    background: #ff66aa;
    border-color: #ff66aa;
    box-shadow: 0 4px 12px rgba(255,102,170,0.3);
    color: white;
}

.player-controls-bar {
    background: rgba(20, 20, 25, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 14px;
    display: flex;
    flex-direction: column;
}

#player-speed, #lazer-sort-select { cursor: pointer; }
#player-speed option,
#lazer-sort-select option {
    background-color: #1e1e28 !important;
    color: #ffffff !important;
}

#window-replay-player:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 999999 !important;
}
#window-replay-player:fullscreen .window-content {
    flex-grow: 1 !important;
    height: 100% !important;
    max-height: none !important;
}
#osu-canvas {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    aspect-ratio: 4 / 3;
}