/* 0) Animated gradient layer */
/* CAPTCHA Section Panel */
#captcha-section {
  position: relative;
  max-width: 400px;
  margin: 40px auto;
  background-color: #d3f0fa;        /* pale blue background */
  border: 1px solid #9ecedb;        /* slightly darker border */
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Header Bar */
#captcha-section::before {
  content: "Match the characters in the picture";
  display: block;
  background-color: #8ccbeb;        /* header blue */
  color: #000;
  font-weight: bold;
  padding: 8px 12px;
  border-bottom: 1px solid #9ecedb;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  font-size: 1rem;
}

/* “Help” link */
#captcha-section a {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.9rem;
  color: #0074cc;
  text-decoration: none;
}
#captcha-section a:hover {
  text-decoration: underline;
}

/* Inner content */
#captcha-section .inline {
  vertical-align: middle;
}

/* CAPTCHA image container */
#image {
  display: inline-block;
  margin: 16px 12px;
  padding: 4px;
  background-color: #fff;
  border: 1px solid #ccc;
  width: 220px;
  height: 60px;
  box-sizing: border-box;
}

/* Audio & reload icons */
#captcha-section button.audio,
#captcha-section button.reload {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  margin: 16px 4px;
  vertical-align: middle;
}
#captcha-section button.audio:hover,
#captcha-section button.reload:hover {
  background-color: rgba(0,0,0,0.05);
  border-radius: 2px;
}

/* Input field */
#user-input, input[type="text"] {
  width: calc(100% - 24px);
  margin: 8px 12px;
  padding: 6px 8px;
  font-size: 1rem;
  border: 1px solid #b0b0b0;
  border-radius: 2px;
  box-sizing: border-box;
}

/* Continue button */
#submit-btn, #captcha-section button.continue {
  display: inline-block;
  margin: 8px 12px 16px;
  padding: 6px 12px;
  font-size: 0.95rem;
  background-color: #f1f1f1;
  color: #444;
  border: 1px solid #999;
  border-radius: 2px;
  cursor: pointer;
}
#submit-btn:hover, #captcha-section button.continue:hover {
  background-color: #e0e0e0;
}

/* Status text under panel */
#key, #message {
  display: block;
  margin: 0 12px 12px;
  font-size: 0.9rem;
  color: #666;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -2;               /* behind .bg-jelly */
  background: linear-gradient(
    45deg,
    rgba(255, 0,0, 0.1),
    rgba(  0,200,0, 0.1),
    rgba(0,255,  0,0.1),
    rgba(150,  0,255, 0.1)
  );
  background-size: 400% 400%;
  animation: hueShift 20s ease infinite;
}

@keyframes hueShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* 1) Tiled‑image polka‑dot layer */
body::after {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;  /* clicks pass through */
  z-index: -1;           /* above the gradient, below your content */

  background-image: url("BUNNY.png");
  background-repeat: repeat;
  background-size: 140px 140px; /* size of each tile */
  opacity: 0.3;

  animation: driftDots 15s linear infinite;
}

@keyframes driftDots {
  from { background-position:   0   0; }
  to   { background-position:  40px 40px; }
}

/* 2) Jelly background (if you’re still using it) */
@keyframes jelly {
  from { background-size:  60px  60px, 24px  24px; }
  50%  { background-size: 120px 120px,100px 100px; }
  to   { background-size:  24px  24px,140px 140px; }
}

.bg-jelly {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: -1;

  background-size: 60px 60px;
  background-color: hsla(320,80%,60%,1);
  background-image:
    repeating-radial-gradient(hsla(320,100%,60%,.6) 0, hsla(220,100%,60%,0) 60%),
    repeating-radial-gradient(hsla(330,100%,40%,1) 12%, hsla(320,80%,60%,1) 24px);
  animation: jelly 1.4s cubic-bezier(.1,.4,.9,.6) infinite;
}

/* 3) Global reset */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}
/* Submit button */
#submit-btn {
  display: inline-block;
  margin: 10px;
  padding: 4px 12px;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #ffffff;
  background-color: #0055a5;       /* corporate blue */
  border: 2px outset #ffffff;      /* white beveled edge */
  cursor: pointer;
  box-sizing: border-box;
}

#submit-btn:hover {
  border-style: inset;              /* “pressed” border on hover */
  background-color: #003d7a;        /* darker blue */
}

#submit-btn:active {
  border-style: inset;
  background-color: #002d5c;        /* even darker when clicked */
}

/* 4) Sidebar (Mac‑style) */
.sidebar {
  transform: rotateY(5deg) translateZ(-20px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  position: fixed;
  top: 24px; left: 0; bottom: 0;
  width: 140px;
  background: #e0e0e0;
  border-right: 4px solid #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  overflow-y: auto;
  z-index: 50;
}

/* 5) User list */
.user-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 80%;
  border: 4px inset #000;
  height: 200px;
  overflow-y: auto;
}
.user-list li {
  display: flex;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  justify-content: center;
}
.user-list li.selected {
  background: #c0c0c0;
}
.user-list img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 6) ASCII box */
#ascii-anim {
  width: 4ch;
  line-height: 1.2em;
  font-family: 'Courier New', monospace;
  background: #000;
  color: #0f0;
  padding: 8px;
  margin: 24px 0;
  border: 2px inset #0f0;
  text-align: center;
}

/* 7) Main content */
.main-content {
  margin-left: 160px;  /* space for sidebar */
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

/* 8) Mosaic toolbar */
.mosaic-toolbar {
  position: fixed;
  top: 0; left: 160px; right: 0;
  height: 24px;
  background: #e0e0e0;
  border-bottom: 2px solid #000;
  display: flex;
  align-items: center;
  font-size: 12px;
  z-index: 100;
}
.mosaic-toolbar .menus span {
  padding: 0 8px;
  line-height: 24px;
  cursor: default;
}
.mosaic-toolbar .icons {
  margin-left: auto;
  display: flex;
  padding-right: 8px;
}
.mosaic-toolbar .icon {
  width: 20px; height: 20px;
  margin-left: 4px;
  text-align: center;
  line-height: 20px;
  border: 4px inset #fff;
  border-right:1px outset #36013F;
  border-bottom:1px outset #36013F;
  background: #c0c0c0;
  cursor: pointer;
}

/* 9) UCLA section */
.ucla-content {
  margin-top: 40px; /* below toolbar */
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ucla-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 16px;
  animation: float3d 6s ease-in-out infinite;
}
.ucla-header marquee {
  animation: marquee 5s linear infinite;
  color: #000;
  font-size: 14px;
  margin-bottom: 8px;
}
.ucla-header img {
  max-width: 100px;
  border: 4px outset #fff;
  background: #c0c0c0;
}
/* Base button look: outset border, monospace font, drop shadow */
.nav-buttons button {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  margin: 0 5px;
  padding: 8px 16px;
  background: #0066cc;        /* vivid blue face */
  color: #fff;               /* white text */
  border: 2px outset #fff;   /* classic raised edge */
  cursor: pointer;
  box-shadow: 2px 2px 0 #333; /* simple drop shadow */
  transition: background .2s, transform .1s;
}

/* Hover state: darker face, slight lift, inset edge */
.nav-buttons button:hover {
  background: #005bb5;        /* darker blue */
  transform: translateY(-1px);
  border-style: inset;
}

/* Active (pressed) state: inset look, moved down/right */
.nav-buttons button:active {
  transform: translate(2px,2px);
  border-style: inset;
}

@keyframes marquee {
  0%   { transform: translateX(0%); }
  50%  { transform: translateX(50%); }
  100% { transform: translateX(0%); }
}
@keyframes float3d {
  0%   { transform: translateZ(0) translateY(0); }
  50%  { transform: translateZ(20px) translateY(-5px); }
  100% { transform: translateZ(0) translateY(0); }
}

/* 10) p5 canvas */
#canvas-container,
#defaultCanvas0 {
  margin: 16px auto 0;
  border: 8px solid #36013F;
  background: #fff;
  display: block;
}
