/* Global Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tahoma', sans-serif;
    user-select: none;
}

body {
    overflow: hidden;
    background-color: #000;
}

/* Desktop Environment */
.desktop {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" viewBox="0 0 1920 1080"><defs><linearGradient id="a" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="%23256AC4"/><stop offset="100%" stop-color="%2328A6DE"/></linearGradient></defs><rect width="1920" height="1080" fill="url(%23a)"/><path d="M0,1080 C480,880 960,800 1440,840 C1630,857 1810,914 1920,1030 L1920,1080 L0,1080 Z" fill="%23107C10" opacity="0.7"/></svg>');
    background-size: cover;
    background-position: center;
    color: #000;
    overflow: hidden;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 80px;
    padding: 5px;
    cursor: pointer;
}

.desktop-icon:hover {
    background-color: rgba(49, 106, 197, 0.1);
}

.desktop-icon span {
    color: white;
    font-size: 11px;
    margin-top: 5px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.desktop-icon .icon {
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.4));
}

/* Taskbar */
.taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, #2584CF 0%, #1B5891 9%, #1563AE 18%, #155FAA 100%);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    padding-right: 5px;
}

.start-button {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 10px;
    margin-right: 10px;
    background: linear-gradient(to bottom, #3C8F3C 0%, #276C27 45%, #1B531B 46%, #1B531B 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0;
    border-right: 1px solid #68C168;
}

.start-button:hover {
    background: linear-gradient(to bottom, #45A345 0%, #318231 45%, #216B21 46%, #216B21 100%);
}

.start-logo {
    margin-right: 5px;
}

.start-button span {
    font-size: 14px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.taskbar-divider {
    width: 1px;
    height: 80%;
    background: linear-gradient(to bottom, #1B5891 0%, #5faaff 50%, #1563AE 100%);
    margin: 0 5px;
}

.open-windows {
    display: flex;
    height: 100%;
    flex-grow: 1;
}

.taskbar-item {
    display: flex;
    align-items: center;
    padding: 0 8px;
    height: 100%;
    background: linear-gradient(to bottom, #3A8BE9 0%, #3373B5 45%, #215186 46%, #215186 100%);
    margin-right: 3px;
    color: white;
    font-size: 11px;
    min-width: 120px;
    max-width: 200px;
    cursor: pointer;
    border-radius: 1px;
}

.taskbar-item.active {
    background: linear-gradient(to bottom, #4BA5FF 0%, #3D90DA 45%, #3880C5 46%, #3880C5 100%);
}

.taskbar-item:hover:not(.active) {
    background: linear-gradient(to bottom, #4599F7 0%, #3A85D9 45%, #2B6EB0 46%, #2B6EB0 100%);
}

.system-tray {
    display: flex;
    align-items: center;
    padding: 0 10px;
    height: 100%;
    background: linear-gradient(to bottom, #2279C3 0%, #1A62A9 45%, #155CA3 46%, #155CA3 100%);
    border-left: 1px solid #104886;
}

.clock {
    color: white;
    font-size: 11px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Start Menu */
.start-menu {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 380px;
    background-color: #ECE9D8;
    border: 1px solid #0A246A;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    display: none;
}

.start-menu-header {
    background: linear-gradient(to right, #215DC6 0%, #2C8CEE 100%);
    padding: 10px;
    height: 60px;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
    border: 2px solid white;
}

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

.start-menu-content {
    display: flex;
    height: 350px;
}

.start-menu-left {
    width: 200px;
    background-color: white;
    padding: 8px 0;
    border-right: 1px solid #BDBDBD;
}

.start-menu-right {
    flex-grow: 1;
    padding: 8px 0;
}

.start-menu-item {
    display: flex;
    align-items: center;
    padding: 5px 15px;
    font-size: 11px;
    cursor: pointer;
}

.start-menu-item:hover {
    background-color: #2C71B8;
    color: white;
}

.start-menu-item .icon {
    margin-right: 8px;
}

.start-menu-item.pinned {
    padding: 8px 15px;
    margin-bottom: 2px;
}

.divider {
    height: 1px;
    background-color: #BDBDBD;
    margin: 6px 0;
}

/* Window */
.window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 550px;
    background-color: #ECE9D8;
    border: 1px solid #0A246A;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    min-width: 400px;
    min-height: 300px;
}

.window-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 2px 2px 8px;
    background: linear-gradient(to right, #0A246A 0%, #A6CAF0 100%);
    color: white;
    height: 22px;
}

.window-title {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.window-title .icon {
    margin-right: 5px;
}

.window-controls {
    display: flex;
}

.window-button {
    width: 22px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid white;
    margin-left: 2px;
    font-size: 10px;
    cursor: pointer;
    background: linear-gradient(to bottom, #EBEBEB 0%, #DDDDDD 47%, #CFCFCF 48%, #CFCFCF 100%);
    color: #000;
}

.window-button:hover {
    background: linear-gradient(to bottom, #F5F5F5 0%, #EAEAEA 47%, #DADADA 48%, #DADADA 100%);
}

.window-button.close {
    font-weight: bold;
    font-size: 12px;
}

.window-button.close:hover {
    background: #E81123;
    color: white;
}

.window-toolbar {
    display: flex;
    height: 22px;
    background-color: #ECE9D8;
    border-bottom: 1px solid #D8D2BD;
}

.toolbar-item {
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
}

.toolbar-item:hover {
    background-color: #DAD8C8;
}

.address-bar {
    display: flex;
    align-items: center;
    padding: 2px 8px;
    background-color: #ECE9D8;
    border-bottom: 1px solid #D8D2BD;
    height: 22px;
}

.address-text {
    font-size: 11px;
    margin-right: 5px;
}

.address-input {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: white;
    border: 1px solid #7F9DB9;
    padding: 0 5px;
    height: 18px;
    font-size: 11px;
}

.mini-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
    border-radius: 2px;
}

.go-button {
    margin-left: 5px;
    padding: 0 8px;
    height: 18px;
    background: linear-gradient(to bottom, #EBEBEB 0%, #DDDDDD 47%, #CFCFCF 48%, #CFCFCF 100%);
    border: 1px solid #7F9DB9;
    font-size: 11px;
    cursor: pointer;
}

.go-button:hover {
    background: linear-gradient(to bottom, #F5F5F5 0%, #EAEAEA 47%, #DADADA 48%, #DADADA 100%);
}

.window-content {
    flex-grow: 1;
    display: flex;
    background-color: white;
    overflow: hidden;
}

.explorer-sidebar {
    width: 180px;
    background-color: #ECE9D8;
    border-right: 1px solid #D8D2BD;
    padding: 10px 0;
}

.sidebar-section {
    margin-bottom: 15px;
}

.sidebar-header {
    font-weight: bold;
    color: #003399;
    padding: 2px 10px;
    font-size: 11px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.sidebar-item:hover {
    background-color: #DAD8C8;
}

.sidebar-item .icon {
    margin-right: 5px;
}

.explorer-main {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
}

.window-statusbar {
    height: 22px;
    background-color: #ECE9D8;
    border-top: 1px solid #D8D2BD;
    padding: 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.status-right {
    display: flex;
}

.status-item {
    margin-left: 10px;
}

/* Profile Section */
.profile-header {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #D8D2BD;
    margin-bottom: 15px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    border: 1px solid #7F9DB9;
    margin-right: 20px;
}

.profile-info {
    flex-grow: 1;
}

.profile-name {
    color: #003399;
    font-size: 18px;
    margin-bottom: 5px;
}

.profile-bio {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.profile-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: bold;
    color: #003399;
    font-size: 14px;
}

.stat-label {
    font-size: 11px;
    color: #666;
}

.follow-button {
    padding: 3px 15px;
    background: linear-gradient(to bottom, #2584CF 0%, #1563AE 100%);
    color: white;
    border: 1px solid #0A246A;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
}

.follow-button:hover {
    background: linear-gradient(to bottom, #3A8BE9 0%, #215186 100%);
}

.section-tabs {
    display: flex;
    border-bottom: 1px solid #D8D2BD;
    margin-bottom: 15px;
}

.tab {
    padding: 5px 15px;
    font-size: 12px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-bottom: -1px;
    background-color: #ECE9D8;
}

.tab.active {
    background-color: white;
    border-color: #D8D2BD;
    border-bottom-color: white;
}

.tab-content {
    position: relative;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.project-card {
    display: flex;
    flex-direction: column;
    background-color: white;
    border: 1px solid #D8D2BD;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.project-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-bottom: 1px solid #D8D2BD;
    background-color: #f0f0f0;
}

.project-info {
    padding: 8px;
}

.project-title {
    font-size: 11px;
    font-weight: bold;
    color: #003399;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-creator {
    font-size: 10px;
    color: #666;
    display: flex;
    align-items: center;
}

.project-creator-avatar {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    margin-right: 5px;
}

.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-size: 12px;
}

.xp-loader {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message */
.error-message {
    padding: 10px;
    background-color: #FEEFB3;
    color: #9F6000;
    border: 1px solid #D8D2BD;
    margin: 15px 0;
    font-size: 11px;
    display: flex;
    align-items: center;
}

.error-message svg {
    margin-right: 10px;
    min-width: 16px;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    font-size: 12px;
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    color: #1D5EBF;
}

/* Dialog Boxes */
.dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ECE9D8;
    border: 1px solid #0A246A;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    width: 300px;
    display: none;
}

.dialog-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 2px 2px 8px;
    background: linear-gradient(to right, #0A246A 0%, #A6CAF0 100%);
    color: white;
    height: 22px;
}

.dialog-title {
    font-weight: bold;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

.dialog-content {
    padding: 15px;
    display: flex;
    align-items: center;
}

.dialog-icon {
    margin-right: 15px;
}

.dialog-message {
    font-size: 11px;
}

.dialog-buttons {
    display: flex;
    justify-content: flex-end;
    padding: 0 15px 15px;
    gap: 10px;
}

.dialog-button {
    padding: 3px 15px;
    background: linear-gradient(to bottom, #EBEBEB 0%, #DDDDDD 47%, #CFCFCF 48%, #CFCFCF 100%);
    border: 1px solid #7F9DB9;
    font-size: 11px;
    cursor: pointer;
}

.dialog-button:hover {
    background: linear-gradient(to bottom, #F5F5F5 0%, #EAEAEA 47%, #DADADA 48%, #DADADA 100%);
}

.dialog-button.primary {
    background: linear-gradient(to bottom, #2584CF 0%, #1563AE 100%);
    color: white;
    border: 1px solid #0A246A;
}

.dialog-button.primary:hover {
    background: linear-gradient(to bottom, #3A8BE9 0%, #215186 100%);
}

