/* === 🕯 Gothic Portfolio OS Theme === */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&family=Cinzel+Decorative:wght@700&display=swap');

/* 🩸 Base */
body {
  margin: 0;
  overflow: hidden;
  background-color: #0a0005;
  color: #e6d9c3;
  font-family: 'Cinzel Decorative', serif;
  text-shadow: 0 0 6px #700020;
  transition: background 1s ease;
}

/* 🔮 Background Video */
#bg-video {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3) contrast(1.2) saturate(0.7);
  z-index: -1;
  opacity: 1;
  pointer-events: none;
}

/* 💾 Windows */
.window {
  position: absolute;
  top: 150px;
  left: 150px;
  width: 600px;
  background: rgba(20, 10, 15, 0.95);
  border: 2px solid #5a0a0a;
  border-radius: 6px;
  box-shadow: 0 0 15px #5a0a0a, inset 0 0 8px #3a0000;
  color: #e6d9c3;
  font-family: 'Cinzel Decorative', serif;
  z-index: 10;
  display: none;
  transition: all 0.2s ease;
}

.window.show {
  display: block;
  animation: fadeIn 0.3s ease forwards;
}

.window.closing {
  animation: fadeOut 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* 🩶 Title Bar */
.title-bar {
  background: linear-gradient(to right, #300010, #4a0c0c);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e6d9c3;
  font-family: 'UnifrakturCook', cursive;
  text-transform: lowercase;
  cursor: move;
}

.title-bar button {
  background: none;
  color: #e6d9c3;
  border: none;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.2s;
}

.title-bar button:hover {
  color: #ff0000;
  text-shadow: 0 0 6px #ff0000;
}

/* 🖥️ Desktop Icons */
.desktop {
  position: absolute;
  top: 20%;
  left: 3%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align the column left */
  gap: 1.2rem;
}

/* Each Icon */
.icon {
  display: flex;
  flex-direction: column;
  align-items: center; /* Keep emoji + text centered */
  justify-content: center;
  width: 80px;
  text-align: center;
  color: #c9b5a1;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.icon:hover {
  transform: scale(1.1);
  color: #ff1a4a;
  text-shadow: 0 0 8px #ff0040;
}

/* 🧿 Emoji Icon */
.emoji-icon {
  font-size: 2.8rem;
  margin-bottom: 4px;
  text-shadow: 0 0 6px #3a0000;
  filter: drop-shadow(0 0 6px #5a0a0a);
  transition: transform 0.2s ease, filter 0.3s ease;
}

.icon:hover .emoji-icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px #ff0040);
}

/* Label */
.icon span {
  display: block;
  font-size: 0.9rem;
  font-family: 'Cinzel Decorative', serif;
  line-height: 1.1;
}

/* 🪟 Content */
.window .content {
  padding: 1rem;
  font-size: 1rem;
  overflow-y: auto;
  max-height: 70vh;
}

/* 🖼 Gallery */
.gallery img {
  width: 120px;
  margin: 5px;
  border: 1px solid #4a0c0c;
  filter: grayscale(100%) brightness(0.8);
  transition: all 0.3s;
  border-radius: 3px;
}

.gallery img:hover {
  filter: grayscale(0%) brightness(1.2);
  transform: scale(1.05);
  border-color: #ff0033;
  box-shadow: 0 0 10px #ff0033;
}

/* 🎞 Video Gallery */
.video-gallery video {
  width: 200px;
  border: 2px solid #4a0c0c;
  margin: 5px;
  filter: brightness(0.7);
  transition: 0.3s;
  border-radius: 3px;
}

.video-gallery video:hover {
  filter: brightness(1);
  box-shadow: 0 0 10px #ff1a4a;
}

/* 🧭 Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to right, #100004, #3a0a0a);
  border-top: 2px solid #4a0c0c;
  color: #e6d9c3;
  font-family: 'Cinzel Decorative', serif;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  box-shadow: 0 -2px 10px #000;
  z-index: 30;
}

.start-btn {
  background: #4a0c0c;
  border: 1px solid #7a1c1c;
  color: #e6d9c3;
  padding: 6px 14px;
  font-family: 'Cinzel Decorative', serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.start-btn:hover {
  background: #ff0033;
  color: #fff;
  box-shadow: 0 0 10px #ff0033;
}

/* 🧾 Taskbar Items */
.taskbar-item {
  margin-left: 10px;
  padding: 4px 10px;
  border: 1px solid #4a0c0c;
  background: rgba(40, 0, 10, 0.7);
  cursor: pointer;
  transition: background 0.3s;
}

.taskbar-item:hover {
  background: #4a0c0c;
  box-shadow: 0 0 5px #ff0033;
}

/* 🪟 Start Menu */
.start-menu {
  position: fixed;
  bottom: 40px;
  left: 10px;
  background: rgba(20, 0, 10, 0.95);
  border: 2px solid #7a1c1c;
  color: #e6d9c3;
  font-family: 'Cinzel Decorative', serif;
  box-shadow: 0 0 15px #4a0c0c;
  padding: 10px;
  width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 50;
}

.start-menu.show {
  opacity: 1;
  transform: translateY(0);
}

.menu-header {
  font-family: 'UnifrakturCook', cursive;
  text-align: center;
  border-bottom: 1px solid #4a0c0c;
  margin-bottom: 5px;
  padding-bottom: 5px;
}

.menu-item {
  padding: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.menu-item:hover {
  background: #4a0c0c;
}

.menu-separator {
  border-top: 1px solid #4a0c0c;
  margin: 6px 0;
}

/* 💀 Shutdown Screen */
.shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  background: black;
  color: #ff1a4a;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  font-family: 'UnifrakturCook', cursive;
  font-size: 2rem;
  text-shadow: 0 0 15px #ff0033;
  z-index: 100;
  opacity: 0;
  transition: opacity 1s ease;
}

.shutdown-screen.show {
  display: flex;
  opacity: 1;
}

.shutdown-text {
  animation: flicker 2s infinite;
}

@keyframes flicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.3; }
}

/* 🪞 States */
.hidden {
  display: none !important;
  opacity: 0 !important;
}

/* 🖼 Popup Viewer */
.viewer-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 0, 5, 0.9);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 200;
  transition: opacity 0.3s ease;
}

.viewer-popup.hidden {
  display: none;
  opacity: 0;
}

.viewer-content {
  position: relative;
  background: rgba(20, 10, 15, 0.95);
  border: 2px solid #5a0a0a;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 0 20px #700020;
  max-width: 80%;
  max-height: 80%;
  text-align: center;
  animation: popupFade 0.3s ease;
}

.viewer-close {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 45px;
  height: 45px;
  background: radial-gradient(circle, #4a0c0c 30%, #100004 90%);
  border: 2px solid #7a1c1c;
  border-radius: 50%;
  color: #ff1a4a;
  font-size: 2rem;
  font-weight: bold;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  text-shadow: 0 0 10px #ff0033;
  box-shadow: 0 0 10px #4a0c0c;
  transition: all 0.3s ease;
  z-index: 10;
}

.viewer-close:hover {
  transform: scale(1.2) rotate(10deg);
  color: #fff;
  background: radial-gradient(circle, #ff1a4a 30%, #3a0008 90%);
  text-shadow: 0 0 20px #ff0033, 0 0 30px #ff0033;
  box-shadow: 0 0 25px #ff0033;
}

.viewer-content img,
.viewer-content video {
  max-width: 100%;
  max-height: 70vh;
  border: 2px solid #4a0c0c;
  border-radius: 5px;
  box-shadow: 0 0 20px #400010;
}

.viewer-content p {
  margin-top: 10px;
  font-family: 'Cinzel Decorative', serif;
  color: #e6d9c3;
  font-size: 1rem;
  text-shadow: 0 0 6px #700020;
}

@keyframes popupFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 📄 Resume Window */
.resume-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.resume-frame {
  width: 100%;
  height: 70vh;
  border: 2px solid #4a0c0c;
  border-radius: 6px;
  background: #0a0005;
  box-shadow: inset 0 0 8px #3a0000;
}

.resume-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.resume-actions .btn {
  background: #4a0c0c;
  color: #e6d9c3;
  border: 1px solid #7a1c1c;
  padding: 6px 12px;
  font-family: 'Cinzel Decorative', serif;
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 4px;
}

.resume-actions .btn:hover {
  background: #ff0033;
  color: #fff;
  box-shadow: 0 0 10px #ff0033;
}
/* 📱 Mobile Friendly Adjustments */
@media (max-width: 768px) {
  body {
    overflow: auto;
    text-shadow: 0 0 4px #700020;
  }

  /* 🔮 Background Video */
  #bg-video {
    object-fit: cover;
    filter: brightness(0.25) contrast(1.1);
  }

  /* 💾 Windows */
  .window {
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 95%;
    height: auto;
  }

  .window .content {
    max-height: 60vh;
    font-size: 0.9rem;
  }

  .title-bar {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .title-bar button {
    font-size: 1.2rem;
  }

  /* 🖥️ Desktop Icons */
  .desktop {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 1.2rem;
    width: 100%;
  }

  .icon {
    width: 70px;
  }

  .emoji-icon {
    font-size: 2.4rem;
  }

  .icon span {
    font-size: 0.8rem;
  }

  /* 🧭 Taskbar */
  .taskbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: 0.9rem;
  }

  .start-btn {
    padding: 5px 10px;
    font-size: 0.9rem;
  }

  .taskbar-item {
    margin: 4px;
    padding: 5px 8px;
  }

  /* 🪟 Start Menu */
  .start-menu {
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 90%;
  }

  /* 🖼 Popup Viewer */
  .viewer-content {
    max-width: 95%;
    max-height: 80%;
    padding: 0.8rem;
  }

  .viewer-close {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    top: -12px;
    right: -12px;
  }

  .viewer-content img,
  .viewer-content video {
    max-height: 60vh;
  }

  /* 📄 Resume Window */
  .resume-frame {
    height: 60vh;
  }

  .resume-actions {
    flex-direction: column;
    gap: 0.6rem;
  }

  .resume-actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .emoji-icon {
    font-size: 2rem;
  }

  .window {
    top: 50px;
  }

  .title-bar {
    font-size: 0.8rem;
  }

  .icon {
    width: 60px;
  }

  .taskbar {
    font-size: 0.8rem;
  }
}
