/* ===================================================== */
/* == CSS CUSTOM PROPERTIES ============================ */
/* ===================================================== */
:root {
  --light-blue: #add8e6;
  --frosted-bg: rgba(173, 216, 230, 0.3);
  --frosted-border: rgba(173, 216, 230, 0.7);
  --text-blue: #5d8aa8;
}

/* Base styles */
/* Font face for Michroma */
@font-face {
  font-family: 'Michroma';
  src: url('/fonts/Michroma-Regular.woff2') format('woff2'),
       url('/fonts/Michroma-Regular.woff') format('woff'),
       url('/fonts/Michroma-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'VTC Tribal';
  src: url('VTC-Tribal-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.metallic-x {
  font-size: 33px;
  color: var(--light-blue);
  font-weight: bold;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  text-fill-color: initial;
  text-shadow: none;
}


body {
  background-color: white;
  color: black;
  font-family: Verdana;
  line-height: 1.5;
  font-size: 16px;
}



/* ===================================================== */
/* == NAVIGATION ======================================= */
/* ===================================================== */
.nav-bar {
  margin: 20px auto;
  padding: 1px 0;
  width: 50%;
  max-width: 85vw;
  display: flex;
  height: 49px;
  background-color: var(--frosted-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  border-radius: 40px;
  box-shadow:
    inset -2px -2px 1px rgba(255,255,255,0.7),
    inset  2px  2px 2px rgba(160,160,160,0.5),
     2px  2px  4px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

/* Base metal look */
.nav-btn {
  flex: 1;
  margin: 0;
  height: 46px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f0f8 45%, #c9d3dd 100%);
  color: #b0b0b0;
  font-family: 'Michroma', sans-serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.55em;
  text-shadow:
    0   1px 0   #fff,
    0  -1px 1px #777,
    1px  0   1px #999,
   -1px  0   1px #999,
    0   0   5px #bbb;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.3s ease-in-out;
  border: 2px solid #a0a0a0;
  box-shadow:
    inset 0 1px 1px #fff,
    0      0    5px #ccc;
  border-radius: 0;
  border-left: 2px solid transparent;
}

/* Rest-state outer corners */
.nav-btn:first-child {
  border-left: 2px solid #a0a0a0;
  border-top-left-radius: 40px;
  border-bottom-left-radius: 40px;
}

.nav-btn:last-child {
  border-right: 2px solid #a0a0a0;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
}

/* Hover: glossy gradient border + glow */
.nav-btn:hover,
.nav-btn:focus {
  /* two backgrounds: inner glossy fill (padding-box) and metallic gradient border (border-box) */
  border: 4px solid transparent;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--light-blue) 80%) padding-box,
    linear-gradient(45deg,
      #e0e0e0 0%,
      #a0a0a0 25%,
      #f8f8f8 50%,
      #a0a0a0 75%,
      #e0e0e0 100%
    ) border-box;
  color: var(--text-blue);
  box-shadow: 0 0 12px var(--light-blue);
  transform: scale(1.05);
  outline: none;
}

/* Reapply only the two outer corners on hover */
.nav-btn:first-child:hover,
.nav-btn:first-child:focus {
  border-top-left-radius: 40px;
  border-bottom-left-radius: 40px;
}

.nav-btn:last-child:hover,
.nav-btn:last-child:focus {
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
}

/* Keep middle buttons square on hover */
.nav-btn:not(:first-child):not(:last-child):hover,
.nav-btn:not(:first-child):not(:last-child):focus {
  border-radius: 0;
}

/* Pressed state */
.nav-btn:active {
  transform: scale(0.95);
  box-shadow: none;
  background-color: var(--light-blue);
  color: white;
}

/* Consolidated nav button image styles */
.nav-btn img {
  width: 148px;
  vertical-align: middle;
  pointer-events: none;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.3));
  letter-spacing: normal;
  padding: 0;
}

/* Specific adjustments for each button */
#home-btn img { 
  height: 32px; 
  margin-top: 7px; 
  width: auto;
}

#about-btn img { 
  height: 40px; 
  margin-top: 9px; 
}

#gallery-btn img { 
  height: 35px; 
  margin-top: 5px; 
  width: auto;
}

#x-btn-left img,
#x-btn-right img { 
  height: 35px; 
  margin-top: 7px; 
  width: auto; 
}

#blog-btn img { 
  height: 32px; 
  margin-top: 7px; 
  width: auto; 
}

/* ===================================================== */
/* == LAYOUT ELEMENTS ================================== */
/* ===================================================== */
.main-content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  margin-top: 20px;
  padding: 0 20px;
}

/* Frosted style for panel and chat */
.frosted-panel,
.chat-box,
.video-box {
  background-color: var(--frosted-bg);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid var(--frosted-border);
  border-radius: 12px;
  box-shadow:
    inset -2px -2px 1px rgba(255, 255, 255, 0.7),
    inset 2px 2px 2px rgba(160, 160, 160, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  padding: 8px;
  overflow: hidden;
}

/* Panel specific */
.frosted-panel {
  flex: 1;
  max-width: 800px;
  height: 400px;
}

.panel-content {
  padding: 15px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-y: auto;
  height: 100%;
}

/* Scrollbar for panel-content and chat-messages */
.panel-content::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.panel-content::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 12px;
  box-shadow: inset 1px 1px 2px white, inset -1px -1px 2px #c0c0c0;
}

.panel-content::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--light-blue);
  border-radius: 12px;
  box-shadow: inset 1px 1px 2px white, inset -1px -1px 2px #a0a0a0;
  border: 2px solid white;
  transition: background-color 0.3s ease;
}

.panel-content::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
  background-color: #2e6bf5;
}

/* Firefox scrollbar */
.panel-content,
.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: var(--light-blue) #f0f0f0;
}

/* ===================================================== */
/* == CHAT WINDOW ====================================== */
/* ===================================================== */
.chat-box {
  position: fixed;
  bottom: 50px;
  left: 20px;
  width: 220px;
  height: 320px;
  z-index: 1000;
}

/* Chat header (window bar) */
.chat-header {
  height: 28px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 6px;
}

/* Minimize button */
#minimize-btn {
  background-color: white;
  border: 2px outset #e0e0e0;
  border-radius: 8px;
  width: 24px;
  height: 24px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #808080;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

#minimize-btn:hover {
  background-color: var(--light-blue);
  box-shadow: 0 0 6px var(--light-blue);
}

.chat-box.minimized #minimize-btn {
  position: relative;
  top: 6px;
}

/* Minimized chat-box style */
.chat-box.minimized {
  width: 23px;
  height: auto;
  padding: 0 8px 8px 8px;
  transition: width 0.3s ease;
}

/* Hide chat messages, form, and emoji picker when minimized */
.chat-box.minimized .chat-messages,
.chat-box.minimized #chat-form,
.chat-box.minimized #emoji-picker {
  display: none;
}

/* Chat messages */
.chat-messages {
  position: relative;
  flex-grow: 1;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  margin-bottom: 8px;
  padding: 4px;
  background-color: white;
  border: 1px solid #ccc;
  white-space: pre-wrap;
  color: #666;
}

.messages-list {
  width: 100%;
  height: 100%;
}

#chat-settings-modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: none;
  background: inherit;
  border-radius: inherit;
  box-shadow: none;
  pointer-events: auto;
}

#chat-settings-modal[style*="display: flex"], #chat-settings-modal[style*="display: block"] {
  display: block !important;
}

.hide-messages .messages-list {
  display: none;
}


/* Name styling inside chat messages */
.chat-messages span.name {
  font-weight: bold;
  font-size: 12px;
  color: inherit;
  background: var(--frosted-bg);
  padding: 2px 10px;
  border-radius: 14px;
  margin-right: 6px;
  display: inline-block;
  user-select: none;
  position: relative;
  box-shadow:
    inset 0 1px 0 rgba(255 255 255 / 0.6),
    0 1px 3px rgba(0 0 0 / 0.1);
  overflow: hidden;
}

/* Glossy shine effect */
.chat-messages span.name::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 5%;
  width: 90%;
  height: 40%;
  background: linear-gradient(135deg, rgba(255 255 255 / 0.6), rgba(255 255 255 / 0) 80%);
  border-radius: 50% / 100%;
  pointer-events: none;
  filter: blur(2px);
  z-index: 1;
}

/* Chat form styles */
#chat-form {
  display: flex;
  gap: 5px;
  align-items: center;
  padding-top: 5px;
  border-top: 1px solid #ccc;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}

#name {
  flex: 0 0 60px;
  max-width: 60px;
  box-sizing: border-box;
}

#text {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
}

.messages-list > div {
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

#emoji-btn {
  font-size: 14px;
  border-radius: 50%;
  padding: 4px 10px;
  border: 2px outset #e0e0e0;
  background-color: white;
  cursor: pointer;
  width: 20px;
  height: auto;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#chat-form button[type="submit"] {
  box-sizing: border-box;
  font-family: monospace;
  font-size: 10px;
  padding: 4px 10px;
  border: 2px outset #e0e0e0;
  background-color: white;
  cursor: pointer;
  border-radius: 12px;
  white-space: nowrap;
  margin-left: auto;
}

/* Emoji picker styles */
.emoji-picker {
  position: absolute;
  bottom: 45px;
  right: 50px;
  background-color: white;
  border: 2px solid var(--light-blue);
  box-shadow:
    inset -2px -2px 1px rgba(255, 255, 255, 0.7),
    inset 2px 2px 2px rgba(160, 160, 160, 0.5),
    2px 2px 4px rgba(0, 0, 0, 0.1);
  padding: 8px;
  max-width: 220px;
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 10000;
  border-radius: 12px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background-clip: padding-box;
}

/* Emoji span styles */
.emoji-picker span {
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  transition: background 0.2s;
  padding: 4px 6px;
  border-radius: 4px;
}

.emoji-picker span:hover {
  background: #335577;
  color: #ffffff;
}

/* Hide when needed */
.hidden {
  display: none;
}

/* Scrollbar for emoji picker */
.emoji-picker::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.emoji-picker::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 12px;
  box-shadow: inset 1px 1px 2px white, inset -1px -1px 2px #c0c0c0;
}

.emoji-picker::-webkit-scrollbar-thumb {
  background: var(--light-blue);
  border-radius: 12px;
  box-shadow: inset 1px 1px 2px white, inset -1px -1px 2px #a0a0a0;
  border: 2px solid white;
  transition: background-color 0.3s ease;
}

.emoji-picker::-webkit-scrollbar-thumb:hover {
  background-color: #2e6bf5;
}

/* Firefox scrollbar */
.emoji-picker {
  scrollbar-width: thin;
  scrollbar-color: var(--light-blue) #f0f0f0;
}

/* ===================================================== */
/* == VISTA TASKBAR ==================================== */
/* ===================================================== */
#vista-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: var(--frosted-bg);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  padding-left: 10px;
  overflow: hidden;
  border-top: 2px solid var(--frosted-border);
  border-top: 2px solid rgba(255, 255, 255, 0.7);
  z-index: 1100;
}

#start-button {
  flex: 0 0 auto;
  width: 180px;
  height: 32px;
  padding: 4px 12px;
  font-family: 'Michroma', sans-serif;
  font-size: 12px;
  font-weight: bold;
  color: var(--light-blue);
  background: linear-gradient(180deg, #ffffff 0%, #e8f0f8 45%, #c9d3dd 100%);
  border: 2px solid var(--frosted-border);
  border-radius: 10px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255 255 255 / 0.6),
    0 1px 3px rgba(0 0 0 / 0.1);
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

#start-button:hover {
  background: linear-gradient(180deg, #ffffff 0%, #e8f0f8 45%, #c9d3dd 100%);
  border-color: var(--light-blue);
  color: var(--text-blue);
  box-shadow: 0 0 8px var(--light-blue);
}

#start-button:active {
  background-color: #9cc1db;
  transform: scale(0.95);
  box-shadow: none;
}

.scrolling-text {
  white-space: nowrap;
  overflow: hidden;
  flex: 1;
  position: relative;
}

.scrolling-text span {
  display: inline-block;
  padding-left: 100%;
  animation: slide-left 20s linear infinite;
  font-family: monospace, monospace;
  font-size: 13px;
  color: #446688;
  user-select: none;
  letter-spacing: 2px;
}

@keyframes slide-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Video/GIF Window */
.video-box {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 300px;
  height: 280px;
  display: flex;
  flex-direction: column;

  overflow: hidden;
  z-index: 1000;
  max-width: 90vw;
  max-height: 80vh;
  transition: height 0.3s ease, width 0.3s ease;
}

/* Minimized state */
.video-box.minimized {
  height: 28px;
  width: fit-content;
  max-width: none;
}

/* Header: title + minimize button */
.video-header {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f0f8 45%, #c9d3dd 100%);
  border: 2px solid #a0a0a0;

  cursor: pointer;
  user-select: none;
}

.video-title {
  font-family: 'Michroma', sans-serif;
  font-size: 12px;
  color: var(--text-blue);
}

.video-close {
  background: white;
  border: 2px outset #e0e0e0;
  border-radius: 6px;
  width: 16px;
  height: 16px;
  font-size: 12px;
  font-weight: bold;
  color: #888;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset -1px -1px 0 #fff, inset 1px 1px 0 #808080;
  margin-left: 4px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  transition: background-color 0.2s, box-shadow 0.2s;
}

.video-close:active {
  background-color: #d6e6f8;
}

.video-close:hover {
  background-color: var(--light-blue);
  box-shadow: 0 0 6px var(--light-blue);
}


/* Content: centers the GIF */
.video-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.video-box.minimized .video-content {
  display: none;
}

.video-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* General styles */
.name {
  font-family: 'Michroma', sans-serif;
  font-weight: normal;
  font-size: 9px;
}

.message {
  font-size: 13px;
  color: var(--light-blue);
}

.ascii-wrapper {
  text-align: center;
  margin: 20px auto;
  max-width: 100%;
  overflow: hidden;
}

.ascii-wrapper img {
  max-width: 45%;
  height: auto;
  display: inline-block;
  user-select: none;
}

/* Common button hover animation */
button,
.nav-btn {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

button:hover,
.nav-btn:hover {
  background-color: var(--light-blue);
  box-shadow: 0 0 8px var(--light-blue);
  transform: scale(1.05);
}

button:active,
.nav-btn:active {
  transform: scale(0.95);
  box-shadow: none;
  background-color: #9cc1db;
}

/* Mobile-First Utility Classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

h1, h2, h3, h4, h5 {
  line-height: 1.2;
  margin: 1.5em 0 0.5em;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.col {
  flex: 1 1 0;
  min-width: 200px;
}

/* Global Fluid Images/Videos */
/* ===== Overrides ===== */

/* Match chat window look */
.video-header {
  background-color: rgba(255, 255, 255, 0.7) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: 1px solid rgba(200, 200, 200, 0.5) !important;
}

.video-box {
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
}

.video-content {
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* Restore subtle border for Start button */
#start-button {
  border: 2px solid rgba(255, 255, 255, 0.7) !important;
}


img, video, .video-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- mobile rules moved to mobile.css --- */



/* Show/hide video boxes based on screen size */
.mobile-video {
  display: none;
}

.desktop-video {
  display: flex;
}
