/*
Theme Name: Retro Portfolio
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A nostalgic Windows 95-inspired portfolio theme with interactive desktop interface
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: retro-portfolio
*/

:root {
  --win95-gray: #c0c0c0;
  --win95-dark-gray: #808080;
  --win95-light-gray: #dfdfdf;
  --win95-blue: #000080;
  --win95-teal: #008080;
  --win95-highlight: #000080;
  --win95-highlight-text: #ffffff;
  --win95-desktop: #008080;
  --border-raised-outer: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  --border-sunken-outer: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'MS Sans Serif', 'Microsoft Sans Serif', sans-serif;
  font-size: 11px;
  background: var(--win95-desktop);
  overflow: hidden;
  height: 100vh;
  cursor: default;
  user-select: none;
}

/* Desktop Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
  pointer-events: none;
  z-index: 0;
}

#desktop {
  position: relative;
  width: 100%;
  height: calc(100vh - 40px);
  z-index: 1;
}

/* Desktop Icons */
.desktop-icon {
  position: absolute;
  width: 80px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  transition: background-color 0.1s;
}

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

.desktop-icon.selected {
  background-color: rgba(0, 0, 128, 0.5);
  outline: 1px dotted rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
}

.desktop-icon img {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  image-rendering: pixelated;
}

.desktop-icon span {
  display: block;
  font-size: 11px;
  word-wrap: break-word;
}

/* Window Styling */
.window {
  position: absolute;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
  min-width: 300px;
  max-width: 90vw;
  max-height: 85vh;
  display: none;
  z-index: 10;
}

.window.active {
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.window.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 40px !important;
  width: 100vw !important;
  height: calc(100vh - 40px) !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  z-index: 9998;
}

.window.fullscreen.active {
  z-index: 9999;
}

/* Folder Window Styles */
.folder-window {
  display: none;
}

.folder-window.active {
  display: flex;
  flex-direction: column;
}

.folder-content {
  background: #fff;
  padding: 0;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.folder-toolbar {
  background: var(--win95-gray);
  border-bottom: 2px solid var(--win95-dark-gray);
  padding: 5px 10px;
  font-weight: bold;
}

.folder-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
  padding: 20px;
  flex: 1;
  align-content: start;
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 3px;
  transition: background 0.2s;
}

.folder-item:hover {
  background: rgba(0, 0, 128, 0.1);
}

.folder-item:active {
  background: rgba(0, 0, 128, 0.2);
}

.folder-item img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.folder-item span {
  font-size: 12px;
  word-break: break-word;
  color: #000;
}

.window-titlebar {
  background: linear-gradient(to right, var(--win95-blue), var(--win95-teal));
  color: white;
  padding: 3px 4px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.window-title img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
}

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

.window-button {
  width: 16px;
  height: 14px;
  background: var(--win95-gray);
  border: 1px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: bold;
  padding: 0;
}

.window-button:active {
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
  padding: 1px 0 0 1px;
}

.window-content {
  flex: 1;
  padding: 8px;
  background: white;
  overflow-y: auto;
  border: 2px solid;
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
}

/* Taskbar */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--win95-gray);
  border-top: 2px solid var(--win95-light-gray);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 4px;
  z-index: 1000;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

#start-button {
  height: 32px;
  padding: 4px 8px;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  font-weight: bold;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

#start-button:active {
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
  padding: 5px 7px 3px 9px;
}

#start-button img {
  width: 20px;
  height: 20px;
}

.taskbar-divider {
  width: 2px;
  height: 32px;
  background: linear-gradient(to right, var(--win95-dark-gray), var(--win95-light-gray));
  margin: 0 2px;
}

.taskbar-items {
  flex: 1;
  display: flex;
  gap: 2px;
  overflow-x: auto;
}

.taskbar-item {
  height: 28px;
  padding: 4px 8px;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 160px;
  overflow: hidden;
  white-space: nowrap;
}

.taskbar-item.active {
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
  padding: 5px 7px 3px 9px;
}

.taskbar-item img {
  width: 16px;
  height: 16px;
}

#clock {
  height: 28px;
  padding: 4px 8px;
  border: 2px solid;
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
  font-size: 11px;
  display: flex;
  align-items: center;
}

/* 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: 10000;
  font-family: 'Courier New', monospace;
  animation: fadeOut 2s 3s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    pointer-events: none;
  }
}

#boot-screen h1 {
  font-size: 32px;
  margin-bottom: 30px;
  letter-spacing: 4px;
}

.boot-text {
  font-size: 14px;
  margin: 4px 0;
  opacity: 0;
  animation: bootTextAppear 0.3s forwards;
}

@keyframes bootTextAppear {
  to {
    opacity: 1;
  }
}

.boot-text:nth-child(2) { animation-delay: 0.3s; }
.boot-text:nth-child(3) { animation-delay: 0.6s; }
.boot-text:nth-child(4) { animation-delay: 0.9s; }
.boot-text:nth-child(5) { animation-delay: 1.2s; }
.boot-text:nth-child(6) { animation-delay: 1.5s; }

.loading-bar {
  width: 300px;
  height: 20px;
  border: 2px solid #666;
  margin-top: 30px;
  padding: 2px;
  opacity: 0;
  animation: bootTextAppear 0.3s 1.8s forwards;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(to right, #0066cc, #00ccff);
  width: 0%;
  animation: loadingProgress 1.5s 2s forwards;
}

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

/* Start Menu */
#start-menu {
  position: fixed;
  bottom: 42px;
  left: 4px;
  width: 250px;
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  display: none;
  z-index: 2000;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
}

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

.start-menu-header {
  background: linear-gradient(to bottom, var(--win95-blue) 0%, var(--win95-teal) 100%);
  color: white;
  padding: 4px 8px;
  font-weight: bold;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  float: left;
  width: 30px;
  height: 300px;
  font-size: 20px;
  letter-spacing: 2px;
}

.start-menu-items {
  margin-left: 30px;
  padding: 4px 0;
}

.start-menu-item {
  padding: 8px 12px 8px 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.start-menu-item:hover {
  background: var(--win95-blue);
  color: white;
}

.start-menu-item img {
  width: 24px;
  height: 24px;
  position: absolute;
  left: 8px;
}

.start-menu-divider {
  height: 2px;
  background: linear-gradient(to right, var(--win95-dark-gray), var(--win95-light-gray));
  margin: 4px 8px;
}

/* Button Styles */
.win95-button {
  background: var(--win95-gray);
  border: 2px solid;
  border-color: var(--win95-light-gray) var(--win95-dark-gray) var(--win95-dark-gray) var(--win95-light-gray);
  padding: 6px 12px;
  cursor: pointer;
  font-family: 'MS Sans Serif', sans-serif;
  font-size: 11px;
  min-width: 75px;
}

.win95-button:active {
  border-color: var(--win95-dark-gray) var(--win95-light-gray) var(--win95-light-gray) var(--win95-dark-gray);
  padding: 7px 11px 5px 13px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .desktop-icon {
    width: 70px;
  }
  
  .window {
    min-width: 250px;
  }
  
  #start-menu {
    width: 200px;
  }
}

/* Blockbench Model Viewer Controls */
.bbmodel-controls {
  font-family: 'MS Sans Serif', sans-serif;
  color: #fff;
  min-width: 150px;
}

.bbmodel-controls h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #4ECDC4;
  text-transform: uppercase;
  border-bottom: 1px solid #4ECDC4;
  padding-bottom: 5px;
}

.animation-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.animation-btn {
  background: #2a2a2a;
  color: #4ECDC4;
  border: 1px solid #4ECDC4;
  padding: 8px 12px;
  cursor: pointer;
  font-family: 'MS Sans Serif', sans-serif;
  font-size: 11px;
  transition: all 0.2s;
  text-align: left;
}

.animation-btn:hover {
  background: #4ECDC4;
  color: #000;
  transform: translateX(3px);
}

.animation-btn:active {
  transform: translateX(1px);
}

.animation-btn.stop-btn {
  border-color: #FF6B6B;
  color: #FF6B6B;
  margin-top: 5px;
}

.animation-btn.stop-btn:hover {
  background: #FF6B6B;
  color: #000;
}
