* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #0f172a;
}

#desktop {
    width: 100vw;
    height: calc(100vh - 40px);
    background-image: url('BG.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 2400px auto;
    background-color: #0f172a;
    position: relative;
    padding: 20px;
}

/* Top Bar */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.os-logo {
    font-weight: bold;
    color: #38bdf8;
}

.menu-item {
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Desktop Grid Icons */
#desktop-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 15px;
    align-content: flex-start;
    margin-top: 20px;
    max-height: calc(100vh - 80px);
    width: auto;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    text-align: center;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

.desktop-icon .folder-icon {
    font-size: 34px;
    color: #38bdf8;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.desktop-icon span {
    color: #f8fafc;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    word-break: break-word;
    line-height: 1.2;
}

/* OS Windows - Tripled spacious default size */
.os-window {
    position: absolute;
    width: 950px;
    height: 700px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.os-window.minimized {
    display: none !important;
}

.window-header {
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-header:active {
    cursor: grabbing;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.window-controls span {
    cursor: pointer;
    padding: 0 6px;
    font-weight: bold;
    color: #94a3b8;
    transition: color 0.2s;
}

.window-controls span:hover {
    color: #f8fafc;
}

.window-controls .close:hover {
    color: #ef4444;
}

.window-body {
    padding: 24px;
    color: #cbd5e1;
    overflow-y: auto;
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.6;
}

.window-body h2, .window-body h3 {
    color: #f8fafc;
    margin-bottom: 8px;
}

.window-body .subtitle {
    color: #38bdf8;
    margin-bottom: 10px;
}

.window-body ul {
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 10px;
}

.window-body hr {
    border: 0;
    border-top: 1px solid #334155;
    margin: 18px 0;
}

.window-body a {
    color: #38bdf8;
    text-decoration: none;
}

.window-body a:hover {
    text-decoration: underline;
}

/* About Window Custom Layout & Clean Icon Links */
.about-top-container {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 15px;
}

.profile-pic {
    width: 130px;
    height: 130px;
    min-width: 130px;
    max-width: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%; /* Centers head and prevents hitting the top edge */
    border: 3px solid #38bdf8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.action-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
    font-size: 14px;
}

.action-links a {
    color: #38bdf8;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.action-links a:hover {
    text-decoration: underline;
}

.action-links .separator {
    color: #475569;
}

/* Terminal Styles */
.terminal-body {
    background: #090d16;
    color: #22c55e;
    font-family: 'Courier New', Courier, monospace;
}

#terminal-output {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #22c55e;
    outline: none;
    font-family: 'Courier New', Courier, monospace;
    flex-grow: 1;
    font-size: 14px;
}

.highlight {
    color: #38bdf8;
    font-weight: bold;
}

/* Taskbar */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
    z-index: 9999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.taskbar-start {
    background: #0284c7;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.taskbar-start:hover {
    background: #0ea5e9;
}

.taskbar-apps {
    display: flex;
    gap: 5px;
}

.taskbar-app-chip {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.taskbar-app-chip:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Start Menu */
#start-menu {
    position: fixed;
    bottom: 45px;
    left: 10px;
    width: 280px;
    max-height: 480px;
    overflow-y: auto;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 10000;
    color: #f8fafc;
}

#start-menu.hidden {
    display: none;
}

.start-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.start-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    border: 2px solid #38bdf8;
}

.start-items {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #cbd5e1;
}

.start-items:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
