/* ==========================================================================
   Secret Corner — Collapsible Drawer Sidebar + Full Screen Masonry Canvas
   ========================================================================== */

:root {
  --bg-main: #09090b;             /* Zinc-950 */
  --bg-card: #141417;             /* Zinc-900 */
  --bg-card-hover: #16161a;
  --bg-input: #0e0e11;
  --border-muted: rgba(255, 255, 255, 0.08); /* border-white/10 */
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-main: #f4f4f5;           /* Zinc-100 */
  --text-muted: #71717a;          /* Zinc-500 */
  --text-subtle: #a1a1aa;         /* Zinc-400 */
  --accent: #2563eb;
  --danger-text: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Custom Dark Minimalist Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #27272a var(--bg-main);
}

html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   Topbar Navigation
   ========================================================================== */

.topbar {
  background-color: rgba(9, 9, 11, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sidebar-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: -0.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-btn:hover {
  border-color: var(--border-hover);
}

.brand-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.brand-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-whisper-btn {
  font-size: 0.82rem;
  padding: 7px 16px;
}

.region-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.region-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.region-dropdown {
  background-color: var(--bg-input);
  color: var(--text-subtle);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  max-width: 200px;
}

.region-dropdown:hover, .region-dropdown:focus {
  border-color: var(--border-hover);
  color: var(--text-main);
}

/* ==========================================================================
   Collapsible Slide-Out Sidebar Drawer
   ========================================================================== */

.app-container {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background-color: #111114;
  border-right: 1px solid var(--border-muted);
  z-index: 300;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-muted);
}

.sidebar-title {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.025em;
}

.close-sidebar-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

.close-sidebar-btn:hover {
  color: var(--text-main);
}

/* Sidebar Nav */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-heading {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item, .cat-item {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-item:hover, .cat-item:hover {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.nav-item.active, .cat-item.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-weight: 600;
}

.nav-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.nav-item.active .nav-indicator {
  background-color: var(--accent);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 250;
}

/* ==========================================================================
   Whisper Secret Modal (Glassmorphism)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.whisper-modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  transform: translateY(0) scale(1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 20px;
}

.modal-overlay.hidden .whisper-modal {
  transform: translateY(20px) scale(0.98);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text-main);
}

.close-modal-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.close-modal-btn:hover {
  color: var(--text-main);
}

.whisper-textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1.15rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  min-height: 140px;
  margin-bottom: 24px;
}

.whisper-textarea::placeholder {
  color: var(--text-muted);
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-muted);
  padding-top: 20px;
}

.modal-controls {
  display: flex;
  gap: 12px;
}

.modal-select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  padding: 8px 14px;
  outline: none;
  cursor: pointer;
}

.modal-select:hover, .modal-select:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-publish {
  padding: 10px 24px;
  font-size: 0.95rem;
  border-radius: 10px;
}

/* ==========================================================================
   Main Full Screen Canvas
   ========================================================================== */

.main-canvas {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.feed-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.feed-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.feed-count-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-muted);
  padding: 2px 10px;
  border-radius: 12px;
}

/* 100% Full Width Screen Masonry Grid (3-4 Columns) */
.full-masonry-grid {
  flex: 1;
  columns: 3 320px;
  column-gap: 20px;
  min-height: 350px;
}

.secret-card {
  break-inside: avoid;
  margin-bottom: 20px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.secret-card:hover {
  border-color: var(--border-hover);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-subtle);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-muted);
  padding: 2px 10px;
  border-radius: 12px;
}

.region-badge {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-text {
  font-size: 0.94rem;
  color: var(--text-main);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 18px;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border-muted);
}

.toggle-comments-btn {
  background: none;
  border: none;
  color: var(--text-subtle);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.toggle-comments-btn:hover {
  color: var(--text-main);
}

/* Comments Section */
.comments-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-muted);
}

.comments-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.comment-card {
  background-color: var(--bg-input);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.comment-content {
  font-size: 0.88rem;
  color: var(--text-main);
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-field {
  flex: 1;
  background-color: var(--bg-input);
  border: 1px solid var(--border-muted);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}

.comment-field:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

/* Buttons (Flat UI) */
.btn {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-main);
}

.btn-primary:hover {
  background-color: #e4e4e7;
}

.btn-subtle {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-muted);
  padding: 4px 10px;
  font-size: 0.78rem;
}

.btn-subtle:hover {
  color: var(--danger-text);
  border-color: rgba(239, 68, 68, 0.3);
  background-color: var(--danger-bg);
}

/* Protected Badge */
.protected-badge {
  background-color: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 0.78rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Info Cards */
.info-card {
  margin-bottom: 24px;
}

.card-heading {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
}

.info-body {
  font-size: 0.9rem;
  color: var(--text-subtle);
  line-height: 1.6;
}

.hidden {
  display: none !important;
}

.loading-state, .empty-state {
  column-span: all;
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Footer (Sticky at viewport bottom when page has few items) */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-muted);
  padding: 24px 0;
  background-color: var(--bg-main);
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .full-masonry-grid {
    columns: 2 280px;
  }
}

@media (max-width: 600px) {
  .full-masonry-grid {
    columns: 1;
  }
}
