/* ==========================================================================
   SignSpeak - Accessible, High-Contrast & Optimized Stylesheet (v2)
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #0a0f1d;
  --bg-surface: #111827;
  --bg-surface-alt: #1f2937;
  --bg-card: rgba(17, 24, 39, 0.92);
  --border-color: #374151;
  --border-subtle: #242f3d;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  /* Brand & Status Accents */
  --accent-cyan: #06b6d4;
  --accent-cyan-hover: #0891b2;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;
  --focus-ring: #38bdf8;

  /* Sizing & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 12px -2px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 24px -4px rgba(0,0,0,0.6);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.94);
  --border-color: #cbd5e1;
  --border-subtle: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --focus-ring: #0284c7;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 6px 12px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 14px 24px -4px rgba(0,0,0,0.14);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Accessible Focus Outline */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* --- Header --- */
.app-header {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-logo-icon {
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.app-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.app-tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface-alt);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  min-height: 44px; /* Accessible touch target */
}

.btn:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #042f2e;
}

.btn-primary:hover {
  background-color: var(--accent-cyan-hover);
  border-color: var(--accent-cyan-hover);
}

.btn-danger {
  background-color: var(--accent-rose);
  border-color: var(--accent-rose);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #e11d48;
}

/* --- Main Layout Grid --- */
.main-layout {
  max-width: 1400px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  flex: 1;
}

@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 0 1rem;
  }
}

/* --- Left Column: Camera & HUD --- */
.camera-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.camera-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.camera-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Video Wrapper */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.8);
}

#webcam-video, #output-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirrored view */
}

#output-canvas {
  pointer-events: none;
}

/* Ghost Hand Outline Guide */
.ghost-hand-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 200px;
  border: 2px dashed rgba(6, 182, 212, 0.4);
  border-radius: 40px 40px 10px 10px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(6, 182, 212, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem;
  animation: pulse-ghost 2s infinite ease-in-out;
  transition: opacity 0.3s ease;
}

@keyframes pulse-ghost {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.85; }
}

/* Floating HUD on Video */
.video-hud-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 10;
  pointer-events: none;
}

.fps-badge {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-family: monospace;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--accent-cyan);
}

.hud-right-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.status-badge {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-align: right;
  transition: var(--transition);
}

.status-badge.ready {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.status-badge.holding {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.status-badge.cooldown {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

.status-badge.thumbs-up {
  border-color: var(--accent-indigo);
  color: #a5b4fc;
}

.status-badge.low-confidence {
  border-color: var(--accent-rose);
  color: var(--accent-rose);
}

.thumbs-up-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: rgba(99, 102, 241, 0.95);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  animation: pulse-badge 1s infinite alternate;
}

@keyframes pulse-badge {
  from { transform: scale(0.96); }
  to { transform: scale(1.04); }
}

/* Detection Dashboard Display */
.detection-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  position: relative;
}

.detection-main {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Circular Progress Ring */
.progress-ring-container {
  position: relative;
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-ring-bg {
  stroke: var(--border-color);
}

.progress-ring-circle {
  stroke: var(--accent-emerald);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.08s linear;
}

.letter-glyph {
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--text-primary);
  z-index: 2;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.letter-glyph.pulse-commit {
  transform: scale(1.45);
  color: var(--accent-emerald);
}

.detection-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.meta-confidence {
  font-size: 1.05rem;
  font-weight: 800;
  transition: color 0.3s ease;
}

.conf-high { color: var(--accent-emerald); }
.conf-med { color: var(--accent-amber); }
.conf-low { color: var(--accent-rose); }

/* Top-3 Runner Up Predictions */
.top3-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  align-items: center;
}

.top3-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.top3-items {
  display: flex;
  gap: 0.5rem;
  flex: 1;
}

.top3-pill {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
}

.top3-pill-bar {
  height: 4px;
  background-color: var(--accent-cyan);
  border-radius: 2px;
  transition: width 0.15s ease;
}

/* Cooldown Bar */
.cooldown-wrap {
  margin-top: 0.75rem;
}

.cooldown-progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.cooldown-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-rose));
  transition: width 0.08s linear;
}

/* Camera Error Alert */
.alert-card {
  background-color: rgba(244, 63, 94, 0.15);
  border: 1px solid var(--accent-rose);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-primary);
}

/* --- Right Column: Sentence Builder & Controls --- */
.builder-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.builder-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(12px);
}

/* History Trail Chips */
.history-trail-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.4rem 0.6rem;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-sm);
  min-height: 38px;
}

.history-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.history-chips {
  display: flex;
  gap: 0.35rem;
}

.history-chip {
  padding: 0.2rem 0.55rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  animation: chip-appear 0.2s ease-out;
}

@keyframes chip-appear {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* Text Box */
.sentence-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sentence-textarea {
  width: 100%;
  min-height: 140px;
  padding: 1rem;
  background-color: var(--bg-surface-alt);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
}

.sentence-textarea:focus {
  border-color: var(--accent-cyan);
  background-color: var(--bg-surface);
}

.sentence-textarea.flash-commit {
  border-color: var(--accent-emerald);
}

/* Word Suggestions Autocomplete */
.suggestions-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.suggestions-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.suggestions-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 38px;
  align-items: center;
}

.suggestion-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.word-chip {
  padding: 0.45rem 0.95rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  cursor: pointer;
  transition: var(--transition);
  min-height: 40px;
}

.word-chip:hover {
  background-color: var(--accent-cyan);
  color: #042f2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

/* Action Button Grid (6 columns on desktop) */
.builder-actions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.55rem;
}

@media (max-width: 768px) {
  .builder-actions-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 420px) {
  .builder-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.action-btn {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-md);
  min-height: 46px;
  white-space: nowrap;
}

/* Speak Button */
.speak-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-speak-large {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.35rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
  min-height: 58px;
}

.btn-speak-large:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.55);
}

.btn-speak-large.speaking-active {
  animation: speaking-pulse 0.8s infinite alternate;
}

@keyframes speaking-pulse {
  from { box-shadow: 0 0 10px #10b981; }
  to { box-shadow: 0 0 28px #34d399; }
}

.speaking-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.wave-bar {
  width: 4px;
  height: 16px;
  background-color: var(--accent-emerald);
  border-radius: 2px;
  animation: wave 0.8s infinite ease-in-out;
}

.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 100% { height: 6px; }
  50% { height: 22px; }
}

/* Quick Phrases */
.quick-phrases-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.quick-phrases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.quick-phrase-chip {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-phrase-chip:hover {
  background-color: var(--accent-indigo);
  border-color: var(--accent-indigo);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Speech Controls Card */
.speech-settings-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.75rem;
}

@media (max-width: 600px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.setting-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.select-input, .range-input {
  width: 100%;
  padding: 0.5rem;
  background-color: var(--bg-surface-alt);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  min-height: 40px;
}

.toggle-item {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

/* --- Floating Toast Notification --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background-color: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-cyan);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1), toast-out 0.3s cubic-bezier(0.16, 1, 0.3, 1) 2.2s forwards;
  pointer-events: auto;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 100;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.close-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-alt);
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.modal-body ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-body li strong {
  color: var(--text-primary);
}

/* ASL Grid */
.asl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.asl-card {
  background-color: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.asl-card:hover {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #042f2e;
  transform: translateY(-2px);
}

.asl-card-title {
  font-size: 1.4rem;
  font-weight: 800;
}

.asl-card-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.asl-card:hover .asl-card-sub {
  color: #042f2e;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  margin-top: auto;
}

.hidden {
  display: none !important;
}
