:root {
  --amt-bg: #1c1c21;
  --amt-panel: #1f1f26;
  --amt-border: rgba(255, 255, 255, 0.039);
  --amt-text: rgba(255, 255, 255, 0.75);
  --amt-muted: rgba(255, 255, 255, 0.5);
  --amt-faint: rgba(255, 255, 255, 0.18);
  --amt-accent: #c4190e;
  --amt-accent-light: #e6f6ff;
  --amt-radius: 0.375rem;
  --amt-font-body: 'Inter', system-ui, sans-serif;
  --amt-font-display: 'Orbitron', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--amt-bg);
  color: var(--amt-text);
  font-family: var(--amt-font-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 1680px) {
  html {
    font-size: 13pt;
  }
}

@media (max-width: 736px) {
  html {
    font-size: 11pt;
  }
}

.amt-feed {
  max-width: 65rem;
  margin: 0 auto;
  padding: 3rem 6rem 4rem;
}

@media (max-width: 736px) {
  .amt-feed {
    padding: 2rem 2rem 3rem;
  }
}

@media (max-width: 360px) {
  .amt-feed {
    padding: 1.5rem 1.5rem 2.5rem;
  }
}

.amt-feed__header {
  margin-bottom: 2rem;
  text-align: left;
}

.amt-feed__title {
  margin: 0;
  font-family: var(--amt-font-display);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.15rem;
  background: linear-gradient(170deg, var(--amt-accent-light) 0%, var(--amt-accent) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.amt-feed__status {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(196, 25, 14, 0.35);
  border-radius: var(--amt-radius);
  background: rgba(196, 25, 14, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.amt-feed__list {
  display: grid;
  gap: 1rem;
}

.amt-feed__post {
  display: grid;
  gap: 0.875rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--amt-border);
  border-radius: var(--amt-radius);
  background: var(--amt-panel);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.amt-feed__post:hover {
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.amt-feed__post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--amt-muted);
  font-size: 0.85rem;
}

.amt-feed__post-date {
  color: var(--amt-faint);
}

.amt-feed__post-text {
  margin: 0;
  color: var(--amt-text);
  font-size: 1rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.amt-feed__post-text a {
  color: #7f8794;
  text-decoration: underline;
}

.amt-feed__post-text a:hover {
  text-decoration: none;
}

.amt-feed__media {
  display: grid;
  gap: 0.25rem;
  overflow: hidden;
  border-radius: calc(var(--amt-radius) - 2px);
  border: 1px solid var(--amt-border);
  background: rgba(0, 0, 0, 0.25);
}

.amt-feed__media--grid {
  grid-template-columns: repeat(2, 1fr);
}

.amt-feed__media-item {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 28rem;
}

.amt-feed__media--grid .amt-feed__media-item {
  max-height: 14rem;
}

.amt-feed__media img,
.amt-feed__media video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 28rem;
  height: auto;
  object-fit: contain;
}

.amt-feed__media--grid img,
.amt-feed__media--grid video {
  max-height: 14rem;
}

.amt-feed__media--grid .amt-feed__media-item:only-child {
  grid-column: 1 / -1;
  max-height: 28rem;
}

.amt-feed__media--grid .amt-feed__media-item:only-child img,
.amt-feed__media--grid .amt-feed__media-item:only-child video {
  max-height: 28rem;
}

.amt-feed__media-item--gif {
  position: relative;
  cursor: pointer;
}

.amt-feed__gif-badge {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.amt-feed__media-item--gif.amt-feed__gif--paused::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.amt-feed__media-item--gif.amt-feed__gif--paused::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1.1rem;
  pointer-events: none;
}

.amt-feed__gif {
  cursor: pointer;
}

.amt-feed__broadcast-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--amt-border);
  border-radius: calc(var(--amt-radius) - 2px);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.amt-feed__broadcast-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.amt-feed__broadcast-card--thumb {
  position: relative;
  display: block;
  min-height: 11rem;
  padding: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.amt-feed__broadcast-card--thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.amt-feed__broadcast-card--thumb .amt-feed__broadcast-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.amt-feed__broadcast-card--thumb .amt-feed__broadcast-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 1rem 1.25rem;
}

.amt-feed__broadcast-play {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(196, 25, 14, 0.9);
  color: #fff;
}

.amt-feed__broadcast-copy {
  display: grid;
  gap: 0.25rem;
}

.amt-feed__broadcast-title {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
}

.amt-feed__broadcast-cta {
  color: var(--amt-muted);
  font-size: 0.85rem;
}

.amt-feed__link-card {
  display: inline-flex;
  width: fit-content;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--amt-border);
  border-radius: calc(var(--amt-radius) - 2px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-decoration: none;
}

.amt-feed__link-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  text-decoration: underline;
}

.amt-feed__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--amt-faint);
  font-size: 0.8rem;
}

.amt-feed__metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.amt-feed__read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  text-decoration: none;
}

.amt-feed__read-more:hover {
  color: #fff;
  text-decoration: underline;
}

.amt-feed__footer {
  margin-top: 2rem;
  text-align: center;
}

.amt-feed__profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.5rem;
  padding: 0 1.75rem;
  border: 1px solid transparent;
  border-radius: 2.5rem;
  color: #fff;
  font-family: var(--amt-font-body);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.amt-feed__profile-link:hover {
  border-color: #fff;
  transform: scale(1.04);
}

.amt-feed__skeleton {
  height: 7rem;
  border-radius: var(--amt-radius);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.07) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.amt-feed__empty {
  padding: 2rem;
  border: 1px dashed var(--amt-border);
  border-radius: var(--amt-radius);
  color: var(--amt-muted);
  text-align: center;
}

/* Preview card layout (?layout=cards, default) */
.amt-feed--cards {
  max-width: 28rem;
  padding: 2.5rem 1.5rem 3rem;
}

.amt-feed--cards .amt-feed__header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.amt-feed--cards .amt-feed__title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  letter-spacing: -0.05rem;
}

.amt-feed--cards .amt-feed__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.amt-feed--cards .amt-feed__skeleton {
  width: 100%;
  max-width: 22rem;
  height: 16rem;
}

.amt-feed--cards .amt-feed__preview {
  width: 100%;
  max-width: 22rem;
}

.amt-feed--cards .amt-feed__preview-link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--amt-border);
  border-radius: calc(var(--amt-radius) + 2px);
  background: var(--amt-panel);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.amt-feed--cards .amt-feed__preview-link:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.amt-feed--cards .amt-feed__preview-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background-color: rgba(0, 0, 0, 0.45);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.amt-feed--cards .amt-feed__preview-media::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.05) 60%,
    rgba(0, 0, 0, 0.15) 100%
  );
}

.amt-feed--cards .amt-feed__preview-media--empty {
  aspect-ratio: auto;
  min-height: 5.5rem;
  background-image: linear-gradient(
    135deg,
    rgba(196, 25, 14, 0.18) 0%,
    rgba(31, 31, 38, 0.95) 55%,
    rgba(28, 28, 33, 1) 100%
  );
}

.amt-feed--cards .amt-feed__preview-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(196, 25, 14, 0.92);
  color: #fff;
  transform: translate(-50%, -50%);
}

.amt-feed--cards .amt-feed__preview-badge {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  z-index: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.amt-feed--cards .amt-feed__preview-body {
  display: grid;
  gap: 0.45rem;
  padding: 0.95rem 1.1rem 1.1rem;
}

.amt-feed--cards .amt-feed__preview-date {
  color: var(--amt-faint);
  font-size: 0.78rem;
}

.amt-feed--cards .amt-feed__preview-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--amt-text);
  font-size: 0.95rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.amt-feed--cards .amt-feed__preview-cta {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.amt-feed--cards .amt-feed__footer {
  margin-top: 1.75rem;
}

/* Official X embed layout (?layout=xembed, default) */
.amt-feed--x-embeds {
  max-width: 36rem;
  padding: 1.5rem 1.5rem 3rem;
}

.amt-feed--x-embeds .amt-feed__header {
  display: none;
}

.amt-feed--x-embeds .amt-feed__title {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  letter-spacing: -0.05rem;
}

.amt-feed--x-embeds .amt-feed__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.amt-feed--x-embeds .amt-feed__x-post {
  width: 100%;
  max-width: 550px;
  margin: 0 auto;
}

.amt-feed--x-embeds .amt-feed__x-post .twitter-tweet {
  margin: 0 !important;
}

.amt-feed--x-embeds .amt-feed__x-post iframe {
  display: block;
  width: 100% !important;
  max-width: 550px !important;
  margin: 0 auto !important;
  border-radius: 0.75rem;
}

.amt-feed--x-embeds .amt-feed__skeleton {
  width: 100%;
  max-width: 550px;
  height: 18rem;
}

.amt-feed--x-embeds .amt-feed__footer {
  margin-top: 1.75rem;
}
