/* Custom styles to complement XP.css */
body {
    background: linear-gradient(to bottom, #0080ff 0%, #005ce6 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.desktop {
    min-height: 100vh;
    padding-bottom: 40px;
    position: relative;
}

/* Desktop Icons */
.desktop-icon {
    position: absolute;
    width: 80px;
    text-align: center;
    cursor: pointer;
    padding: 5px;
    border-radius: 2px;
    user-select: none;
    transition: background-color 0.2s;
}

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

.desktop-icon.selected {
    background-color: rgba(0, 0, 255, 0.3);
}

.icon-image {
    font-size: 32px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-image img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.icon-label {
    color: white;
    font-size: 11px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
}

#welcome-icon {
    top: 20px;
    left: 20px;
}

#portfolio-icon {
    top: 20px;
    left: 120px;
}

#email-icon {
    top: 20px;
    left: 220px;
}

#pinball-icon {
    top: 20px;
    left: 320px;
}

#paint-icon {
    top: 20px;
    left: 420px;
}

#minesweeper-icon {
    top: 20px;
    left: 520px;
}

/* Windows - XP.css handles most styling, we just add positioning and visibility */
.window {
    position: absolute;
    min-width: 300px;
    min-height: 200px;
    max-width: 90%;
    display: none;
    z-index: 10;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    resize: both;
    overflow: hidden;
}

.window.active {
    display: block;
}

.title-bar {
    cursor: move;
    user-select: none;
}

/* Content Styling */
.content-header {
    text-align: center;
    margin-bottom: 30px;
}

.photo-frame {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    border: 3px solid;
    border-top-color: #808080;
    border-left-color: #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
    padding: 4px;
    background: #c0c0c0;
    box-shadow: inset 0 0 0 2px #c0c0c0, 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: inline-block;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
}

.content-header h1 {
    font-size: 28px;
    color: #000080;
    margin-bottom: 10px;
}

.highlight {
    color: #0080ff;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

.content-body {
    max-width: 600px;
    margin: 0 auto;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    font-size: 18px;
    color: #000080;
    margin-bottom: 15px;
    border-bottom: 2px solid #c0c0c0;
    padding-bottom: 5px;
}

.section p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Button Group - XP.css handles button styling */
.button-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
}

.button-group a {
    text-decoration: none;
    display: block;
}

.button-group button {
    flex: 1;
    min-width: 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    box-sizing: border-box;
}

.button-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.button-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.portfolio-item {
    background: white;
    border: 2px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
}

.portfolio-item:hover {
    background: #f0f0f0;
    border-top-color: #808080;
    border-left-color: #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.portfolio-image {
    font-size: 48px;
    margin-bottom: 10px;
}

.portfolio-item h3 {
    font-size: 14px;
    color: #000080;
    margin-bottom: 8px;
}

.portfolio-item p {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
}

/* Project Detail Windows - fixed height with internal scroll */
.project-window {
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.project-window .window-body {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.project-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-main-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    border: 2px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    display: block;
}

.project-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-thumbnail {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border: 2px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    cursor: pointer;
    transition: opacity 0.2s;
}

.project-thumbnail:hover {
    opacity: 0.8;
}

.project-info h2 {
    font-size: 24px;
    color: #000080;
    margin-bottom: 15px;
}

.project-description {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 20px;
}

.project-details {
    margin-top: 20px;
}

.project-details h3 {
    font-size: 18px;
    color: #000080;
    margin-bottom: 10px;
    border-bottom: 2px solid #c0c0c0;
    padding-bottom: 5px;
}

.project-details ul {
    list-style: none;
    padding-left: 0;
}

.project-details li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #333;
    font-size: 13px;
}

.project-details li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #000080;
    font-weight: bold;
}

/* Taskbar */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, #245edb 0%, #1941a5 50%, #1941a5 100%);
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 0 4px;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
}

.start-button {
    height: 32px;
    padding: 0 12px;
    background: linear-gradient(to bottom, #4a9eff 0%, #0054e3 50%, #0041c5 100%);
    border: 1px solid;
    border-top-color: #6bb3ff;
    border-left-color: #6bb3ff;
    border-right-color: #003a9e;
    border-bottom-color: #003a9e;
    color: white;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.start-button:hover {
    background: linear-gradient(to bottom, #5aaeff 0%, #1064f3 50%, #0051d5 100%);
}

.start-button:active {
    border-top-color: #003a9e;
    border-left-color: #003a9e;
    border-right-color: #6bb3ff;
    border-bottom-color: #6bb3ff;
}

.start-icon {
    font-size: 18px;
}

.taskbar-tasks {
    flex: 1;
    display: flex;
    gap: 4px;
    margin: 0 8px;
    overflow-x: auto;
}

.taskbar-task {
    height: 28px;
    padding: 0 12px;
    background: linear-gradient(to bottom, #4a9eff 0%, #0054e3 50%, #0041c5 100%);
    border: 1px solid;
    border-top-color: #6bb3ff;
    border-left-color: #6bb3ff;
    border-right-color: #003a9e;
    border-bottom-color: #003a9e;
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    user-select: none;
}

.taskbar-task:hover {
    background: linear-gradient(to bottom, #5aaeff 0%, #1064f3 50%, #0051d5 100%);
}

.taskbar-task.active {
    background: linear-gradient(to bottom, #ffffff 0%, #d4d0c8 50%, #c0c0c0 100%);
    color: #000;
    border-top-color: #808080;
    border-left-color: #808080;
    border-right-color: #ffffff;
    border-bottom-color: #ffffff;
}

.task-icon {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-icon img {
    width: 14px;
    height: 14px;
    object-fit: contain;
    display: block;
}

.system-tray {
    display: flex;
    align-items: center;
    padding: 0 8px;
    height: 28px;
    background: linear-gradient(to bottom, #4a9eff 0%, #0054e3 50%, #0041c5 100%);
    border: 1px solid;
    border-top-color: #6bb3ff;
    border-left-color: #6bb3ff;
    border-right-color: #003a9e;
    border-bottom-color: #003a9e;
}

.tray-time {
    color: white;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

/* Start Menu */
.start-menu {
    position: fixed;
    bottom: 40px;
    left: 4px;
    width: 200px;
    background: linear-gradient(to bottom, #1941a5 0%, #245edb 100%);
    border: 2px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #003a9e;
    border-bottom-color: #003a9e;
    display: none;
    z-index: 1001;
    box-shadow: 2px -2px 8px rgba(0, 0, 0, 0.5);
}

.start-menu.active {
    display: block;
}

.start-menu-header {
    background: linear-gradient(to bottom, #1941a5 0%, #245edb 100%);
    padding: 8px 12px;
    border-bottom: 1px solid #003a9e;
}

.start-menu-user {
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.start-menu-items {
    background: #ece9d8;
    padding: 4px 0;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    color: #000;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.start-menu-item:hover {
    background: #316ac5;
    color: white;
}

.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.start-menu-footer {
    background: #ece9d8;
    padding: 4px 0;
    border-top: 1px solid #c0c0c8;
    display: flex;
    gap: 4px;
    padding: 4px;
}

.start-menu-logoff,
.start-menu-shutdown {
    flex: 1;
    padding: 4px 8px;
    background: #ece9d8;
    border: 1px solid;
    border-top-color: #ffffff;
    border-left-color: #ffffff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    font-size: 11px;
    cursor: pointer;
}

.start-menu-logoff:hover,
.start-menu-shutdown:hover {
    background: #f0f0f0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .desktop-icon {
        display: none;
    }

    .window {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        width: calc(100% - 20px);
        max-width: none;
        max-height: calc(100vh - 60px);
    }

    .window-body {
        max-height: calc(100vh - 140px);
    }

    .photo-frame {
        width: 120px;
        height: 120px;
        margin-bottom: 15px;
    }

    .content-header h1 {
        font-size: 22px;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .project-detail {
        gap: 15px;
    }

    .project-thumbnails {
        gap: 8px;
    }

    .project-thumbnail {
        width: 100px;
        height: 70px;
    }

    .taskbar-tasks {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .task-text {
        display: none;
    }

    .taskbar-task {
        padding: 0 8px;
        min-width: 40px;
    }

    .start-menu {
        width: 180px;
    }

    .button-group {
        gap: 10px;
    }

    .button-group button {
        flex: 1 1 calc(50% - 5px);
        min-width: 100px;
        min-height: 50px;
        padding: 6px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .photo-frame {
        width: 100px;
        height: 100px;
        margin-bottom: 12px;
    }

    .content-header h1 {
        font-size: 20px;
    }

    .section h2 {
        font-size: 16px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .project-thumbnail {
        width: 80px;
        height: 60px;
    }

    .start-menu {
        width: calc(100vw - 20px);
        left: 10px;
    }
}

/* Scrollbar Styling */
.window-body::-webkit-scrollbar {
    width: 16px;
}

.window-body::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.window-body::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
    border: 1px solid #808080;
}

.window-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #d4d0c8 0%, #a0a0a0 100%);
}
