:root {
    --bg-wallpaper: url('/newmoban/_external/demo.mobanwang.com/mb/lo202602/202602080/html/images/photo-1550684848-fac1c5b4e853.jpg'); /* Abstract fluid gradient */
    --dock-bg: rgba(255, 255, 255, 0.2);
    --window-bg: rgba(255, 255, 255, 0.95);
    --top-bar-bg: rgba(0, 0, 0, 0.2);
    --top-bar-text: #fff;
    --accent-color: #007aff;
    --text-color: #333;
    --glass-blur: blur(15px);
}

[data-theme="dark"] {
    --dock-bg: rgba(0, 0, 0, 0.4);
    --window-bg: rgba(30, 30, 30, 0.95);
    --top-bar-bg: rgba(0, 0, 0, 0.5);
    --text-color: #eee;
}

[data-theme="dark"] .window-header {
    background: #333;
    border-bottom: 1px solid #444;
    color: #eee;
}

[data-theme="dark"] .window-title {
    color: #ccc;
}

[data-theme="dark"] .project-card, 
[data-theme="dark"] .service-card,
[data-theme="dark"] .review-card {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #eee;
}

[data-theme="dark"] .contact-form-container input,
[data-theme="dark"] .contact-form-container textarea {
    background: #333;
    border: 1px solid #555;
    color: #fff;
}

[data-theme="dark"] .tags span {
    background: #444;
    color: #eee;
}

[data-theme="dark"] .context-menu {
    background: rgba(30, 30, 30, 0.9);
    color: #eee;
}

[data-theme="dark"] .context-menu li {
    color: #eee;
}

[data-theme="dark"] .context-menu .separator {
    background: #555;
}

[data-theme="dark"] .dock-item {
     background: linear-gradient(135deg, #444 0%, #222 100%);
}

[data-theme="dark"] .dock-item i {
    color: #eee !important;
}

[data-theme="dark"] .dock-dot {
    background: #fff;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none; /* Desktop feel */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-image: var(--bg-wallpaper);
    background-size: cover;
    background-position: center;
    color: var(--text-color);
    transition: background-image 0.5s ease-in-out;
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1s ease-in-out 2s forwards;
}

#boot-screen .fa-apple {
    font-size: 80px;
    margin-bottom: 40px;
}

.loading-bar {
    width: 200px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background: #fff;
    animation: loadProgress 2s ease-out forwards;
}

@keyframes loadProgress {
    to { width: 100%; }
}

@keyframes fadeOut {
    to { opacity: 0; visibility: hidden; }
}

/* Top Bar */
#top-bar {
    height: 30px;
    background: var(--top-bar-bg);
    backdrop-filter: var(--glass-blur);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: var(--top-bar-text);
    font-size: 14px;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;
}

.top-bar-left, .top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-item {
    cursor: pointer;
}

.apple-logo {
    font-size: 16px;
}

.app-name {
    font-weight: 600;
}

.menus {
    list-style: none;
    display: flex;
    gap: 15px;
}

.menus li {
    cursor: pointer;
    opacity: 0.9;
}

.menus li:hover {
    opacity: 1;
}

/* Desktop Icons */
#desktop-icons {
    padding: 50px 20px;
    /* Use grid or absolute for better positioning, keeping flex for now but could be improved */
    display: flex; 
    flex-direction: column;
    gap: 20px;
    flex-wrap: wrap;
    height: calc(100vh - 80px);
    width: fit-content;
    position: absolute; /* Changed to allow drag */
    top: 30px;
    left: 0;
}

.desktop-icon {
    width: 80px;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 5px;
    transition: background 0.2s, transform 0.1s; /* Faster transform for drag */
    position: relative; /* For dragging if we use left/top */
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.desktop-icon:active {
    background: rgba(255, 255, 255, 0.3);
}

.icon-img {
    font-size: 40px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
}

.folder-icon { color: #54a0ff; }
.code-icon { color: #ff9f43; }
.file-icon { color: #ff6b6b; }
.mail-icon { color: #1dd1a1; }
.terminal-icon { color: #333; text-shadow: 0 0 2px #fff; }
.services-icon { color: #8e44ad; }
.testimonials-icon { color: #f1c40f; }

.icon-label {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    font-size: 13px;
    font-weight: 500;
}

/* Context Menu */
.context-menu {
    display: none;
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 200px;
    z-index: 9999;
    padding: 5px 0;
}

.context-menu ul {
    list-style: none;
}

.context-menu li {
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.context-menu li:hover {
    background: var(--accent-color);
    color: #fff;
}

.context-menu .separator {
    height: 1px;
    background: #ddd;
    margin: 5px 0;
    padding: 0;
}

.context-menu .separator:hover {
    background: #ddd;
}

/* Status Menus */
.status-menu {
    display: none;
    position: absolute;
    top: 35px;
    right: 10px; /* Default positioning, adjusted by JS */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: 280px;
    z-index: 10000;
    padding: 10px;
    font-size: 13px;
    color: #333;
    border: 1px solid rgba(255,255,255,0.3);
}

.menu-header {
    font-weight: 600;
    padding: 5px 10px;
    color: #555;
    margin-bottom: 5px;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 5px;
    align-items: center;
}

.menu-item.hoverable:hover {
    background: var(--accent-color);
    color: #fff;
    cursor: pointer;
}

.menu-item.active-network {
    color: var(--accent-color);
    font-weight: 500;
}

.menu-item.hoverable:hover .active-network {
    color: #fff;
}

.menu-item .label {
    color: #666;
}

.menu-item .value {
    font-weight: 500;
}

.menu-item .value.success {
    color: #2e7d32;
}

.menu-details {
    padding: 5px 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.detail-row .label {
    color: #666;
}

.detail-row .value {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.separator {
    height: 1px;
    background: #ddd;
    margin: 8px 0;
}

/* Dark Mode Support for Status Menus */
[data-theme="dark"] .status-menu {
    background: rgba(30, 30, 30, 0.9);
    color: #eee;
    border: 1px solid #444;
}

[data-theme="dark"] .menu-header {
    color: #ccc;
}

[data-theme="dark"] .menu-item .label,
[data-theme="dark"] .detail-row .label {
    color: #aaa;
}

[data-theme="dark"] .separator {
    background: #555;
}

[data-theme="dark"] .menu-item.active-network {
    color: #64b5f6; /* Lighter blue for dark mode */
}

/* Windows */
#windows-container {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: calc(100% - 30px);
    pointer-events: none; /* Let clicks pass through to icons if no window */
}

.window {
    position: absolute;
    background: var(--window-bg);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    min-width: 300px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    animation: openWindow 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
    resize: both;
}

@keyframes openWindow {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.window-header {
    height: 30px;
    background: #f1f1f1; /* Light grey header */
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: default; /* Handle drag here */
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.close { background: #ff5f56; border: 1px solid #e0443e; }
.minimize { background: #ffbd2e; border: 1px solid #dea123; }
.maximize { background: #27c93f; border: 1px solid #1aab29; }

.window-title {
    flex-grow: 1;
    text-align: center;
    font-size: 13px;
    color: #555;
    margin-right: 50px; /* Balance controls */
}

.window-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    user-select: text;
}

/* Terminal Styles */
#window-terminal {
    background: rgba(0, 0, 0, 0.9);
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
}

#window-terminal .window-header {
    background: #333;
    border-bottom: 1px solid #444;
}

#window-terminal .window-title {
    color: #ccc;
}

.terminal-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 5px;
}

#terminal-output p {
    margin: 0;
    line-height: 1.5;
}

.terminal-input-line {
    display: flex;
}

.prompt {
    color: #0f0;
    margin-right: 10px;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    flex-grow: 1;
    outline: none;
}


/* Content Styles */
.window-content-inner {
    text-align: center;
}

.profile-pic {
    color: #555;
    margin-bottom: 15px;
}

/* Enhanced Profile Styles */
.profile-content {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

.profile-header-wide {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.profile-pic-large {
    font-size: 80px;
    color: #555;
}

.profile-info h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.role {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge i {
    font-size: 8px;
}

.profile-section {
    margin-bottom: 30px;
}

.profile-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

[data-theme="dark"] .profile-section h3,
[data-theme="dark"] .profile-info h2,
[data-theme="dark"] .profile-pic-large {
    color: #eee;
}

.timeline {
    border-left: 2px solid #ddd;
    padding-left: 20px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.time {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    text-align: center;
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 32px;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 16px;
}

.service-card p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.price {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

/* Testimonials */
.reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.review-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    text-align: left;
}

.stars {
    color: #f1c40f;
    margin-bottom: 10px;
}

.review-text {
    font-style: italic;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #555;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-avatar {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
}

.tags span {
    display: inline-block;
    background: #e1e1e1;
    padding: 5px 10px;
    border-radius: 15px;
    margin: 5px;
    font-size: 12px;
}

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

.project-card {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 80px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.contact-form-container input, 
.contact-form-container textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.social-links {
    margin-top: 20px;
    font-size: 24px;
    gap: 15px;
    display: flex;
    justify-content: center;
    color: #555;
}

/* Dock */
#dock-container {
    position: absolute;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 1000;
}

.dock {
    background: var(--dock-bg);
    backdrop-filter: var(--glass-blur);
    padding: 10px 15px;
    border-radius: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s;
}

.dock-item {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* For dot */
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.dock-item i {
    z-index: 2;
}

.dock-dot {
    width: 4px;
    height: 4px;
    background: #333; /* Dark dot on light icon */
    border-radius: 50%;
    position: absolute;
    bottom: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.dock-item.active .dock-dot {
    opacity: 1;
}

.dock-item:hover {
    transform: scale(1.2) translateY(-10px);
    margin: 0 10px; /* Space out neighbors slightly */
}

/* Tooltip for Dock */
.dock-item:hover::after {
    content: attr(title);
    position: absolute;
    top: -35px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
}

.dock-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    margin: 0 5px;
    align-self: center;
}

/* Specific Dock Icons */
.dock-item:nth-child(1) { color: #54a0ff; } /* Finder */
.dock-item:nth-child(2) { color: #ff9f43; } /* Projects */
.dock-item:nth-child(3) { color: #1dd1a1; } /* Mail */
.dock-item:nth-child(4) { color: #007aff; } /* Safari */
.dock-item:nth-child(5) { color: #333; } /* Terminal */
.dock-item:nth-child(6) { color: #8e44ad; } /* Services */
.dock-item:nth-child(7) { color: #f1c40f; } /* Reviews */

/* Responsive */
@media (max-width: 768px) {
    #desktop-icons {
        flex-direction: row;
        height: auto;
        padding: 50px 10px;
    }
    
    .dock {
        padding: 8px;
        gap: 8px;
        margin-bottom: 0;
        border-radius: 0;
        width: 100%;
        bottom: 0;
        border-radius: 15px 15px 0 0;
    }

    .dock-item {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .window {
        width: 90% !important;
        height: 80% !important;
        top: 40px !important;
        left: 5% !important;
    }
    
    .menus {
        display: none; /* Hide menus on mobile */
    }
}
