/* MegaPost Mini App Styles - Dark Theme with Purple Accents (matching Figma) */

:root {
  /* Dark theme matching Figma and MAX messenger */
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-tertiary: #252542;
  --bg-card: #1e1e35;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  
  --accent-primary: #9d47c5;
  --accent-secondary: #8B3AB0;
  --accent-gradient: linear-gradient(135deg, #9d47c5 0%, #8B3AB0 100%);
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --border-color: #2a2a45;
  --border-radius: 16px;
  --border-radius-sm: 12px;
  --border-radius-lg: 20px;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  --bottom-button-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#root {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ==================== LAYOUT ==================== */

.app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-primary);
}

.app.wizard {
  padding-bottom: var(--bottom-button-height);
}

.app.wizard--ad-dialog {
  padding-bottom: 0;
}

/* ==================== WIZARD STEPS ==================== */

.wizard-step {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.wizard-step__content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.wizard-step__buttons {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==================== AD POST DIALOG ==================== */

.ad-dialog {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #1c1c1c;
}

.ad-dialog__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 28px 24px 20px;
  text-align: center;
  overflow-y: auto;
  gap: 16px;
}

.ad-dialog__icon {
  width: 140px;
  height: 140px;
  margin-bottom: 8px;
  object-fit: contain;
}

.ad-dialog__title {
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.ad-dialog__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

.ad-dialog__report-card {
  width: 100%;
  max-width: 420px;
  margin-top: 8px;
  padding-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ad-dialog__buttons {
  margin-top: auto;
  padding: 12px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #191919;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Report toggle row */
.ad-dialog__report-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
}

.ad-dialog__report-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.ad-dialog__report-hint {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.ad-dialog__yes-button {
  margin-top: 8px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
  margin-right: 4px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch__slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #3a3a3a;
  transition: 0.3s;
  border-radius: 32px;
}

.toggle-switch__slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-switch__slider {
  background: var(--accent-gradient);
}

.toggle-switch input:checked + .toggle-switch__slider:before {
  transform: translateX(26px);
}

/* ==================== SECTION CARD ==================== */

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}

.section-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-card__content {
  /* Content styles */
}

/* ==================== TIMER GRID ==================== */

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 24px;
  align-items: stretch;
}

.timer-btn {
  min-width: 0;
  min-height: 82px;
  padding: 14px 10px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 4px;
  line-height: 1.15;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.timer-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.timer-btn--active {
  background: var(--accent-primary);
  color: white;
}

.timer-btn--icon-only {
  padding: 14px;
}

.timer-btn__custom-icon {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin: 0;
}

/* ==================== MULTIPOST TOGGLE ==================== */

.multipost-toggle {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
}

.toggle-btn {
  flex: 1;
  padding: 16px;
  border: none;
  background: var(--bg-tertiary);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn:first-child {
  border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.toggle-btn:last-child {
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.toggle-btn--active {
  background: var(--accent-primary);
  color: white;
}

.add-channel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--border-radius);
  font-size: 15px;
  color: var(--text-primary);
  cursor: pointer;
}

.repeat-copy-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--border-radius);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent-primary);
  cursor: pointer;
}

.repeat-copy-btn:hover:not(:disabled) {
  background: var(--bg-secondary);
}

.repeat-copy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== CHANNEL LIST ==================== */

.selected-channels {
  margin-top: 16px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.channel-item:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

.channel-item--selected {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--accent-primary);
}

.channel-item__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
}

.channel-item__avatar--image {
  object-fit: cover;
  background: none;
}

.channel-item__info {
  flex: 1;
  min-width: 0;
}

.channel-item__title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-item__username {
  font-size: 13px;
  color: var(--text-secondary);
}

.channel-item__remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
}

.channel-item__check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent-primary);
}

.channel-item--selected .channel-item__check {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==================== BOTTOM BUTTON ==================== */

.bottom-button-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, var(--bg-primary) 30%);
  z-index: 100;
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent-gradient);
  color: white;
}

.btn--primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn--secondary {
  background: #383838;
  color: var(--text-primary);
  border: none;
}

.btn--secondary:hover:not(:disabled) {
  background: #454545;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.btn--full {
  width: 100%;
}

.btn--lg {
  padding: 18px 32px;
  font-size: 18px;
}

.btn--small {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* ==================== DELETE OPTIONS (RETIME) ==================== */

.delete-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.error-text {
  color: #ef4444;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

/* ==================== CALENDAR ==================== */

.calendar {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 16px;
}

.calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar__month {
  font-size: 18px;
  font-weight: 600;
}

.calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar__weekday {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
  font-weight: 500;
}

.calendar__day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
  background: var(--bg-card);
}

.calendar__day:hover {
  background: var(--accent-primary);
  color: white;
}

.calendar__day--empty {
  background: transparent;
  cursor: default;
}

.calendar__day--empty:hover {
  background: transparent;
}

.calendar__day--today {
  font-weight: 700;
  color: var(--warning);
}

.calendar__day--selected {
  background: var(--accent-primary);
  color: white;
}

.calendar__day--disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.calendar__day--disabled:hover {
  background: var(--bg-card);
}

/* ==================== TIME PICKER ==================== */

.time-picker-container {
  display: flex;
  justify-content: center;
}

.custom-time-picker {
  margin-top: 16px;
}

.time-picker-mode {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.time-picker-mode__toggle {
  min-width: 180px;
}

.time-wheel-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.time-wheel-picker__wrapper {
  width: 100%;
  max-width: 320px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 14px 16px;
  gap: 16px;
}

.time-wheel-picker__labels {
  width: 100%;
  max-width: 320px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  text-align: center;
}

.time-wheel-picker__labels:has(> :nth-child(2):last-child) {
  grid-template-columns: repeat(2, 1fr);
}

.time-wheel-picker__label {
  font-size: 14px;
  color: var(--text-muted);
}

.time-wheel-picker__wrapper ul,
.time-wheel-picker__wrapper li {
  margin: 0;
  padding: 0;
  list-style: none;
}

[data-rwp-wrapper].time-wheel-picker__wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  width: 100%;
  align-items: stretch;
  justify-content: space-between;
  user-select: none;
  perspective: none;
}

.time-wheel-picker__option {
  font-size: 22px;
  color: var(--text-muted);
  transition: color 0.18s ease, opacity 0.18s ease;
}

.time-wheel-picker__wrapper [data-rwp] {
  position: relative;
  overflow: hidden;
  flex: 1;
  cursor: default;
}

.time-wheel-picker__wrapper [data-rwp]:focus-visible {
  outline: none;
}

.time-wheel-picker__highlight {
  position: absolute;
  top: 50%;
  width: 100%;
  overflow: hidden;
  transform: translateY(-50%);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(157, 71, 197, 0.12);
}

.time-wheel-picker__highlight-item {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
}

.time-wheel-picker__wrapper [data-rwp-highlight-list] {
  position: absolute;
  width: 100%;
}

.time-wheel-picker__wrapper [data-rwp-options] {
  position: absolute;
  top: 50%;
  left: 0;
  display: block;
  width: 100%;
  height: 0;
  margin: 0 auto;
  will-change: transform;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.time-wheel-picker__wrapper [data-rwp-option],
.time-wheel-picker__wrapper [data-rwp-highlight-item] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.time-wheel-picker__wrapper [data-rwp-option] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 0.875rem;
  will-change: visibility;
}

.time-wheel-picker__wrapper [data-rwp] {
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
}

.time-wheel-picker__wrapper [data-rwp-option][data-disabled],
.time-wheel-picker__wrapper [data-rwp-highlight-item][data-disabled] {
  opacity: 0.18;
}

.time-warning {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.15);
  border-radius: var(--border-radius-sm);
  color: var(--error);
  font-size: 13px;
  text-align: center;
}

.time-input-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  flex-wrap: wrap;
}

.time-input-field {
  width: 70px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 24px;
  text-align: center;
}

.time-input-field:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.time-input-separator {
  color: var(--text-muted);
  font-size: 24px;
  font-weight: 600;
}

/* ==================== TODAY POSTS ==================== */

.today-posts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.today-post {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
}

.today-post__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 6px;
}

.today-post__time {
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.today-post__text {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-post__error {
  color: var(--error);
  font-size: 12px;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== CONFIRMATION ==================== */

.confirmation {
  text-align: center;
}

.confirmation__emoji {
  font-size: 80px;
  margin-bottom: 24px;
}

.confirmation__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.confirmation__date {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.confirmation__channel {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ==================== Shared Post Preview Card ==================== */

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.preview-card__image {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 300px;
}

.preview-card__media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.preview-card__media-placeholder--video {
  padding: 48px 16px;
  background: rgba(255, 255, 255, 0.04);
}

.preview-card__play-icon {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.45);
}

.preview-card__media-icon {
  font-size: 48px;
}

.preview-card__media-label {
  font-size: 14px;
  color: var(--text-muted);
}

.preview-card__text {
  padding: 16px;
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.6;
  text-align: left;
}

.preview-card__text blockquote {
  margin: 12px 0 0;
  padding: 0 0 0 12px;
  border-left: 3px solid rgba(255, 255, 255, 0.28);
  color: var(--text-primary);
}

.preview-card__text blockquote:first-child {
  margin-top: 0;
}

.preview-card__buttons {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-card__btn-row {
  display: flex;
  gap: 8px;
}

.preview-card__btn-row .preview-card__btn {
  flex: 1;
  min-width: 0;
}

.preview-card__btn {
  display: block;
  text-align: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--border-radius);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.preview-card__btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.preview-card__btn--disabled {
  opacity: 0.7;
  cursor: default;
  pointer-events: none;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  font-size: 15px;
}

.checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-primary);
}

/* ==================== SUCCESS ==================== */

.success {
  text-align: center;
}

.success__emoji {
  font-size: 100px;
  margin-bottom: 24px;
}

.success__title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.success__text {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

/* ==================== MODALS ==================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow-y: auto;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.modal--full {
  max-height: 90vh;
  text-align: left;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal__header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal__content {
  margin-bottom: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.modal--full .modal__content {
  margin-right: -20px;
  padding-right: 20px;
}

.modal__emoji {
  font-size: 80px;
  margin-bottom: 16px;
}

.modal__title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==================== PUBLISH CHOICE MODAL ==================== */

.publish-choice-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.publish-choice {
  width: 100%;
  max-width: 320px;
  background: #2b2b35;
  border-radius: 24px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.publish-choice__text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.publish-choice__error {
  font-size: 12px;
  color: var(--error);
  margin-bottom: 12px;
}

.publish-choice__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.publish-choice__btn {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: #3b3b3b;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.publish-choice__btn--primary {
  background: #4a4a4a;
}

.publish-choice__btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.publish-choice__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== LOADING & ERROR ==================== */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 40px 20px;
  text-align: center;
}

.error-state__icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.error-state h2 {
  font-size: 20px;
  margin-bottom: 8px;
}

.error-state p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.error-message {
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--border-radius);
  color: var(--error);
  font-size: 14px;
  margin-bottom: 16px;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

/* ==================== OBSERVER PAGE ==================== */

.observer {
  padding: 24px 16px;
  overflow-y: auto;
  height: 100%;
}

.observer__header {
  text-align: center;
  margin-bottom: 24px;
}

.observer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.observer__logo-image {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.observer__logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.observer__logo-link {
  color: var(--text-primary);
  text-decoration: none;
}

.observer__logo-link:visited {
  color: var(--text-primary);
}

.observer__logo-link:hover,
.observer__logo-link:focus-visible {
  color: var(--text-primary);
  text-decoration: underline;
}

.observer__title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.observer__date {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Stats bar */
.observer__stats {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px 8px;
  margin-bottom: 12px;
}

.observer__stat {
  flex: 1;
  text-align: center;
}

.observer__stat-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.observer__stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Frozen indicator */
.observer__frozen {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px;
  margin-bottom: 8px;
}

/* Refresh */
.observer__refresh {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.observer__refresh-time {
  font-size: 14px;
  color: var(--text-secondary);
}

.observer__refresh-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.observer__refresh-btn:active {
  background: var(--bg-tertiary);
}

.observer__refresh-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.observer__refresh-btn--spinning {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Credit */
.observer__credit {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.observer__credit-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

/* Preview header */
.observer__preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Post preview card — observer uses shared .preview-card */
.observer .preview-card {
  margin-bottom: 28px;
}

/* Channels */
.observer__channels {
  margin-bottom: 24px;
}

.observer__channels-title {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.observer__channel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 8px;
}

.observer__channel-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

.observer__channel-avatar--image {
  object-fit: cover;
  background: none;
}

.observer__channel-info {
  min-width: 0;
  flex: 1;
}

.observer__channel-title {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.observer__channel-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.observer__channel-status {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.observer__channel-status--scheduled {
  color: var(--accent-primary);
  border-color: rgba(157, 71, 197, 0.5);
  background: rgba(157, 71, 197, 0.12);
}

.observer__channel-status--published {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

.observer__channel-status--cancelled {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.observer__channel-status--deleted {
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.14);
}

.observer__channel-status--partially_deleted {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.observer__channel--deleted {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.02));
}
