body {
    font-family: 'Segoe UI', 'Tahoma', sans-serif;
    font-size: 14px;
    user-select: none;
    background-color: #1a1a1a;
    overflow: hidden;
}

.desktop {
    background-size: cover;
    background-position: center;
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    transition: background-image 1s ease-in-out;
}

.wallpaper-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    color: white;
    font-size: 5rem;
    font-weight: bold;
    z-index: 2000;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.wallpaper-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.taskbar {
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 48px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.start-button {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.start-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.icon {
    width: 108px;
    /* Increased from 90px */
    height: 108px;
    /* Increased from 90px */
    text-align: center;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: absolute;
}

.icon p {
    word-break: break-word;
    font-size: 12px;
    /* Reduced from default */
}

.icon:focus {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    outline: none;
}

.icon svg,
.folder-icon svg {
    width: 58px;
    /* Increased from 48px */
    height: 58px;
    /* Increased from 48px */
    margin: 0 auto 4px auto;
}

.window {
    position: absolute;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    resize: both;
    overflow: hidden;
    min-width: 350px;
    min-height: 250px;
    transition: box-shadow 0.2s, background-color 0.3s, top 0.2s ease-out, left 0.2s ease-out, width 0.2s ease-out, height 0.2s ease-out;
}

.window.hidden {
    display: none;
}

.window.active {
    z-index: 999;
}

.title-bar {
    padding: 4px 4px 4px 12px;
    font-weight: 600;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: background-color 0.3s;
}

.dark-theme .window {
    background: rgba(40, 40, 40, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color: #f0f0f0;
}

.dark-theme .title-bar {
    background: rgba(60, 60, 60, 0.9);
    color: #f0f0f0;
}

.dark-theme .window.active .title-bar {
    background: rgba(80, 80, 80, 0.95);
}

.dark-theme .title-bar-buttons button {
    color: #f0f0f0;
}

.dark-theme .title-bar-buttons button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.dark-theme .title-bar-buttons button.close-btn:hover {
    background: #e81123;
    color: white;
}

.dark-theme .folder-icon {
    color: #f0f0f0;
}

.dark-theme .folder-icon:hover {
    background: rgba(0, 120, 215, 0.2);
}

.dark-theme .folder-icon:focus {
    background: rgba(0, 120, 215, 0.3);
    border: 1px solid rgba(0, 120, 215, 0.6);
}

.dark-theme .text-viewer-body,
.dark-theme .settings-body {
    color: #f0f0f0;
}

.dark-theme .start-menu {
    background: rgba(40, 40, 40, 0.9);
    color: #f0f0f0;
}

.dark-theme .start-menu-item:hover {
    background: rgba(0, 120, 215, 0.2);
}

.dark-theme .address-bar,
.dark-theme select {
    background-color: #333;
    color: #f0f0f0;
    border: 1px solid #555;
}

.dark-theme .breadcrumb-part:hover {
    background-color: rgba(0, 120, 215, 0.3);
}

.dark-theme .breadcrumb-separator {
    color: #aaa;
}

.light-theme .window {
    background: rgba(243, 243, 243, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: #1a1a1a;
}

.light-theme .title-bar {
    background: rgba(229, 229, 229, 0.9);
    color: #1a1a1a;
}

.light-theme .window.active .title-bar {
    background: rgba(255, 255, 255, 0.95);
}

.light-theme .title-bar-buttons button {
    color: #1a1a1a;
}

.light-theme .title-bar-buttons button:hover {
    background: rgba(0, 0, 0, 0.1);
}

.light-theme .title-bar-buttons button.close-btn:hover {
    background: #e81123;
    color: white;
}

.light-theme .folder-icon {
    color: #1a1a1a;
}

.light-theme .folder-icon:hover {
    background: rgba(0, 120, 215, 0.1);
}

.light-theme .folder-icon:focus {
    background: rgba(0, 120, 215, 0.2);
    border: 1px solid rgba(0, 120, 215, 0.5);
}

.light-theme .text-viewer-body,
.light-theme .settings-body {
    color: #1a1a1a;
}

.light-theme .start-menu {
    background: rgba(243, 243, 243, 0.9);
    color: #1a1a1a;
}

.light-theme .start-menu-item:hover {
    background: rgba(0, 120, 215, 0.1);
}

.light-theme .address-bar,
.light-theme select {
    background-color: #fff;
    color: #1a1a1a;
    border: 1px solid #ccc;
}

.light-theme .breadcrumb-part:hover {
    background-color: rgba(0, 120, 215, 0.2);
}

.light-theme .breadcrumb-separator {
    color: #666;
}

.title-bar-buttons button {
    width: 40px;
    height: 32px;
    background: transparent;
    border: none;
    font-weight: normal;
    font-size: 16px;
    line-height: 32px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.window-body {
    flex-grow: 1;
    padding: 10px;
    background: transparent;
    overflow-y: auto;
}

.folder-container {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 10px;
}

.folder-icon {
    width: 85px;
    min-height: 85px;
    text-align: center;
    cursor: pointer;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.folder-icon p {
    font-size: 12px;
    line-height: 1.3;
    word-break: break-word;
}

.toolbar {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.toolbar button {
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: inherit;
}

.toolbar button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.address-bar {
    flex-grow: 1;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    /* Prevents the items from wrapping to the next line */
    overflow-x: auto;
    /* Adds a horizontal scrollbar ONLY if needed */
}

.breadcrumb-part {
    cursor: pointer;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.text-viewer-body {
    font-family: 'Consolas', 'Courier New', monospace;
    white-space: pre-wrap;
    padding: 15px;
    font-size: 13px;
}

.image-viewer-body {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-viewer-body img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.game-viewer-body {
    flex-grow: 1;
    overflow: hidden;
    min-height: 0;
}

.game-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.start-menu {
    position: absolute;
    bottom: 56px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 600px;
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 1100;
}

.start-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
}

.start-menu-item {
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.text-xl {
    font-size: 1.25rem;
}

.font-semibold {
    font-weight: 600;
}

.mb-4 {
    margin-bottom: 1rem;
}

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

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.text-white {
    color: white;
}

.cursor-pointer {
    cursor: pointer;
}

.settings-body {
    padding: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-item label {
    font-weight: 600;
}

.setting-item select {
    padding: 5px;
    border-radius: 4px;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 48px) !important;
    border-radius: 0;
    resize: none;
}

.taskbar-apps {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 4px;
    padding-left: 10px;
}

.taskbar-app {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0 15px;
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    border-bottom: 2px solid #0078D4;
    transition: background-color 0.2s;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.taskbar-app:hover {
    background: rgba(255, 255, 255, 0.2);
}