:root {
  --bg: #000;
  --panel: #111;
  --panel-border: #2a2a2a;
  --text: #e6e6e6;
  --muted: #8a8a8a;
  --accent: #1d9bf0;
  --danger: #f35369;
  --brand-winner: #fca5a5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.site-header {
  padding-top: 16px;
  padding-bottom: 4px;
}

.user-bar {
  max-width: 1180px;
  margin: 8px auto 0;
  padding: 0 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.user-bar span {
  color: var(--muted);
  font-size: 13px;
}

.user-bar button {
  width: auto;
  min-width: 90px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
}

.auth-gate {
  max-width: 560px;
  margin: 24px auto;
}

.auth-gate p {
  color: var(--muted);
  margin-top: 0;
}

.marketing-link {
  width: auto;
  min-width: 140px;
  height: 40px;
  border-radius: 10px;
  border: 0;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
}

.marketing-link.secondary {
  background: #1a1a1a;
  border: 1px solid #3a3a3a;
}

.hidden {
  display: none !important;
}

.integrations-panel {
  position: sticky;
  top: 18px;
  height: fit-content;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
}

.integrations-panel h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.brand {
  font-size: 44px;
  line-height: 1;
  font-family: 'Bungee', sans-serif;
  letter-spacing: 1px;
  color: transparent;
  -webkit-text-stroke: 1px var(--brand-winner);
  text-transform: uppercase;
}

.main-column {
  padding-top: 6px;
}

.hint {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.brand-mark {
  height: 42px;
  width: auto;
  display: inline-block;
}

.brand-mark-left {
  transform: scaleX(-1);
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  margin: 12px;
}

h2,
h3 {
  margin: 0 0 12px;
}

label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

textarea,
input,
button {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #0b0b0b;
  color: var(--text);
}

input,
button {
  height: 40px;
  padding: 0 10px;
}

input[type='file'] {
  height: auto;
  min-height: 42px;
  padding: 8px 10px;
  line-height: 1.2;
  display: block;
}

input[type='file']::file-selector-button {
  border: 1px solid var(--panel-border);
  background: #1e1e1e;
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  margin-right: 10px;
  cursor: pointer;
  font-weight: 600;
}

textarea {
  resize: vertical;
  min-height: 110px;
  padding: 10px;
}

.composer-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.composer-row button {
  max-width: 320px;
  background: var(--accent);
  color: #fff;
  border: 0;
  cursor: pointer;
  font-weight: 700;
}

#counter {
  color: var(--muted);
  font-size: 12px;
}

.counter-row {
  margin-top: 6px;
  margin-bottom: 12px;
}

.status {
  margin-top: 8px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

.status.error {
  color: var(--danger);
}

.selection-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.field-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-item {
  border-top: 1px solid var(--panel-border);
  padding: 12px 0;
}

.feed-item:first-child {
  border-top: 0;
}

.feed-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.feed-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.feed-link:hover {
  text-decoration: underline;
}

.platform-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.platform-list li {
  border-top: 1px solid var(--panel-border);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.platform-list li:first-child {
  border-top: 0;
}

.platform-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.platform-name {
  font-size: 15px;
}

.platform-right {
  padding-left: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 26px;
}

.platform-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #555;
}

.integration-check {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.badge {
  display: inline-block;
  width: 118px;
  text-align: center;
  white-space: nowrap;
  font-size: 11px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  padding: 3px 10px;
  color: var(--muted);
}

.badge.live {
  color: #88df9a;
  border-color: #2f5b3c;
}

.badge.coming-soon {
  color: #ffb347;
  border-color: #ffb347;
}

.platform-handle {
  font-size: 12px;
  color: var(--muted);
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.connect-btn {
  width: auto;
  min-width: 86px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  color: #f1f1f1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}

.connect-btn:hover {
  border-color: #585858;
  background: #222;
}

.connect-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  border-color: #2f2f2f;
  background: #151515;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  background: #101010;
  border: 1px solid #2c2c2c;
  border-radius: 14px;
  padding: 18px;
}

.modal-card p {
  margin: 10px 0;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.modal-primary-btn,
.modal-secondary-btn {
  width: auto;
  height: 38px;
  border-radius: 9px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.modal-primary-btn {
  border: 0;
  background: #ff0000;
  color: #fff;
}

.modal-secondary-btn {
  border: 1px solid #3a3a3a;
  background: #171717;
  color: #fff;
}

.modal-note {
  font-size: 12px;
  min-height: 18px;
}

.modal-links {
  margin: 8px 0 0;
  padding-left: 16px;
}

.modal-links a {
  color: var(--accent);
  text-decoration: none;
}

.modal-links a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid #1b1b1b;
  margin-top: 10px;
  padding: 20px 18px 26px;
  color: var(--muted);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    max-width: 640px;
  }

  .integrations-panel {
    position: static;
  }

  .brand {
    font-size: 36px;
  }

  .brand-mark {
    height: 34px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
