/*
Theme Name: Pyn95 Portfolio
Author: Pyn
Description: A retro Windows 95 desktop portfolio theme, powered by WordPress. Manage your content through the admin dashboard.
Version: 1.0
*/

/* --- Custom Font and Global Styles --- */
@font-face {
    font-family: 'W95FA';
    src: url('https://www.w95.com/font/W95FA/W95FA.otf') format('opentype');
}
@font-face {
    font-family: 'W95FA';
    src: url('https://www.w95.com/font/W95FA/W95FA.otf') format('opentype');
}
@font-face {
    font-family: 'ReturnOfTheBoss';
    /* === MODIFIED: Point to local font file === */
    /* This assumes your font file is named 'W95FA.otf' inside the 'font' folder */
    src: url('font/ReturnOfTheBoss.ttf') format('truetype');
}



body {
    font-family: 'W95FA', 'MS Sans Serif', Arial, sans-serif;
    font-smooth: never;
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
    background-color: #000;
    overflow: hidden;
    cursor: url('https://cur.cursors-4u.net/smilies/smi-3/smi210.cur'), auto;
}

a, button, .desktop-icon, .start-menu-item {
    cursor: url('https://cur.cursors-4u.net/smilies/smi-3/smi208.cur'), pointer;
}


/* --- Boot and Welcome Screens --- */
#boot-screen, #welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

#boot-screen img {
    width: 400px;
}

.progress-bar-container {
    width: 300px;
    height: 20px;
    border: 2px inset #888;
    background-color: #c0c0c0;
    padding: 2px;
}

.progress-bar {
    width: 100%;
    height: 100%;
    display: flex;
}

.progress-block {
    width: 10%;
    height: 100%;
    background-color: #9b44ff;
    margin-right: 2px;
}

#welcome-screen {
    display: none;
    background-color: #008080;
}

.welcome-box {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 2rem;
    text-align: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

.welcome-box h2 {
    margin: 0 0 1rem;
}


/* --- Desktop --- */
#desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 28px); /* Full height minus taskbar */
    background: url('/wp-content/themes/win95Theme/bootscreen/bootscreen.webp')center/cover no-repeat;
    overflow: hidden;
    display: none;
    justify-content: space-between;
}

#desktop-icons {
    padding: 1rem;
    padding-bottom: 28px; /* Added margin for the taskbar */
    display: flex;
    flex-direction: column;   /* Stack vertically first */
    flex-wrap: wrap;           /* Then wrap to a new column */
    align-content: flex-start; /* Start new columns from the left */
    gap: 1.5rem;
    height: 100%;              /* Fill the available desktop height */
    flex-grow: 1;              /* Fill the available horizontal space */
    box-sizing: border-box; /* Include padding in height */
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 80px;
}
.desktop-icon:focus {
    outline: none;
}
.desktop-icon:focus img {
    filter: grayscale(1) brightness(0.4) opacity(0.8);
}
.desktop-icon:focus span {
    background-color: #000080; /* Dark Blue */
    color: white;
}
.desktop-icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
}
.desktop-icon span {
    color: white;
    font-size: 12px;
    padding: 2px;
}

.window-content .desktop-icon span {
    color: #000;
}


/* --- Taskbar --- */
#taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background-color: #C0C0C0; /* Silver */
    border-top: 2px solid #FFFFFF;
    display: none;
    align-items: center;
    padding: 2px;
    z-index: 1000;
}
#taskbar-buttons {
    flex-grow: 1;
    display: flex;
    gap: 2px;
    margin: 0 4px;
}

.taskbar-button {
    flex-grow: 1;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.taskbar-button.active {
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    box-shadow: none;
    background-color: #e0e0e0;
}
.win95-button,
#start-button {
    background-color: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    box-shadow: 1px 1px 0 #000000;
    padding: 2px 6px;
    font-size: 12px;
}
.win95-button:active,
#start-button:active {
    border-color: #808080 #FFFFFF #FFFFFF #808080;
    box-shadow: none;
    transform: translate(1px, 1px);
}
/* === ADDED: Disabled state for buttons === */
.win95-button:disabled {
    color: #808080;
    text-shadow: 1px 1px 0 #FFFFFF;
    cursor: default;
}
#start-button {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
}
#start-button img {
    width: 20px;
    height: 20px;
}
#clock {
    padding: 2px 8px;
    border: 2px inset #808080;
    border-top-color: #404040;
    border-left-color: #404040;
    font-size: 12px;
}


/* --- Start Menu --- */
#start-menu {
    position: absolute;
    bottom: 28px;
    left: 0;
    width: 180px;
    background-color: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    box-shadow: 2px 2px 2px #000;
    padding: 2px;
    display: none; /* Initially hidden */
    z-index: 1001;
}
#start-menu-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: #6d2ba7;
    color: #C0C0C0;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 0;
}
#start-menu-sidebar span {
    color: #fff;
}
.start-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    margin-left: 24px; /* Space for sidebar */
}
.start-menu-item {
    position: relative;
    padding: 4px 8px 4px 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.start-menu-item:hover {
    background-color: #4e86ff;
    color: white;
}
.start-menu-item img {
    width: 20px;
    height: 20px;
}
.start-menu-separator {
    height: 1px;
    background-color: #808080;
    border-bottom: 1px solid #FFFFFF;
    margin: 4px 0;
}


/* --- Submenu (for future use) --- */
.submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -2px; /* Align with parent item */
    width: 150px;
    background-color: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    box-shadow: 2px 2px 2px #000;
    padding: 2px;
}
.start-menu-item:hover .submenu {
    display: block;
}
.submenu-item {
    padding: 4px 8px 4px 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: black;
}
.submenu-item:hover {
    background-color: #4e86ff;
    color: white;
}
.submenu-item-icon {
    width: 20px;
    height: 20px;
}
.arrow-right {
    position: absolute;
    right: 5px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid black;
}
.start-menu-item:hover .arrow-right {
    border-left-color: white;
}


/* --- Draggable Window --- */
.window {
    position: absolute;
    background: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    box-shadow: 2px 2px 2px #000;
    min-width: 300px;
    min-height: 200px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 700px; /* Default width */
    height: 500px; /* Default height */
    resize: both;
    overflow: hidden;
}

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

.title-bar {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 3px 5px;
    font-weight: bold;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    flex-shrink: 0;
}
.window.active .title-bar {
    background: linear-gradient(to right, #4008f3, #ffffff); /* Active color */
}
.title-bar:active {
    cursor: grabbing;
}

.title-bar-controls {
    display: flex;
    gap: 2px;
}
.title-bar-button {
    width: 16px;
    height: 14px;
    background-color: #C0C0C0;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    box-shadow: 1px 1px 0 #000;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.window-content {
    padding: 10px;
    overflow-y: auto;
    background: white;
    margin: 2px;
    font-size: 14px;
    line-height: 1.5;
    color: black;
    flex-grow: 1;
}

.icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1rem;
}

/* --- Resizer Handle --- */
.resizer {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path fill="%23C0C0C0" d="M0 0h16v16H0z"/><path fill="none" stroke="%23FFF" stroke-width="2" d="M15 1L1 15zM15 6L6 15zM15 11L11 15z"/><path fill="none" stroke="%23808080" stroke-width="2" d="M16 0L0 16zM16 5L5 16zM16 10L10 16z"/></svg>');
    position: absolute;
    right: 0;
    bottom: 0;
    cursor: nwse-resize;
    z-index: 100;
}

/* --- REMOVED: Music Player Window Style --- */
.window[data-window-id="music-player"] .window-content {
    display: none;
}


/* --- MODIFIED: Right Sidebar (was #wallpaper-selector) --- */
#right-sidebar {
    width: 180px; /* Increased width */
    background-color: rgba(192, 192, 192, 0.9); /* Make it a bit more opaque */
    border-left: 2px solid #FFFFFF;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 10px; /* Add padding at the bottom */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
}

/* === MODIFIED: Wallpaper Container and NEW Carousel Styles === */
#wallpaper-container {
    padding: 10px;
    flex-shrink: 0; /* Don't let this shrink */
    border-bottom: 2px solid #808080; /* Separator line */
}

.wallpaper-carousel-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.wallpaper-carousel-nav .win95-button {
    width: 48%;
    padding: 1px 6px; /* Make buttons a bit shorter */
}

.wallpaper-carousel-viewport {
    width: 100%;
    overflow: hidden;
}

#wallpaper-carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.wallpaper-carousel-item {
    flex: 0 0 50%; /* Each item takes 50% width, showing 2 */
    box-sizing: border-box;
    padding: 0 4px;
}
/* === END MODIFIED === */

#right-sidebar h3 {
    font-family: ReturnOfTheBoss;
    font-weight: normal;
    color: #000000;
    margin-bottom: 5px;
    font-size: 18px;
    text-align: center;
}
.wallpaper-thumbnail {
    /* --- MODIFIED: Make thumbnail responsive --- */
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 2px solid #808080;
    object-fit: cover;
    display: block;
}
.wallpaper-thumbnail:hover {
    transform: scale(1.05);
    border-color: #000080;
}

/* === ADDED: Style for "Load from PC" button === */
#load-wallpaper-button {
    width: 100%;
    margin-top: 10px;
}
/* === END === */


/* --- ADDED: Music Player (in Sidebar) --- */
#music-player-container {
    padding: 0 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 2px solid #fff;
    margin-top: 10px;
}
#music-player-container h3 {
    padding-top: 10px;
}

#player-embed {
    width: 100%;
    aspect-ratio: 16 / 9; /* Make it responsive */
    background: #000;
    border: 2px inset #808080;
}

#player-embed iframe {
    width: 100%;
    height: 100%;
}

.player-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.player-controls label {
    font-size: 12px;
    font-weight: bold;
}

#yt-url-input {
    background: #fff;
    border: 2px inset #808080;
    padding: 4px;
    font-family: 'W95FA', 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box; /* Important */
}

#yt-load-button {
    width: 100%;
    margin-top: 5px;
}

/* --- WordPress Core CSS Alignment --- */
.alignleft {
    float: left;
    margin-right: 1.5em;
}
.alignright {
    float: right;
    margin-left: 1.5em;
}
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* --- Window Container & Controls --- */
#window-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 28px); /* Full viewport height minus the taskbar */
    pointer-events: none; /* Allows clicking through the container to the desktop icons */
}

/* Re-enable pointer events for the windows themselves */
#window-container .window {
    pointer-events: auto;
}

/* Fine-tuning the title bar buttons */
.title-bar-button {
    font-family: 'W95FA', 'MS Sans Serif', Arial, sans-serif; /* Use the theme font */
    font-weight: bold;
    padding-bottom: 2px; /* Adjust vertical alignment of symbols */
}

.title-bar-button.close {
    font-family: Arial, sans-serif; /* A font that renders the 'X' symbol better */
    font-weight: bold;
}

.title-bar-button.maximize {
    /* Nudge the square symbol to be more centered */
    line-height: 10px;
}

/* --- System Properties Window --- */
.window[data-window-id="system-properties"] .window-content {
    background: #C0C0C0; /* Classic grey */
    padding: 20px;
    font-size: 12px;
    line-height: 1.6;
    color: #000;
}

.system-properties-content .sys-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.system-properties-content .sys-header img {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
}

.system-properties-content .sys-info-box {
    border: 2px inset #fff;
    border-right-color: #808080;
    border-bottom-color: #808080;
    padding: 10px;
    flex-grow: 1;
    background: #fff;
}

.system-properties-content .sys-info-box p {
    margin: 0 0 5px;
}

.system-properties-content .sys-info-box p:last-child {
    margin-bottom: 0;
}

.system-properties-content .sys-hr {
    border: none;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #fff;
    margin: 15px 0;
}

.system-properties-content .sys-footer {
    text-align: center;
}

/* --- Desktop Assistant --- */
@keyframes bob {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

#desktop-assistant {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1002; /* Above taskbar but below windows */
    cursor: grab;
}

#desktop-assistant img {
    animation: bob 2s ease-in-out infinite;
    width: 120px;
    
}

#desktop-assistant:active {
    cursor: grabbing;
}

.speech-bubble {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 100%; /* Position above the assistant */
    right: 0;
    width: 200px;
    background-color: #ffffe1; /* Classic yellow tooltip color */
    border: 1px solid #000;
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    margin-bottom: 15px;
}
/* The little triangle pointing down */
.speech-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #000;
}

.close-bubble {
    position: absolute;
    top: 2px;
    right: 4px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* === ADDED 'ABOUT ME' STYLES === */
.window[data-window-id="about-me"] .window-content {
    background: #C0C0C0; /* Classic grey */
    padding: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #000;
    display: flex; /* Use flex to make content fill height */
    flex-direction: column;
}

.about-me-content {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make main container fill the window content area */
}

.about-header {
    display: flex;
    gap: 15px;
    flex-shrink: 0; /* Prevent header from shrinking */
    padding-bottom: 10px;
}

.about-header-left {
    flex-grow: 1;
    display: flex;
    gap: 10px;
}

.about-avatar {
    width: 150px;
    height: 150px;
    image-rendering: pixelated;
    border: 2px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080; /* Inset border */
    flex-shrink: 0;
    background: #fff; /* Fallback background */
}

.about-intro h2 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 10px;
    min-height: 1.2em; /* Ensure space for text */
}

#typing-text {
    color: #000080;
    border-right: 2px solid #000;
    animation: blink-cursor 0.7s step-end infinite;
    /* Ensure it's inline */
    display: inline;
    white-space: nowrap;
}

@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: #000; }
}

.about-intro p {
    margin: 0 0 8px;
}

.about-header-right {
    flex-shrink: 0;
    width: 150px;
}

.nerdy-gif {
    width: 80% !important;
    border: 2px inset #fff;
}

.about-hr {
    border: none;
    border-top: 1px solid #808080;
    border-bottom: 1px solid #fff;
    margin: 0 0 10px 0; /* Adjusted margin */
    flex-shrink: 0;
}

.about-main-content {
    display: flex;
    gap: 15px;
    flex-grow: 1; /* Allow this to fill remaining space */
    overflow: hidden; /* Prevent overflow */
}

.about-left-col, .about-right-col {
    flex: 1;
    overflow-y: auto; /* Allow scrolling if content is too tall */
    padding: 8px;
    border: 2px inset #fff; /* Sunken panel effect */
    border-right-color: #808080;
    border-bottom-color: #808080;
    background: #fff;
    min-height: 100px; /* Ensure columns have some height */
}

.win95-section-header {
    font-weight: bold;
    background: #a762ff;
    padding: 2px 5px;
    border: 2px solid;
    border-color: #FFFFFF #808080 #808080 #FFFFFF;
    margin-bottom: 8px;
    /* Make it "pop" out from the white bg */
    margin-left: -3px;
    margin-right: -3px;
    margin-top: -3px;
}

.skills-container label {
    display: block;
    margin: 5px 0 2px;
    font-weight: bold;
}

.skill-bar-container {
    width: 100%;
    height: 20px;
    background: #c0c0c0; /* Grey trough */
    border: 2px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080; /* Inset effect */
    padding: 2px;
}

.skill-bar-progress {
    background: #6464f5; /* Classic blue */
    height: 100%;
}

.win95-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.win95-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.win95-list li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 5px;
    width: 8px;
    height: 8px;
    background: #000;
    border: 1px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080;
}
/* === END === */

/* === ADDED 'WEB EXPLORER' STYLES === */
.window[data-window-id="web-explorer"] .window-content {
    padding: 0;
    margin: 0;
    background: #C0C0C0;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent window-content scrollbar */
}

.web-explorer-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-bottom: 2px solid;
    border-color: #808080 #FFFFFF;
    flex-shrink: 0;
}
.web-explorer-toolbar img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 2px;
}

#explorer-address-bar {
    flex-grow: 1;
    background: #fff;
    border: 2px inset #808080;
    padding: 2px 4px;
    font-family: 'W95FA', 'MS Sans Serif', Arial, sans-serif;
    font-size: 12px;
    margin-left: 4px;
    color: #000;
}

.web-explorer-iframe-container {
    flex-grow: 1;
    padding: 4px;
    border: 2px inset #808080;
    border-top-color: #404040;
    border-left-color: #404040;
    background: #808080; /* Gutter color */
    margin: 2px;
    overflow: hidden;
}

#explorer-frame {
    width: 100%;
    height: 100%;
    border: 2px solid;
    border-color: #808080 #FFFFFF #FFFFFF #808080; /* Inset border for frame */
    background: #fff; /* Default background before content loads */
}
/* === END === */

/* === ADDED: Window Close Animations === */
@keyframes anim-close-shrink-spin {
    from {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
}

@keyframes anim-close-fly-off {
    from {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translate(150px, -150px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes anim-close-poof {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes anim-close-fall {
    from {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(200px) rotate(15deg);
        opacity: 0;
    }
}

.window.window-closing {
    /* Base class for all closing animations */
    animation-duration: 0.4s;
    animation-fill-mode: forwards; /* Keeps the 'to' state */
    animation-timing-function: ease-in;
    /* Disable resizing and overflow while animating */
    resize: none;
    overflow: hidden;
}

.window-closing.shrink-spin {
    animation-name: anim-close-shrink-spin;
}

.window-closing.fly-off {
    animation-name: anim-close-fly-off;
}

.window-closing.poof {
    animation-name: anim-close-poof;
}

.window-closing.fall {
    animation-name: anim-close-fall;
}


/* === END === */