/* style.css - shared between display, input, admin */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f3f3;
  color: #111;
}

/* DISPLAY HEADER */
#header {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.9);
  padding: 10px 24px;
  border-radius: 999px;
  z-index: 40;
}

#noteCount {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 18px;
  font-weight: 600;
  background: rgba(255,255,255,0.9);
  padding: 8px 16px;
  border-radius: 12px;
  z-index: 50;
}

#clearBtn {
  position: absolute;
  top: 20px;
  right: 20px;
  border: none;
  background: #ff6b6b;
  color: white;
  font-weight: 600;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  z-index: 50;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

#clearBtn:hover {
  background: #ff4b4b;
}

#wall {
  position: fixed;
  inset: 0;
}

/* INPUT PAGE */
.input-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(circle at top, #ffffff, #e6ecf4);
}

.input-container {
  width: min(520px, 90vw);
  background: white;
  padding: 24px 24px 28px;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.input-container h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.input-container h2 {
  margin: 12px 0 4px;
  font-size: 18px;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 13px;
  color: #555;
}

textarea#message {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  padding: 10px 12px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}

.color-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

#color {
  width: 36px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #d0d5dd;
  padding: 0;
}

#sendBtn {
  display: inline-block;
  border: none;
  background: #111827;
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#sendBtn:hover {
  background: #000000;
}

.status {
  margin-top: 10px;
  font-size: 13px;
}

.status.ok {
  color: #16a34a;
}

.status.error {
  color: #dc2626;
}

/* SEARCH SECTION */
.search-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.search-bar input {
  flex: 1;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #d0d5dd;
  font-size: 14px;
}

.search-bar button {
  border: none;
  background: #111827;
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.search-bar button:hover {
  background: #000000;
}

#searchResults {
  margin-top: 8px;
}

/* search note card */
.search-note {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: #f9fafb;
}

.search-note-text {
  font-size: 14px;
  margin-bottom: 6px;
}

.search-note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-note-votes {
  font-size: 13px;
  color: #4b5563;
}

.search-note button.likeBtn {
  border: none;
  background: #111827;
  color: white;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

/* ADMIN PAGE */
.admin-body {
  background: #0f172a;
  color: #e5e7eb;
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 32px 16px;
}

.admin-container {
  width: min(900px, 100%);
  background: #020617;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.admin-container h1 {
  margin: 0 0 16px;
}

#adminPw {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #020617;
  color: #e5e7eb;
  font-size: 14px;
}

#loginBtn {
  margin-left: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: #4f46e5;
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

#loginBtn:hover {
  background: #4338ca;
}

.admin-actions {
  margin-top: 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
}

.admin-actions button {
  padding: 6px 14px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #e5e7eb;
  cursor: pointer;
  font-size: 13px;
}

.admin-actions button:hover {
  background: #1f2937;
}

.notes-list {
  margin-top: 8px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-note-card {
  border-radius: 12px;
  background: #020617;
  border: 1px solid #111827;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.admin-note-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
  gap: 8px;
}

.admin-note-time {
  flex: 1;
}

.admin-note-votes {
  font-size: 12px;
}

.admin-note-hidden {
  font-size: 11px;
  color: #f97316;
  font-weight: 600;
}

.admin-note-text {
  font-size: 14px;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.admin-note-actions {
  display: flex;
  gap: 8px;
}

.admin-note-actions button {
  padding: 4px 10px;
  border-radius: 999px;
  border: none;
  font-size: 12px;
  cursor: pointer;
}

.admin-note-actions .hideBtn {
  background: #0ea5e9;
  color: #0f172a;
}

.admin-note-actions .hideBtn:hover {
  background: #0284c7;
}

.admin-note-actions .deleteBtn {
  background: #ef4444;
  color: #fef2f2;
}

.admin-note-actions .deleteBtn:hover {
  background: #dc2626;
}
