:root {
    --window-bg: rgba(18, 18, 20, 0.15); 
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --text-white: #ffffff;
    --text-light: #cccccc;
    --text-mid: #999999;
    --text-dark: #666666;
    
    --hover-bg: rgba(255, 255, 255, 0.1);
    
    --status-online: #23a559;
    --status-idle: #f0b232;
    --status-dnd: #f23f43;
    --status-offline: #80848e;
    --spotify-green: #1DB954;

    --ui-scale: 1;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 🖱️ Added Custom Global Cursors */
body {
    background-color: #000; color: var(--text-light);
    font-family: 'Fira Code', monospace;
    overflow: hidden; height: 100vh; width: 100vw;
    cursor: url('cursor.png'), auto;
}

/* Fallbacks for hoverable items to use the pointer cursor */
a, button, .pointer, .kali-btn, .cmd-text.comment, .clickable-box, .pill-icon.hoverable, .context-item, .graph-bar {
    cursor: url('cursor-pointer.png'), pointer !important;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

#fluid-bg {
    position: fixed; top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1; background-color: #010101; 
}

/* --- Window Wrapper & Scaled Box --- */
.window-wrapper {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 1400px; max-width: 95vw; 
    height: 788px; max-height: 95vh;
    z-index: 10;
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                top 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                left 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.window-wrapper.dragging { transition: none !important; }
.window-wrapper.dragging iframe { pointer-events: none; }

.window-wrapper.maximized {
    top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    max-width: none; max-height: none; transform: none;
}
.window-wrapper.minimized { height: 45px !important; }

.window {
    width: 100%; height: 100%;
    font-size: 16px; 
    
    background-color: var(--window-bg);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    
    border: 1px solid rgba(0, 0, 0, 0.8); border-radius: 10px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05); 
    
    display: flex; flex-direction: column; overflow: hidden;
    position: relative;
    
    transform-origin: center center;
    transform: scale(var(--ui-scale));
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease, border-radius 0.4s ease;
                
    animation: window-intro 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.window-wrapper.maximized .window {
    border-radius: 0; border: none;
    transform: scale(1) !important; 
}

@keyframes window-intro {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(var(--ui-scale)); }
}

.window-inner { display: flex; flex-direction: column; flex-grow: 1; transition: opacity 0.2s ease; overflow: hidden; position: relative;}
.window-wrapper.minimized .window-inner { opacity: 0; pointer-events: none; }

.title-bar {
    min-height: 45px; height: 45px; background-color: transparent; 
    display: flex; justify-content: space-between; align-items: center;
    padding-left: 15px; user-select: none; position: relative; 
}
/* Title-bar now defaults to normal cursor unless actively grabbed */
.title-bar { cursor: url('cursor.png'), auto; } 
.title-bar:active { cursor: grabbing !important; }

.title-left { display: flex; align-items: center; gap: 12px; pointer-events: none; }
.win-icon { height: 22px; width: auto; object-fit: contain; }

.title-text { 
    position: absolute; left: 50%; transform: translateX(-50%);
    font-size: 1em; font-family: sans-serif; font-weight: bold; 
    color: var(--text-light); pointer-events: none; 
    transition: color 0.3s;
}

.window-controls { display: flex; align-items: center; gap: 8px; padding-right: 12px; }
.kali-btn {
    width: 26px; height: 26px; border-radius: 50%; border: none;
    display: flex; justify-content: center; align-items: center;
    font-size: 13px; background-color: transparent;
    color: var(--text-dark); transition: all 0.1s;
}
.kali-btn:hover { background-color: var(--hover-bg); color: var(--text-white); }
.kali-btn.close:hover { background-color: rgba(255, 255, 255, 0.2); }

.menu-bar { 
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 12px 6px 12px; font-family: sans-serif; 
    font-size: 1em; color: var(--text-light); 
}
.menu-left { display: flex; gap: 20px; padding: 0 10px; }
.menu-item { cursor: pointer; transition: color 0.2s;}
.menu-item:hover { color: var(--text-white); text-decoration: underline; text-underline-offset: 4px; }
.divider { height: 0; margin: 0 18px; border-top: 1px solid rgba(0, 0, 0, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

.tui-body { 
    flex-grow: 1; 
    padding: 18px 30px; 
    font-size: 1em; line-height: 1.6; overflow-y: auto; overflow-x: hidden;
}

.prompt-container {
    position: relative; display: flex; justify-content: space-between;
    align-items: flex-end; margin-bottom: 22px; min-height: 48px;
}

.render-hidden {
    opacity: 0 !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
}

.center-nav {
    position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
    display: flex; justify-content: center; align-items: center; width: 300px;
    height: 24px;
}

#made-with-love { transition: opacity 0.3s ease, transform 0.3s ease; }
#made-with-love.render-hidden { transform: translateY(12px); }

.grey-emoji { filter: grayscale(100%) opacity(0.85); display: inline-block; }

.kali-prompt { margin-bottom: 0; line-height: 1.4; transition: color 0.3s; }
.p-dark { color: var(--text-dark); font-weight: bold; }
.p-mid { color: var(--text-mid); font-weight: bold; }
.p-light { color: var(--text-light); font-weight: bold; transition: color 0.3s; }
.p-white { color: var(--text-white); font-weight: bold; }

.right-nav { display: flex; align-items: flex-end; }
.cmd-text { display: inline-block; transition: transform 0.2s ease, color 0.2s ease; white-space: pre; }
#left-cmd { transform-origin: left bottom; }
#right-cmd { transform-origin: right bottom; }

.cmd-text.active { color: var(--text-white); font-weight: bold; cursor: default; pointer-events: none; }
.cmd-text.comment { color: #5c6370; font-weight: 400; pointer-events: auto; }
.cmd-text.comment:hover { transform: scale(1.04); color: #8c93a1; }
.cmd-text.hidden { opacity: 0; display: none; }

.discord-purple { color: #5865F2; font-weight: bold; transition: opacity 0.2s; }
.discord-purple:hover { opacity: 0.8; }
.discord-purple-gradient {
    background: linear-gradient(90deg, #5865F2 0%, #9B59B6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: bold;
}
.comment-grey { color: #5c6370; font-weight: 400; font-size: 0.875em; } 
.baby-blue { color: #89CFF0; font-weight: bold; font-size: 0.875em; }
.ig-text { color: #e1306c; font-weight: bold; font-size: 0.875em; }
.ig-text-gradient {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: bold;
}
.center-text { text-align: center; }

.win-blue { color: #00A4EF; font-weight: bold; }
.py-yellow { color: #FFD43B; font-weight: bold; }
.hw-green { color: #00FF41; font-weight: bold; }
.hw-dull-green { color: #5F8575; font-weight: bold; } 
.wifi-blue { color: #1E90FF; font-weight: bold; }

.cursor { display: inline-block; width: 10px; animation: blink 1s step-end infinite; color: var(--text-white); }
@keyframes blink { 50% { opacity: 0; } }

.tui-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 18px; 
    transition: opacity 0.4s ease; 
}
.tui-grid.hidden { opacity: 0; pointer-events: none; display: none; }
.span-full { grid-column: 1 / -1; }

.tui-box {
    border: 1px solid var(--glass-border); 
    border-radius: 6px; 
    padding: 18px;
    background: rgba(0, 0, 0, 0.40); 
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tui-box:hover {
    border-color: rgba(255, 255, 255, 0.2); background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.3);
}
.tui-box legend { font-size: 1em; color: var(--text-dark); padding: 0 10px; margin-left: 10px; transition: 0.2s;}
.tui-box:hover legend { color: var(--text-light); }

.tui-input {
    background: rgba(0, 0, 0, 0.4); border: 1px solid var(--glass-border);
    color: var(--text-white); font-family: 'Fira Code', monospace;
    padding: 10px 12px; border-radius: 6px; width: 100%; outline: none;
    transition: all 0.2s ease; font-size: 0.875em; margin-top: 6px;
}
.tui-input:focus {
    border-color: rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}
.tui-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white); font-family: 'Fira Code', monospace;
    padding: 10px 20px; border-radius: 6px; cursor: pointer;
    transition: all 0.2s ease; font-weight: bold; display: flex; justify-content: center; gap: 8px; align-items: center;
}
.tui-btn:hover { background: rgba(255, 255, 255, 0.15); box-shadow: 0 4px 12px rgba(0,0,0,0.2); transform: translateY(-1px); }
.tui-btn:active { transform: translateY(1px); }

.ascii-slider-container {
    position: relative; display: inline-block;
    font-family: 'Fira Code', monospace; font-size: 1.1em;
    margin-top: 2px; transition: 0.2s;
    width: max-content;
}
.ascii-slider-text {
    display: inline-block; pointer-events: none;
    white-space: pre; letter-spacing: 2px;
}
.ascii-range {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0;
}
.ascii-slider-container:hover .ascii-slider-text {
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.ascii-checkbox::before {
    content: "[ ]"; color: var(--text-dark);
    font-family: 'Fira Code', monospace; font-size: 1.1em; display: inline-block; width: 34px;
}
.ascii-checkbox-input:checked + .ascii-checkbox::before {
    content: "[X]"; color: var(--text-white);
}
.flex-row.pointer:hover .ascii-checkbox::before { color: var(--text-light); }

.graph-container {
    display: flex; align-items: flex-end; justify-content: space-between;
    height: 232px; 
    gap: 10px; border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-top: 15px; padding-top: 20px;
}
.graph-bar-wrapper {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    flex: 1; height: 100%; gap: 6px;
}
.graph-bar {
    width: 100%; max-width: 35px;
    background-color: var(--text-dark);
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
    position: relative; 
}
.graph-bar:hover { background-color: var(--text-white); cursor: pointer; }
.graph-val {
    position: absolute;
    bottom: 100%; left: 50%; transform: translateX(-50%);
    margin-bottom: 4px; color: var(--text-light); font-size: 0.85em; font-weight: bold; pointer-events: none;
}
.graph-bar:hover .graph-val { color: var(--text-white); }
.graph-label { font-size: 0.75em; color: var(--text-dark); font-weight: bold; }

.tui-box.pointer:active { transform: scale(0.99); }
.clickable-box { border-radius: 6px; padding: 8px; margin: -8px; transition: background 0.2s;}
.clickable-box:hover { background: rgba(255, 255, 255, 0.05); }
.clickable-box:active { transform: scale(0.98); }

.box-content { height: 100%; }
.flex-row { display: flex; gap: 16px; align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: 8px; }
.gap-sm { gap: 4px; }
.gap-md { gap: 12px; }
.center { align-items: center; }

.inline-img { 
    width: 95px; height: 95px; border-radius: 50%; 
    border: 1px solid rgba(255,255,255,0.1); object-fit: cover; flex-shrink: 0; z-index: 1;
}
.inline-img-sm {
    width: 70px; height: 70px; border-radius: 6px; 
    border: 1px solid rgba(255,255,255,0.1); object-fit: cover; flex-shrink: 0; 
}
.avatar-wrapper { 
    position: relative; display: flex; justify-content: center;
    align-items: center; width: 95px; height: 95px; flex-shrink: 0; 
}

.ig-ring {
    position: absolute; inset: -6px; border-radius: 50%; padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude; z-index: 3; pointer-events: none;
}
.ig-dot-outline {
    position: absolute; bottom: -2px; right: -2px; width: 28px; height: 28px;
    background-color: #16161a; border-radius: 50%; z-index: 2;
}
.ig-dot-icon {
    position: absolute; bottom: 2px; right: 2px; width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white; font-size: 13px; display: flex; justify-content: center; align-items: center; z-index: 4;
}

.avatar-deco { position: absolute; top: -15%; left: -15%; width: 130%; height: 130%; z-index: 2; pointer-events: none; user-select: none; }
.status-dot {
    position: absolute; bottom: -2px; right: -2px; width: 28px; height: 28px; border: 4px solid #16161a; border-radius: 50%; 
    transition: background-color 0.3s; box-sizing: border-box; z-index: 3;
}
.status-dot.online { background-color: var(--status-online); }
.status-dot.idle { background-color: var(--status-idle); }
.status-dot.dnd { background-color: var(--status-dnd); }
.status-dot.offline { background-color: var(--status-offline); }

.white { color: var(--text-white); }
.muted { color: var(--text-dark); font-size: 0.875em;}
.font-bold { font-weight: 700; }
.spotify-green { color: var(--spotify-green); font-weight: bold; font-size: 0.8125em; }

.tui-file-row {
    position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center;
    padding: 8px 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03); text-decoration: none; color: var(--text-light); transition: all 0.2s ease;
}
.tui-file-row:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.file-info { display: flex; align-items: center; gap: 12px; }
.file-icon { font-size: 1em; width: 20px; text-align: center; }
.file-name { font-weight: 500; transition: color 0.2s; }
.tui-file-row:hover .file-name { color: var(--text-white); }
.file-meta { display: flex; align-items: center; gap: 16px; font-size: 0.875em; }
.file-size { width: 45px; text-align: right; }
.file-status { width: 60px; text-align: right; }
.bracket { color: var(--text-dark); transition: color 0.1s; }
.tui-file-row:hover .bracket { color: #fff; }
.perc-text { font-weight: 400; text-shadow: 0 0 5px rgba(0,0,0,0.3); }

.achievement-item {
    display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 6px;
    transition: background 0.2s; text-decoration: none;
}
.achievement-item:hover { background: rgba(255, 255, 255, 0.05); }
.achiev-img {
    width: 45px; height: 45px; object-fit: contain;
    transition: transform 0.2s ease; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3));
}
.achievement-item:hover .achiev-img { transform: scale(1.15) rotate(-2deg); }
.achiev-text { display: flex; flex-direction: column; }
.achiev-title { color: var(--text-light); font-weight: bold; font-size: 1em; transition: color 0.2s; }
.achievement-item:hover .achiev-title { color: var(--text-white); }
.achiev-sub { color: var(--text-dark); font-size: 0.875em; margin-top: 2px; }
.achievement-item.in-progress { opacity: 0.8; }
.achievement-item.in-progress:hover { background: rgba(255, 255, 255, 0.02); }
.achievement-item.in-progress .achiev-img { filter: drop-shadow(0 3px 6px rgba(0,0,0,0.3)) grayscale(85%); }
.achievement-item.in-progress:hover .achiev-img { transform: scale(1.03); }
.achievement-item.in-progress .achiev-title { color: #5c6370; font-weight: 300; }
.achievement-item.in-progress:hover .achiev-title { color: #8c93a1; }

.glass-pill-container {
    position: fixed; 
    bottom: 25px; 
    left: 50%; transform: translateX(-50%);
    z-index: 100; 
    display: flex; justify-content: center; pointer-events: none;
}
.glass-pill {
    background: rgba(18, 18, 20, 0.4);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px; padding: 6px 16px;
    display: flex; align-items: center; gap: 12px; pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}
.glass-pill:hover { background: rgba(30, 30, 35, 0.6); border-color: rgba(255, 255, 255, 0.2); }
.pill-icon { color: var(--text-light); display: flex; align-items: center; font-size: 1.1em; transition: 0.2s; }
.pill-icon.hoverable { color: var(--text-mid); }
.pill-icon.hoverable:hover { color: var(--text-white); transform: scale(1.1); text-shadow: 0 0 10px rgba(255,255,255,0.4); }
.pill-divider { height: 18px; width: 1px; background: rgba(255, 255, 255, 0.15); }

/* --- NEW: Custom Right Click Context Menu --- */
.context-menu {
    position: fixed;
    background: rgba(18, 18, 20, 0.85);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 0;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.context-menu.visible {
    opacity: 1;
    pointer-events: auto;
}
.context-item {
    padding: 8px 16px;
    color: var(--text-light);
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
    display: flex; gap: 10px; align-items: center;
}
.context-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
}

.window-wrapper.closing .window { animation: crt-off 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes crt-off {
    0% { transform: scale(var(--ui-scale)); opacity: 1; }
    50% { transform: scale(var(--ui-scale), 0.01); opacity: 1; }
    100% { transform: scale(0, 0); opacity: 0; }
}
#termination-screen {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    text-align: center; font-family: 'Fira Code', monospace; color: var(--text-white);
    opacity: 0; transition: opacity 0.5s ease;
}
#termination-screen.visible { opacity: 1; }

@media (max-width: 1300px) { .tui-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .tui-grid { grid-template-columns: 1fr; } }

/* 🖱️ Custom Global Cursors */
body {
    background-color: #000; color: var(--text-light);
    font-family: 'Fira Code', monospace;
    overflow: hidden; height: 100vh; width: 100vw;
    
    /* Point to your new smaller PNG */
    cursor: url('cursor.png'), auto; 
}

/* Fallbacks for hoverable items to use the custom pointing hand */
a, button, .pointer, .kali-btn, .cmd-text.comment, .clickable-box, .pill-icon.hoverable, .context-item, .graph-bar {
    
    /* Point to your new smaller pointing PNG */
    cursor: url('pointer.png'), pointer !important;
}