@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --bg-gradient: linear-gradient(135deg, #FF61D8 0%, #8A2BE2 50%, #00FFFF 100%);
  --grid-color: rgba(255, 255, 255, 0.3);
  --retro-grey: #C0C0C0;
  --retro-dark-grey: #808080;
  --retro-black: #000000;
  --retro-white: #FFFFFF;
  --retro-blue: #0000AA;
  --retro-pink: #FF69B4;
  --shadow-offset: 6px;
  
  --font-retro: 'VT323', monospace;
  --font-system: 'Tahoma', 'Arial', sans-serif;
  --menu-bar-h: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-system);
}

body {
  background: 
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px),
    var(--bg-gradient);
  background-size: 40px 40px, 40px 40px, cover;
  background-attachment: fixed;
  color: var(--retro-black);
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  user-select: none;
}

h2, h3, .quote-text, .window-title {
  font-family: var(--font-retro);
  letter-spacing: 1px;
}

/* Retro Box */
.retro-box {
  background: var(--retro-white);
  border: 3px solid var(--retro-black);
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--retro-black);
  border-radius: 0;
}

/* ========================
   TOP MENU BAR
   ======================== */
#menu-bar {
  height: var(--menu-bar-h);
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  z-index: 9999;
  background: var(--retro-grey);
  border-bottom: 2px solid var(--retro-black);
  position: fixed;
  top: 0;
  left: 0;
}

.menu-left, .menu-right {
  display: flex;
  align-items: center;
  gap: 0;
}

.menu-item {
  cursor: pointer;
  padding: 2px 10px;
  font-family: var(--font-retro);
  font-size: 18px;
  color: var(--retro-black);
  transition: background 0.1s;
  display: flex;
  align-items: center;
}

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

.menu-logo {
  font-size: 16px;
  font-family: var(--font-system);
  font-weight: bold;
}

.bold { font-weight: bold; }

/* Win95 Button */
.win-btn {
  background: var(--retro-grey);
  border-top: 2px solid var(--retro-white);
  border-left: 2px solid var(--retro-white);
  border-bottom: 2px solid var(--retro-black);
  border-right: 2px solid var(--retro-black);
  padding: 4px 12px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  color: var(--retro-black);
  outline: none;
}

.win-btn:active {
  border-top: 2px solid var(--retro-black);
  border-left: 2px solid var(--retro-black);
  border-bottom: 2px solid var(--retro-white);
  border-right: 2px solid var(--retro-white);
  background: var(--retro-dark-grey);
}

/* Flat Retro Button */
.flat-btn {
  background: var(--retro-pink);
  border: 3px solid var(--retro-black);
  color: var(--retro-black);
  font-family: var(--font-retro);
  font-size: 20px;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s, box-shadow 0.1s;
  box-shadow: 4px 4px 0px var(--retro-black);
  display: inline-block;
}

.flat-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0px var(--retro-black);
}

/* Desktop */
#desktop {
  position: absolute;
  top: var(--menu-bar-h);
  left: 0;
  width: 100%;
  height: calc(100dvh - var(--menu-bar-h));
  overflow: hidden;
}

/* ========================
   WIDGETS - TWO COLUMN LAYOUT
   ======================== */
#widgets-container {
  position: absolute;
  top: 30px;
  left: 40px;
  right: 40px;
  bottom: 110px;
  display: flex;
  gap: 24px;
  pointer-events: none;
  overflow: hidden;
}

.widget-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  pointer-events: none;
}

.left-col {
  flex: 1;
  max-width: 380px;
}

.right-col {
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

/* Widget Base */
.widget {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
}

.widget.removing {
  transform: scale(0.8) rotate(-5deg);
  opacity: 0;
  pointer-events: none;
}

/* Widget Header */
.widget-header {
  background: var(--retro-pink);
  color: var(--retro-black);
  padding: 4px 8px;
  border-bottom: 3px solid var(--retro-black);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.widget-header h3 {
  font-size: 22px;
  margin: 0;
  line-height: 1;
}
.widget-header .btn-close {
  width: 20px;
  height: 20px;
  background: var(--retro-grey);
  border: 2px solid var(--retro-black);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--retro-black);
  color: var(--retro-black);
}
.widget-header .btn-close:hover {
  background: #FF5F56;
  color: white;
}
.widget-header .btn-close:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--retro-black);
}

.widget-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--retro-white);
}

.widget-label {
  font-family: var(--font-retro);
  font-size: 18px;
  color: var(--retro-dark-grey);
  margin-bottom: 12px;
}

/* ---- Socials Widget ---- */
.widget.socials .social-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.social-item {
  aspect-ratio: 1;
  background: var(--retro-grey);
  border: 3px solid var(--retro-black);
  box-shadow: 3px 3px 0px var(--retro-black);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s;
}
.social-item i {
  width: 22px;
  height: 22px;
}
.social-item:hover {
  background: var(--retro-pink);
  transform: scale(1.1);
}
.social-item:active {
  transform: translate(3px, 3px) scale(1);
  box-shadow: 0px 0px 0px var(--retro-black);
}

/* ---- Quote Widget ---- */
.widget.quote .widget-content {
  justify-content: center;
  background: #E6E6FA;
}
.quote-text {
  font-size: 26px;
  color: var(--retro-black);
  line-height: 1.2;
  margin-bottom: 12px;
}
.quote-author {
  font-size: 14px;
  font-weight: bold;
  text-align: right;
}

/* ---- Resume Widget ---- */
.widget.resume .resume-preview {
  flex: 1;
  min-height: 120px;
  border: 3px solid var(--retro-black);
  background: #ccc;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-retro);
  font-size: 24px;
}
.contact-actions {
  display: flex;
  gap: 12px;
}

/* ---- Profile Widget ---- */
.widget.profile .widget-content {
  align-items: center;
  text-align: center;
  justify-content: center;
  padding: 24px 20px;
  background: #fffdf0;
}
.profile-img {
  width: 140px;
  height: 160px;
  object-fit: cover;
  border: 3px solid var(--retro-black);
  box-shadow: 4px 4px 0px var(--retro-pink);
  margin-bottom: 16px;
}
.profile h2 {
  font-size: 32px;
  color: var(--retro-blue);
  margin-bottom: 8px;
}
.widget.profile p {
  font-family: var(--font-retro);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--retro-dark-grey);
}

/* ---- Contact Widget ---- */
.widget.contact .widget-content {
  background: #E0FFFF;
}
.contact-item {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-item i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ========================
   FLOATING DOCK
   ======================== */
#dock-container {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
}

#dock {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: var(--retro-grey);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s cubic-bezier(0.25, 1, 0.5, 1);
}

.dock-item i {
  width: 44px;
  height: 44px;
  background: var(--retro-white);
  border: 2px solid var(--retro-black);
  border-bottom: 4px solid var(--retro-black);
  border-right: 4px solid var(--retro-black);
  border-radius: 6px;
  padding: 8px;
  box-shadow: inset 2px 2px 0px rgba(255,255,255,0.8), 2px 2px 0px rgba(0,0,0,0.2);
  display: block;
  transition: all 0.1s;
}

.dock-item:hover {
  transform: translateY(-8px);
}

.dock-item:hover i {
  background: var(--retro-pink);
}

.dock-item:active i {
  transform: translate(2px, 2px);
  border-bottom: 2px solid var(--retro-black);
  border-right: 2px solid var(--retro-black);
  box-shadow: inset 2px 2px 0px rgba(0,0,0,0.3);
}

.dock-label {
  font-family: var(--font-retro);
  font-size: 13px;
  font-weight: bold;
  margin-top: 6px;
  color: var(--retro-black);
}

.dock-item.active::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--retro-pink);
  border: 1px solid var(--retro-black);
  border-radius: 50%;
  display: block;
  margin-top: 4px;
}

.dock-separator {
  width: 4px;
  height: 48px;
  background: var(--retro-dark-grey);
  border-right: 2px solid var(--retro-white);
  margin: 0 12px;
}

/* ========================
   RETRO CONFIRM DIALOG
   ======================== */
#confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

#confirm-overlay.show {
  display: flex;
}

#confirm-dialog {
  width: 380px;
  max-width: 90vw;
  background: var(--retro-grey);
  border: 3px solid var(--retro-black);
  box-shadow: 8px 8px 0px var(--retro-black);
  animation: dialogBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dialogBounce {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

#confirm-dialog .dialog-header {
  background: var(--retro-blue);
  color: var(--retro-white);
  padding: 4px 8px;
  font-family: var(--font-retro);
  font-size: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--retro-black);
}

#confirm-dialog .dialog-body {
  padding: 24px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--retro-grey);
}

.dialog-icon {
  font-size: 40px;
  flex-shrink: 0;
  line-height: 1;
}

#confirm-msg {
  font-family: var(--font-retro);
  font-size: 22px;
  line-height: 1.3;
  color: var(--retro-black);
}

#confirm-dialog .dialog-actions {
  padding: 12px 20px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--retro-grey);
}

#confirm-dialog .dialog-actions button {
  min-width: 90px;
  padding: 6px 16px;
  font-family: var(--font-retro);
  font-size: 20px;
}

/* ========================
   EASTER EGG TOAST
   ======================== */
#toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--retro-black);
  color: #00FF00;
  font-family: var(--font-retro);
  font-size: 20px;
  padding: 10px 20px;
  border: 2px solid #00FF00;
  box-shadow: 4px 4px 0px rgba(0,255,0,0.3);
  animation: toastIn 0.3s ease-out, toastOut 0.4s 2.6s ease-in forwards;
  white-space: nowrap;
}

@keyframes toastIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-10px); }
}

/* ========================
   WINDOWS
   ======================== */
#windows-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.app-window {
  position: absolute;
  width: 500px;
  height: 400px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  animation: windowOpen 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes windowOpen {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.window-header {
  height: 32px;
  background: var(--retro-blue);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  cursor: grab;
  border-bottom: 3px solid var(--retro-black);
}

.window-header:active {
  cursor: grabbing;
}

.window-title {
  color: var(--retro-white);
  font-size: 20px;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.window-controls .win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0 !important;
  box-sizing: border-box;
}

.window-content {
  flex: 1;
  background: var(--retro-white);
  overflow-y: auto;
  padding: 16px;
}

/* App Content */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--retro-grey);
  border-top: 2px solid var(--retro-white);
  border-left: 2px solid var(--retro-white);
  border-bottom: 2px solid var(--retro-dark-grey);
  border-right: 2px solid var(--retro-dark-grey);
  padding: 12px;
  cursor: pointer;
  transition: transform 0.1s;
}

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

/* Retro Macintosh CSS Art */
.mac-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 32px 16px;
  padding: 24px;
  justify-items: center;
}

.project-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.1s;
  width: 100%;
  max-width: 220px;
}

.project-wrapper:hover {
  transform: scale(1.03);
}

.project-mac-chassis {
  width: 180px;
  height: 230px;
  background: #e5decc;
  border: 2px solid var(--retro-black);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 4px 4px 0px rgba(0,0,0,1), inset -4px -4px 0px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  position: relative;
  margin-bottom: 12px;
}

.mac-screen-bezel {
  width: 140px;
  height: 110px;
  background: var(--retro-black);
  border-radius: 6px;
  padding: 8px;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.2);
}

.mac-screen-content {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #4ab3b6;
  border-radius: 2px;
  display: block;
}

.mac-floppy-drive {
  width: 40px;
  height: 4px;
  background: var(--retro-black);
  position: absolute;
  bottom: 24px;
  right: 28px;
  border-radius: 2px;
}

.mac-floppy-drive::before {
  content: '';
  position: absolute;
  right: 96px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  background: linear-gradient(to bottom, #5ba448 20%, #f4b238 20% 40%, #ea8536 40% 60%, #df3e33 60% 80%, #902f8f 80%);
  border: 1px solid rgba(0,0,0,0.5);
  border-radius: 1px;
}

.project-info {
  text-align: center;
  width: 100%;
}

.project-info h4 {
  font-family: var(--font-retro);
  font-size: 14px;
  color: var(--retro-black);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-info p {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .mac-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .mac-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .mac-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 8px;
    padding: 8px;
  }
  
  .project-wrapper {
    max-width: 130px;
  }

  .project-mac-chassis {
    width: 110px;
    height: 145px;
    padding-top: 10px;
    border-width: 2px;
    border-radius: 6px 6px 3px 3px;
    box-shadow: 2px 2px 0px rgba(0,0,0,1), inset -2px -2px 0px rgba(0,0,0,0.1);
    margin-bottom: 6px;
  }
  
  .mac-screen-bezel {
    width: 90px;
    height: 70px;
    padding: 4px;
    border-radius: 4px;
  }
  
  .mac-floppy-drive {
    width: 24px;
    height: 3px;
    bottom: 16px;
    right: 14px;
  }
  
  .mac-floppy-drive::before {
    right: 60px;
    width: 5px;
    height: 5px;
  }
  
  .project-info h4 {
    font-size: 11px;
    margin-bottom: 2px;
  }
  
  .project-info p {
    font-size: 9px;
  }
}

.project-card:active {
  border-top: 2px solid var(--retro-dark-grey);
  border-left: 2px solid var(--retro-dark-grey);
  border-bottom: 2px solid var(--retro-white);
  border-right: 2px solid var(--retro-white);
  transform: translateY(0);
}

.project-card h4 {
  font-family: var(--font-retro);
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--retro-blue);
}

.project-card p {
  font-size: 13px;
  line-height: 1.4;
}

/* Scrollbar */
::-webkit-scrollbar { width: 16px; background: var(--retro-grey); border-left: 1px solid var(--retro-black); }
::-webkit-scrollbar-thumb { background: var(--retro-grey); border-top: 2px solid var(--retro-white); border-left: 2px solid var(--retro-white); border-bottom: 2px solid var(--retro-black); border-right: 2px solid var(--retro-black); }
::-webkit-scrollbar-button { background: var(--retro-grey); display: block; height: 16px; border-top: 2px solid var(--retro-white); border-left: 2px solid var(--retro-white); border-bottom: 2px solid var(--retro-black); border-right: 2px solid var(--retro-black); }

/* ========================
   RESPONSIVE — MOBILE
   ======================== */
@media (max-width: 900px) {
  #widgets-container {
    flex-direction: column;
    left: 16px;
    right: 16px;
    top: 16px;
    bottom: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
  }

  .left-col, .right-col {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
  }

  .widget.socials .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .profile-img {
    width: 100px;
    height: 120px;
  }

  .profile h2 {
    font-size: 26px;
  }

  .quote-text {
    font-size: 22px;
  }

  /* Dock */
  #dock-container {
    bottom: 8px;
    width: calc(100% - 16px);
    left: 8px;
    transform: none;
  }

  #dock {
    width: 100%;
    justify-content: space-around;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .dock-item {
    padding: 4px;
  }

  .dock-item i {
    width: 38px;
    height: 38px;
    padding: 6px;
    box-shadow: 2px 2px 0px var(--retro-black);
  }

  .dock-label {
    font-size: 11px;
    margin-top: 4px;
  }

  .dock-item:hover {
    transform: scale(1.05) translateY(-2px);
  }

  .dock-separator {
    height: 42px;
    margin: 0 4px;
  }

  /* Menu bar */
  .menu-item {
    padding: 2px 6px;
    font-size: 16px;
  }

  /* Hide File, Edit, View, Help on mobile but show logo, name, and Music */
  .menu-left .menu-item:not(.menu-logo):not(.bold):not(#menu-turntable-btn) {
    display: none;
  }

  /* Hide status icons on mobile clock */
  .menu-right .menu-item:not(#clock) {
    display: none;
  }

  /* Hide scrollbar on dock for clean swiping */
  #dock::-webkit-scrollbar {
    display: none;
  }
  #dock {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  /* Inline player styling for mobile flow */
  #widgets-container > #winamp-player {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    margin: 8px auto 16px auto !important;
    z-index: 1 !important;
  }

  /* Windows */
  .app-window {
    width: calc(100% - 20px);
    height: 70%;
    left: 10px;
    top: 40px;
  }
}

@media (max-width: 480px) {
  .widget.socials .social-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .contact-item {
    font-size: 12px;
  }

  .flat-btn {
    font-size: 16px;
    padding: 6px 12px;
  }

  .quote-text {
    font-size: 20px;
  }

  .profile h2 {
    font-size: 24px;
  }

  .widget.profile p {
    font-size: 16px;
  }
}

/* ========================
   SCREENSAVER
   ======================== */
#screensaver {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: var(--retro-black);
  z-index: 999999;
  display: none;
  cursor: none;
}
#screensaver.show {
  display: block;
}
#dvd-logo {
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-retro);
  font-size: 48px;
  font-weight: bold;
  color: var(--retro-pink);
  text-shadow: 4px 4px 0px var(--retro-blue);
  white-space: nowrap;
  user-select: none;
  user-select: none;
  will-change: transform;
}

/* ========================
   DESKTOP PET (BYTE)
   ======================== */
#desktop-pet {
  position: fixed;
  bottom: 80px;
  left: 0;
  width: 60px;
  height: 60px;
  z-index: 9000;
  cursor: pointer;
  transition: transform 0.2s;
}

.pet-body {
  width: 100%;
  height: 100%;
  background: #d4d0c8;
  border: 3px solid #000;
  border-radius: 8px;
  box-shadow: 4px 4px 0 #000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.pet-screen {
  width: 70%;
  height: 60%;
  background: #000;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #0f0;
  font-family: var(--font-retro);
  font-size: 14px;
  font-weight: bold;
  white-space: pre;
  user-select: none;
}

.pet-bubble {
  position: absolute;
  top: -40px;
  right: -20px;
  background: #fff;
  border: 2px solid #000;
  padding: 4px 8px;
  font-family: var(--font-retro);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 2px 2px 0 #000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.pet-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(45deg);
}
#desktop-pet.speaking .pet-bubble {
  opacity: 1;
}

/* ========================
   RETRO VINYL PLAYER (VIBE)
   ======================== */
.widget.neo-player {
  width: 300px;
  background: #f4eadc;
  color: #000;
  padding: 0;
  font-family: var(--font-retro);
}

.turntable-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.turntable-chassis {
  width: 100%;
  height: 160px;
  background: #a3b1a8;
  border: 3px solid var(--retro-black);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.4), inset -2px -2px 0 rgba(0,0,0,0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.tonearm {
  position: absolute;
  top: 15px;
  right: 25px;
  width: 8px;
  height: 90px;
  background: silver;
  border: 2px solid var(--retro-black);
  transform-origin: top center;
  transform: rotate(-25deg);
  transition: transform 0.5s ease-in-out;
  border-radius: 4px;
}
.tonearm::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  width: 24px;
  height: 24px;
  background: #222;
  border-radius: 50%;
  border: 2px solid var(--retro-black);
}
.tonearm::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: -8px;
  width: 20px;
  height: 30px;
  background: #333;
  border: 2px solid var(--retro-black);
  border-radius: 2px;
}
.tonearm.playing {
  transform: rotate(18deg);
}

.neo-vinyl {
  width: 120px;
  height: 120px;
  background: #222;
  border-radius: 50%;
  border: 2px solid #000;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 0 10px #2a2a2a, inset 0 0 0 20px #222, inset 0 0 0 30px #2a2a2a;
}

.neo-vinyl-center {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff6b6b 50%, #e84118 50%);
  border-radius: 50%;
  border: 2px solid #000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.neo-vinyl-center::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-radius: 50%;
  opacity: 0.6;
}
.neo-vinyl-center::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.neo-vinyl.playing {
  animation: spin 3s linear infinite;
}

.neo-track-info {
  text-align: center;
  width: 100%;
}
.neo-track-name {
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 4px;
}
.neo-track-artist {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.neo-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-weight: 700;
  font-size: 14px;
}
.neo-progress-bar {
  flex: 1;
  height: 3px;
  background: #000;
  position: relative;
}
.neo-progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  background: var(--retro-pink);
  border: 1px solid #000;
}
.neo-progress-handle {
  position: absolute;
  left: 40%;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #000;
  transform: translateX(-50%);
}

.winamp-controls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.winamp-controls .flat-btn {
  flex: 1;
  background: var(--retro-grey);
  color: var(--retro-black);
  border: 2px solid var(--retro-black);
  border-top-color: #fff;
  border-left-color: #fff;
  padding: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
.winamp-controls .flat-btn:active {
  border: 2px solid var(--retro-black);
  border-bottom-color: #fff;
  border-right-color: #fff;
}

/* ========================
   RETRO FILE EXPLORER & PREVIEWS
   ======================== */
.explorer-container {
  display: flex;
  height: 100%;
  background: #fff;
  border: 2px inset var(--retro-black);
}

.explorer-sidebar {
  width: 180px;
  border-right: 2px solid var(--retro-black);
  background: var(--retro-grey);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-folder {
  cursor: pointer;
  padding: 6px 8px;
  font-family: var(--font-retro);
  font-size: 16px;
  color: var(--retro-black);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid transparent;
}

.sidebar-folder:hover {
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-folder.active {
  background: var(--retro-blue);
  color: var(--retro-white);
  border: 2px inset var(--retro-black);
}

.explorer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.explorer-toolbar {
  display: flex;
  padding: 6px 12px;
  border-bottom: 2px solid var(--retro-black);
  background: var(--retro-grey);
  align-items: center;
}

.path-label {
  font-family: var(--font-retro);
  font-size: 14px;
  font-weight: bold;
  margin-right: 8px;
  color: var(--retro-black);
}

.path-input {
  flex: 1;
  border: 2px inset var(--retro-black);
  padding: 4px 8px;
  font-family: Courier, monospace;
  font-size: 13px;
  background: #fff;
  color: #000;
  outline: none;
}

.explorer-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  grid-auto-rows: max-content;
  gap: 16px;
  padding: 16px;
  overflow-y: auto;
}

.explorer-group-header {
  grid-column: 1 / -1;
  font-family: Arial, sans-serif;
  font-weight: bold;
  font-size: 16px;
  color: #333;
  margin-top: 12px;
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--retro-grey);
  text-transform: capitalize;
}

.explorer-file-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px;
  border: 2px solid transparent;
}

.explorer-file-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.explorer-file-item.selected {
  background: rgba(0, 102, 204, 0.1);
  border: 2px dotted var(--retro-blue);
}

.file-icon-wrapper {
  font-size: 32px;
  color: #f39c12;
  margin-bottom: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.file-preview-img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border: 1px solid #808080;
  border-right-color: #dfdfdf;
  border-bottom-color: #dfdfdf;
  box-shadow: inset 1px 1px 0 #000, 1px 1px 0 #fff;
  background: #fff;
  padding: 2px;
}

.file-label-text {
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #000;
  word-break: break-all;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 28px;
}

/* Lightbox Modal Previews */
.project-preview-modal {
  display: flex;
  height: 100%;
  background: #fff;
}

.preview-left {
  flex: 1.2;
  border-right: 2px solid var(--retro-black);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #333;
  padding: 12px;
  overflow: hidden;
}

.preview-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid var(--retro-black);
  box-shadow: 4px 4px 0px #000;
  cursor: zoom-in;
}

.preview-right {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--retro-grey);
  overflow-y: auto;
}

.preview-title {
  font-family: var(--font-retro);
  font-size: 20px;
  margin: 0;
  font-weight: bold;
  border-bottom: 2px solid var(--retro-black);
  padding-bottom: 6px;
}

.preview-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  background: #fff;
  border: 2px inset var(--retro-black);
  padding: 8px;
}

.preview-desc {
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: #333;
  margin: 0;
  flex: 1;
}

.preview-actions {
  margin-top: auto;
  padding-top: 8px;
}

.preview-action-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

@media (max-width: 600px) {
  .explorer-container {
    flex-direction: column;
  }
  .explorer-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--retro-black);
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding: 4px;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar-folder {
    white-space: nowrap;
    padding: 4px 6px;
    font-size: 14px;
  }
  .project-preview-modal {
    flex-direction: column;
    overflow-y: auto;
  }
  .preview-left {
    height: 180px;
    flex: none;
    border-right: none;
    border-bottom: 2px solid var(--retro-black);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .preview-img {
    max-height: 150px;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
  }
  .preview-right {
    padding: 12px;
    flex: none;
  }
}

