/* Mizo Anonymous Board - Modern Frutiger Aero Design */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Quicksand:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #fdf9f3 0%, #fffbf5 50%, #fef6ee 100%);
  background-attachment: fixed;
  color: #333;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37 0%, #c9a237 100%);
  border-radius: 8px;
  border: 2px solid #f0f0f0;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e8c847 0%, #d4af37 100%);
}

/* Board Container */
.board-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  max-width: 1000px;
  height: 90vh;
  background: linear-gradient(135deg, #fff9f3 0%, #fffcf7 50%, #fff8f0 100%);
  border: 4px solid #d4af37;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 
    0 20px 60px rgba(212, 175, 55, 0.15),
    0 0 0 1px rgba(212, 175, 55, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  z-index: 500;
  animation: slideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Board Header */
.board-header {
  padding: 20px 24px;
  background: linear-gradient(180deg, #f5f5f5 0%, #ececec 100%);
  border-bottom: 2px solid #d4af37;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fredoka One', cursive;
  font-size: 20px;
  font-weight: 700;
  color: #333;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.board-header img {
  width: 24px;
  height: 24px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.board-header > div:last-child {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.board-header a,
.board-header button {
  padding: 6px 14px;
  background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
  border: 1px solid #999;
  border-radius: 6px;
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.board-header a:hover,
.board-header button:hover {
  background: linear-gradient(180deg, #f9f9f9 0%, #efefef 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.board-header a:active,
.board-header button:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Archive Panel */
.archive-panel {
  background: linear-gradient(180deg, #fff 0%, #faf8f6 100%);
  border-top: 2px solid #e0e0e0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  max-height: 280px;
  overflow: hidden;
}

#archiveDates {
  overflow-y: auto;
  padding: 12px;
  max-height: 240px;
}

#archiveDates > div {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-bottom: 1px dashed #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  font-weight: 500;
  color: #666;
}

#archiveDates > div:hover {
  background: linear-gradient(90deg, #fff9f0 0%, #fff5e6 100%);
  color: #d4af37;
  padding-left: 14px;
}

/* Board Input Section */
.board-input-section {
  padding: 16px 24px;
  background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
  border-bottom: 2px solid #e0e0e0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#postInput {
  width: 100%;
  height: 90px;
  padding: 12px;
  font-family: 'Quicksand', sans-serif;
  font-size: 14px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  resize: none;
  background: #fff;
  color: #333;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

#postInput:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 0 0 3px rgba(212, 175, 55, 0.1);
}

#postInput::placeholder {
  color: #999;
}

/* Post Button and Captcha Controls */
.board-input-section > div {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

#postBtn {
  padding: 10px 24px;
  background: linear-gradient(180deg, #d4af37 0%, #c9a237 100%);
  border: 2px solid #b8921f;
  border-radius: 8px;
  font-family: 'Fredoka One', cursive;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
  flex-shrink: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#postBtn:hover {
  background: linear-gradient(180deg, #e8c847 0%, #d4af37 100%);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
  transform: translateY(-2px);
}

#postBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

#captchaWrap {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 200px;
}

#getCaptcha {
  padding: 8px 12px;
  background: linear-gradient(180deg, #f0f0f0 0%, #e0e0e0 100%);
  border: 1px solid #999;
  border-radius: 6px;
  font-family: 'Quicksand', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

#getCaptcha:hover {
  background: linear-gradient(180deg, #f9f9f9 0%, #efefef 100%);
}

#captchaQuestion {
  color: #666;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

#captchaAnswer {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}

.board-input-section > div > span {
  font-size: 12px;
  color: #888;
  line-height: 40px;
  flex: 1;
  min-width: 200px;
}

/* Posts Container */
.posts-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  background: #fff;
  border-radius: 0 0 16px 16px;
}

.posts-container > div:not(:first-child) {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-left: 4px solid #d4af37;
  background: linear-gradient(90deg, #fffbf5 0%, #fff 100%);
  border-radius: 6px;
  border: 1px solid #e8dcc4;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.08);
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.15s ease;
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.posts-container > div:hover {
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.12);
}

.posts-container div > div:first-child {
  font-size: 12px;
  margin-bottom: 8px;
  color: #999;
  font-weight: 500;
}

.posts-container span {
  color: #666;
  font-weight: 600;
}

.posts-container div > div:last-child {
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.6;
  color: #333;
  font-size: 14px;
}

/* Empty state */
.posts-container > div:first-child {
  padding: 60px 30px;
  color: #bbb;
  text-align: center;
  font-style: italic;
}

/* Blinkies */
.buttons-n-blinkers {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 99;
}

.buttons-n-blinkers div {
  display: flex;
  gap: 12px;
  width: 240px;
}

.buttons-n-blinkers img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.buttons-n-blinkers div.play {
  animation: slideLeft 18s linear infinite;
}

.buttons-n-blinkers div.follower {
  position: absolute;
  left: 240px;
}

@keyframes slideLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-240px);
  }
}

/* hCaptcha styling */
.h-captcha {
  display: inline-block;
  transform: scale(0.9);
  transform-origin: 0 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .board-container {
    width: 98vw;
    height: 92vh;
  }

  .board-header {
    font-size: 16px;
    padding: 16px 16px;
  }

  .board-input-section {
    padding: 12px 16px;
  }

  .posts-container {
    padding: 16px 12px;
  }

  .buttons-n-blinkers {
    bottom: 20px;
    left: 12px;
  }

  #postInput {
    height: 70px;
    font-size: 13px;
  }

  .board-input-section > div {
    flex-direction: column;
    align-items: stretch;
  }

  #postBtn {
    width: 100%;
  }

  #captchaWrap {
    flex-direction: column;
    min-width: auto;
  }
}

/* Selection highlight */
::selection {
  background-color: #d4af37;
  color: #fff;
}

::-moz-selection {
  background-color: #d4af37;
  color: #fff;
}
