/* ==========================================================================
   TWITTER / X LIGHTS OUT DARK MODE THEME DESIGN SYSTEM
   Absolute Black #000000 | Twitter Blue #1D9BF0
   ========================================================================== */

:root {
  --x-black: #000000;
  --x-card-bg: #000000;
  --x-hover-bg: rgba(255, 255, 255, 0.04);
  --x-border: #2F3336;
  --x-line-color: #333639;
  --x-blue: #1D9BF0;
  --x-blue-hover: #1A8CD8;
  --x-blue-bg-hover: rgba(29, 155, 240, 0.12);
  --x-text-primary: #E7E9EA;
  --x-text-secondary: #71767B;
  --x-icon-normal: #71767B;
  --x-verified-blue: #1D9BF0;
  --x-pink-like: #F91880;
  --x-green-retweet: #00BA7C;
  --x-font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --x-radius-sm: 12px;
  --x-radius-md: 16px;
  --x-radius-lg: 20px;
  --x-pill-radius: 9999px;
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbar universally for modern browsers */
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

* {
  -ms-overflow-style: none !important;
  /* IE and Edge */
  scrollbar-width: none !important;
  /* Firefox */
}

html,
body,
.app-viewport,
.mobile-frame,
.thread-feed {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.app-viewport::-webkit-scrollbar,
.mobile-frame::-webkit-scrollbar,
.thread-feed::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html,
body {
  background-color: #0b0e11;
  color: var(--x-text-primary);
  font-family: var(--x-font-family);
  font-size: 15px;
  line-height: 1.4;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* App Viewport Container (Sharp Rectangular Outer Frame) */
.app-viewport {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  height: 100dvh;
  max-height: 920px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 0;
  overflow: hidden;
  background: var(--x-black);
}

@media (max-width: 500px) {

  html,
  body {
    align-items: flex-start;
    height: 100%;
    width: 100%;
  }

  .app-viewport {
    max-width: 100%;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

/* Mobile Frame Container */
.mobile-frame {
  width: 100%;
  height: 100%;
  background-color: var(--x-black);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Top Bar Wrapper (Absolute & Ultra-Smooth Auto-Hiding on Scroll) */
.top-bar-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.top-bar-wrapper.header-hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Clean Centered Sticky Header */
.sticky-header {
  height: 53px;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--x-border);
}

.header-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-logo-svg {
  width: 22px;
  height: 22px;
  fill: var(--x-text-primary);
}

/* Authentic Twitter Top Subheader (Centered Stacked Title & Date) */
.week-selector-container {
  padding: 10px 16px;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--x-border);
  display: flex;
  justify-content: center;
  text-align: center;
}

.top-feed-title-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.top-feed-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--x-text-primary);
  line-height: 1.2;
}

.top-feed-date {
  font-size: 12px;
  color: var(--x-text-secondary);
  font-weight: 500;
  line-height: 1.2;
}

/* Thread Feed List */
.thread-feed {
  width: 100%;
  height: 100%;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--x-border) transparent;
  padding-top: 53px;
  padding-bottom: 20px;
  scroll-behavior: smooth;
}

.thread-feed::-webkit-scrollbar {
  width: 4px;
}

.thread-feed::-webkit-scrollbar-thumb {
  background: var(--x-border);
  border-radius: 4px;
}

/* Tweet Card Layout */
.tweet-card {
  position: relative;
  background-color: var(--x-black);
  padding: 10px 16px 2px 16px;
  transition: background-color 0.15s ease;
}

.tweet-card:hover {
  background-color: rgba(255, 255, 255, 0.015);
}

.tweet-layout {
  display: flex;
  gap: 12px;
}

/* Left Column (Avatar & Connecting Thread Line) */
.tweet-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40px;
  flex-shrink: 0;
}

.avatar-container {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #16181C;
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thread-line {
  width: 2px;
  flex: 1;
  background-color: var(--x-line-color);
  margin-top: 4px;
  margin-bottom: -10px;
  border-radius: 1px;
  z-index: 1;
}

.thread-line.end-fade {
  background: linear-gradient(to bottom, var(--x-line-color) 0%, rgba(51, 54, 57, 0) 100%);
  height: 60px;
}

/* Right Column (Content) */
.tweet-right-col {
  flex: 1;
  min-width: 0;
}

.tweet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  line-height: 1.2;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 4px;
  row-gap: 0px;
  flex-wrap: wrap;
  line-height: 1.15;
}

.user-name {
  font-weight: 700;
  color: var(--x-text-primary);
  font-size: 15px;
}

.user-name:hover {
  text-decoration: underline;
  cursor: pointer;
}

.verified-badge {
  width: 18px;
  height: 18px;
  fill: var(--x-verified-blue);
  margin-right: 2px;
}

.user-handle,
.tweet-time,
.dot-separator {
  color: var(--x-text-secondary);
  font-size: 15px;
}

.tweet-text {
  color: var(--x-text-primary);
  font-size: 15px;
  line-height: 1.35;
  word-break: break-word;
  margin-top: 1px;
  margin-bottom: 10px;
}

.hashtag {
  color: var(--x-blue);
  cursor: pointer;
}

.hashtag:hover {
  text-decoration: underline;
}

.q-label {
  color: var(--x-blue);
  font-weight: 700;
}

/* ==========================================================================
   3D FLIP CARD DESIGN SYSTEM
   ========================================================================== */
.flip-card-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  perspective: 1000px;
  margin-bottom: 10px;
  user-select: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: var(--x-radius-md);
}

.flip-card-wrapper.flipped .flip-card-inner,
.flip-card-wrapper.flipped-right .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-wrapper.flipped-left .flip-card-inner {
  transform: rotateY(-180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--x-radius-md);
  overflow: hidden;
  border: 1px solid var(--x-border);
}

/* Front Face (Media Container) */
.flip-card-front {
  background-color: #16181C;
  cursor: grab;
}

.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.media-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #E7E9EA;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.media-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--x-blue);
  display: inline-block;
}

/* Persistent Answer Tag on Front Photo when answered */
.persistent-answer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: none;
  align-items: center;
  gap: 5px;
  z-index: 5;
  pointer-events: none;
}

.flip-card-wrapper.answered .persistent-answer-badge {
  display: flex;
}

.persistent-answer-badge.gordum {
  color: var(--x-green-retweet);
  border: 1px solid var(--x-green-retweet);
}

.persistent-answer-badge.gormedim {
  color: var(--x-pink-like);
  border: 1px solid var(--x-pink-like);
}

/* Back Face (Result Analytics) */
.flip-card-back {
  background: #16181C;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  justify-content: space-between;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.flip-result-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.result-choice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.choice-tag {
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.choice-tag.gordum {
  background: rgba(0, 186, 124, 0.15);
  color: var(--x-green-retweet);
  border: 1px solid var(--x-green-retweet);
}

.choice-tag.gormedim {
  background: rgba(249, 24, 128, 0.15);
  color: var(--x-pink-like);
  border: 1px solid var(--x-pink-like);
}

.result-percentage {
  font-size: 22px;
  font-weight: 900;
  color: var(--x-text-primary);
}

/* Progress Bars Group */
.progress-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--x-text-secondary);
}

.progress-track {
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fill-blue {
  background: var(--x-blue);
  box-shadow: 0 0 10px rgba(29, 155, 240, 0.4);
}

.fill-dark {
  background: rgba(255, 255, 255, 0.25);
}

.result-footer-meta {
  font-size: 11.5px;
  color: var(--x-text-secondary);
  font-weight: 500;
}

/* Swipe Hint Bar */
.swipe-hint-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.hint-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--x-border);
  color: var(--x-text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--x-pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hint-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--x-text-primary);
}

.left-btn:hover {
  border-color: var(--x-pink-like);
  color: var(--x-pink-like);
}

.right-btn:hover {
  border-color: var(--x-green-retweet);
  color: var(--x-green-retweet);
}

.hint-arrow {
  font-size: 14px;
}

/* Post Flip Actions */
.post-flip-actions {
  display: flex;
  justify-content: center;
  margin-top: 4px;
  margin-bottom: 6px;
}

.retry-pill-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--x-border);
  color: var(--x-text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--x-pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.retry-pill-btn:hover {
  background: rgba(29, 155, 240, 0.12);
  border-color: var(--x-blue);
  color: var(--x-blue);
}

.btn-svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* Exact Tweet Footer Styling */
.tweet-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 4px;
  width: 100%;
  max-width: 360px;
  color: #71767B;
}

.tweet-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #71767B;
  cursor: pointer;
  transition: color 0.15s ease;
  padding: 4px;
  border-radius: 50px;
}

.tweet-action svg {
  width: 18.5px;
  height: 18.5px;
  fill: currentColor;
  display: block;
}

.tweet-action span {
  color: #71767B;
  font-size: 13px;
  font-weight: 400;
  transition: color 0.15s ease;
}

.tweet-action:hover {
  color: #1D9BF0;
}

.tweet-action:hover span {
  color: #1D9BF0;
}

.tweet-action.retweet:hover {
  color: #00BA7C;
}

.tweet-action.retweet:hover span {
  color: #00BA7C;
}

.tweet-action.like:hover {
  color: #F91880;
}

.tweet-action.like:hover span {
  color: #F91880;
}

/* Active State Colors */
.tweet-action.liked {
  color: #F91880 !important;
}

.tweet-action.liked span {
  color: #F91880 !important;
}

.tweet-action.retweeted {
  color: #00BA7C !important;
}

.tweet-action.retweeted span {
  color: #00BA7C !important;
}

/* Week Selector Styles */
.week-selector-container {
  padding: 12px 16px;
  background-color: var(--x-card-bg);
  border-bottom: 1px solid var(--x-border);
  position: relative;
  display: flex;
  justify-content: center;
}

.week-select {
  appearance: none;
  background-color: var(--x-hover-bg);
  color: var(--x-text-primary);
  border: 1px solid var(--x-border);
  padding: 8px 32px 8px 16px;
  border-radius: 99px;
  font-family: var(--x-font-family);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  max-width: 90%;
  text-overflow: ellipsis;
}

.week-dropdown-icon {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 10px;
  color: var(--x-text-secondary);
}

/* ==========================================================================
   VOTE BUTTONS & INTERACTION STYLES
   ========================================================================== */
.action-buttons-container {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  margin-bottom: 12px;
  width: 100%;
}

.vote-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--x-pill-radius);
  font-family: var(--x-font-family);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-gordum {
  background: rgba(0, 186, 124, 0.12);
  color: var(--x-green-retweet);
  border-color: rgba(0, 186, 124, 0.4);
}

.btn-gordum:hover {
  background: var(--x-green-retweet);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(0, 186, 124, 0.4);
  transform: translateY(-1px);
}

.btn-gormedim {
  background: rgba(249, 24, 128, 0.12);
  color: var(--x-pink-like);
  border-color: rgba(249, 24, 128, 0.4);
}

.btn-gormedim:hover {
  background: var(--x-pink-like);
  color: #ffffff;
  box-shadow: 0 0 15px rgba(249, 24, 128, 0.4);
  transform: translateY(-1px);
}

.btn-icon {
  font-size: 15px;
  font-weight: 900;
}

/* Tweet Footer Action Icons Bar */
.tweet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  margin-bottom: 4px;
  width: 100%;
  max-width: 440px;
  color: var(--x-icon-normal);
}

.action-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--x-icon-normal);
  cursor: pointer;
  transition: color 0.15s ease;
}

.action-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}

.action-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.comment-action:hover {
  color: var(--x-blue);
}

.comment-action:hover .action-icon-circle {
  background-color: rgba(29, 155, 240, 0.1);
}

.rt-action:hover {
  color: var(--x-green-retweet);
}

.rt-action:hover .action-icon-circle {
  background-color: rgba(0, 186, 124, 0.1);
}

.heart-action:hover {
  color: #f91880;
}

.heart-action:hover .action-icon-circle {
  background-color: rgba(249, 24, 128, 0.1);
}

.view-action:hover {
  color: var(--x-blue);
}

.view-action:hover .action-icon-circle {
  background-color: rgba(29, 155, 240, 0.1);
}

.share-action:hover {
  color: var(--x-blue);
}

.share-action:hover .action-icon-circle {
  background-color: rgba(29, 155, 240, 0.1);
}

.action-count {
  font-size: 13px;
  color: inherit;
  transition: color 0.15s ease;
}

.change-vote-btn:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

/* ==========================================================================
   MINIMAL ELEGANT DIPLOMA / KARNE CARD
   ========================================================================== */
/* ==========================================================================
   MINIMAL ELEGANT DIPLOMA / KARNE CARD (STRICT 16:9 ASPECT RATIO)
   ========================================================================== */
.diploma-card-wrapper {
  margin: 16px 0 28px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  animation: diplomaSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes diplomaSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diploma-card {
  position: relative;
  width: 100%;
  background-color: #16181C;
  border-radius: 20px;
  border: 1px solid var(--x-border);
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
}

.diploma-card-capture-area {
  position: relative;
  background-color: #0E1217;
  border-radius: 18px;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(250px, 58vw);
  padding: clamp(8px, 2vw, 12px) clamp(10px, 3vw, 14px) 5px clamp(10px, 3vw, 14px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
  border: 1.5px solid rgba(29, 155, 240, 0.4);
}

.diploma-card-capture-area::before {
  content: none;
}

.diploma-top-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1px, 0.8vw, 4px);
  width: 100%;
  margin-top: clamp(1px, 0.5vw, 3px);
}

.diploma-middle-group {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.diploma-bottom-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 1.2vw, 6px);
  width: 100%;
  margin-bottom: 0;
}

.diploma-minimal-heading {
  font-size: clamp(13.5px, 3.8vw, 16px);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0;
  letter-spacing: -0.3px;
  text-transform: none;
  line-height: 1.2;
}

.diploma-minimal-level-code {
  font-size: clamp(38px, 9.5vw, 48px);
  font-weight: 900;
  line-height: 1;
  color: #1D9BF0;
  letter-spacing: -1px;
  text-shadow: none !important;
  filter: none !important;
  box-shadow: none !important;
  margin: 0;
}

.diploma-metrics-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 3.5vw, 18px);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px clamp(10px, 3.5vw, 16px);
  border-radius: 12px;
  width: auto;
}

.diploma-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.diploma-metric-num {
  font-size: clamp(12.5px, 3.5vw, 15px);
  font-weight: 800;
  color: #ffffff;
}

.diploma-metric-num small {
  font-size: clamp(9.5px, 2.7vw, 11.5px);
  font-weight: 600;
  color: #71767B;
}

.diploma-metric-lbl {
  font-size: clamp(8.5px, 2.3vw, 10px);
  font-weight: 700;
  color: #71767B;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.diploma-metric-sep {
  width: 1px;
  height: clamp(16px, 4.5vw, 20px);
  background: rgba(255, 255, 255, 0.12);
}

/* User Profile Row inside Minimal 16:9 Card */
.diploma-profile-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 10px;
  border-radius: 12px;
  box-sizing: border-box;
}

.diploma-profile-info {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  min-width: 0;
}

.diploma-avatar {
  width: clamp(28px, 7.5vw, 34px);
  height: clamp(28px, 7.5vw, 34px);
  border-radius: 50%;
  object-fit: cover;
  border: none;
  flex-shrink: 0;
}

.diploma-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.diploma-user-name {
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  font-size: clamp(11px, 3vw, 13px);
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diploma-user-handle {
  font-size: clamp(9.5px, 2.5vw, 11px);
  color: var(--x-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.diploma-issue-date {
  font-size: clamp(9.5px, 2.5vw, 11.5px);
  font-weight: 600;
  color: var(--x-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}


/* Image Lightbox Modal */
.image-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lightboxFadeIn 0.25s ease-out;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10001;
  transition: all 0.2s ease;
}

.lightbox-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

.lightbox-content-wrapper {
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: lightboxZoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.9) translateY(10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.result-score-meter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--x-border);
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--x-text-secondary);
}

.result-score-val {
  color: var(--x-blue);
  font-weight: 800;
}

/* Witty Commentary Box */
.result-comment-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--x-border);
  border-left: 3px solid var(--x-blue);
  border-radius: var(--x-radius-sm);
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--x-text-primary);
  font-style: italic;
}

/* Custom Twitter Handle Input Box (Flex-Row Single Line) */
.user-custom-handle-box {
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--x-border);
  padding: 10px 12px;
  border-radius: var(--x-radius-sm);
}

.custom-handle-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--x-text-secondary);
  margin-bottom: 6px;
}

.custom-handle-input-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.handle-input-field-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.handle-prefix {
  position: absolute;
  left: 12px;
  color: var(--x-text-secondary);
  font-weight: 700;
  font-size: 14px;
  pointer-events: none;
}

.custom-handle-input {
  width: 100%;
  background: var(--x-black);
  border: 1px solid var(--x-border);
  color: var(--x-text-primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 12px 8px 28px;
  border-radius: 99px;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-handle-input:focus {
  border-color: var(--x-blue);
}

.custom-handle-save-btn {
  background: var(--x-blue);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.custom-handle-save-btn:hover {
  background: var(--x-blue-hover);
}

/* Actions Group */
.result-actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-x-main-btn {
  width: 100%;
  background-color: var(--x-blue);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--x-pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.share-x-main-btn:hover {
  background-color: var(--x-blue-hover);
}

.share-btn-x-icon {
  width: 17px;
  height: 17px;
  fill: #ffffff;
}

.download-img-btn {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid var(--x-border);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--x-pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.download-img-btn:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.reset-quiz-secondary-btn {
  background: transparent;
  border: none;
  color: var(--x-text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.2s ease;
}

.reset-quiz-secondary-btn:hover {
  color: var(--x-pink-like);
  text-decoration: underline;
}

/* Leaderboard Modal & Button Styles */
.leaderboard-open-btn {
  width: 100%;
  background: #191b1f;
  color: #f7e07a;
  border: 1px solid rgba(255, 215, 0, 0.4);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: var(--x-pill-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.leaderboard-open-btn:hover {
  opacity: 0.7;
}

.leaderboard-btn-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.leaderboard-btn-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.leaderboard-btn-arrow {
  font-size: 14px;
  color: rgba(255, 215, 0, 0.7);
  transition: transform 0.2s ease;
}

.leaderboard-open-btn:hover .leaderboard-btn-arrow {
  transform: translateX(3px);
  color: #ffd700;
}

.diploma-watermark-url {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--x-text-secondary);
  opacity: 0.7;
  margin-top: 2px;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

@media (max-width: 360px) {
  .diploma-card-capture-area {
    aspect-ratio: auto;
    min-height: 240px;
    max-height: none;
    padding: 10px 8px 6px 8px;
  }

  .diploma-card {
    padding: 10px;
  }
}

.leaderboard-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease forwards;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.leaderboard-modal-content {
  background: #15181c;
  border: 1px solid var(--x-border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.leaderboard-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #15181c;
  border-bottom: 1px solid var(--x-border);
}

.leaderboard-modal-header h3 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.leaderboard-modal-close {
  background: transparent;
  border: none;
  color: var(--x-text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
}

.leaderboard-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.leaderboard-modal-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: background 0.2s;
}

.leaderboard-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.leaderboard-row.top-1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.03));
  border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-row.top-2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.12), rgba(192, 192, 192, 0.03));
  border-color: rgba(192, 192, 192, 0.3);
}

.leaderboard-row.top-3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.12), rgba(205, 127, 50, 0.03));
  border-color: rgba(205, 127, 50, 0.3);
}

.leaderboard-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leaderboard-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: var(--x-hover-bg);
}

.leaderboard-row.top-1 .leaderboard-rank-badge {
  background: #ffd700;
  color: #000;
}

.leaderboard-row.top-2 .leaderboard-rank-badge {
  background: #c0c0c0;
  color: #000;
}

.leaderboard-row.top-3 .leaderboard-rank-badge {
  background: #cd7f32;
  color: #fff;
}

.leaderboard-row-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaderboard-user-details-col {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.leaderboard-user-display-name {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.lb-name-text {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-user-handle {
  font-size: 12px;
  color: var(--x-text-secondary);
  font-weight: 400;
  line-height: 1.2;
}

.leaderboard-score-badge {
  font-size: 12px;
  font-weight: 800;
  color: var(--x-blue);
  background: rgba(29, 155, 240, 0.12);
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}

/* Intro Welcome Box Styles */
.intro-welcome-box {
  background: linear-gradient(135deg, rgba(29, 155, 240, 0.08), rgba(121, 40, 202, 0.05));
  border: 1px solid rgba(29, 155, 240, 0.2);
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 8px;
}

.intro-welcome-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.35;
}

.intro-welcome-desc {
  font-size: 13px;
  color: var(--x-text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.intro-steps-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.intro-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #e7e9ea;
  line-height: 1.4;
}

.intro-step-item .step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--x-blue);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.intro-cta-bar {
  background: rgba(29, 155, 240, 0.15);
  border: 1px dashed rgba(29, 155, 240, 0.4);
  padding: 10px 14px;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--x-blue);
}

/* Pending Quiz Progress Card Styles */
.pending-quiz-card-wrapper {
  margin: 24px 16px 40px 16px;
}

.pending-quiz-card {
  background: var(--x-card-bg);
  border: 1px solid var(--x-border);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.pending-quiz-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.pending-quiz-counter {
  font-size: 12px;
  font-weight: 700;
  color: var(--x-blue);
  background: rgba(29, 155, 240, 0.12);
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid rgba(29, 155, 240, 0.25);
}

.pending-quiz-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.pending-quiz-desc {
  font-size: 13px;
  color: var(--x-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.pending-progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}

.pending-progress-fill {
  height: 100%;
  background: var(--x-blue);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.pending-quiz-hint {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

/* View Original Tweet Button Styles */
.view-tweet-container {
  margin-top: 8px;
  margin-bottom: 4px;
  display: flex;
  justify-content: flex-start;
}

.view-tweet-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  background: rgba(29, 155, 240, 0.1);
  border: 1px solid rgba(29, 155, 240, 0.25);
  color: var(--x-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  box-shadow: none;
}

.view-tweet-btn:hover {
  background: var(--x-blue);
  color: #ffffff;
  border-color: var(--x-blue);
  box-shadow: none;
  transform: none;
}

.view-tweet-x-icon {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.view-tweet-ext-icon {
  width: 11px;
  height: 11px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Image Lightbox / Zoom Modal Styles */
.tweet-media-box img,
.tweet-media-container img,
.card-front img,
.media-container img,
.media-img {
  cursor: zoom-in !important;
}

.media-badge,
.persistent-answer-badge {
  pointer-events: none !important;
}

.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  animation: lightboxFadeIn 0.25s ease forwards;
  cursor: zoom-out;
}

.lightbox-modal.active {
  display: flex !important;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.lightbox-content {
  max-width: 94vw;
  max-height: 84vh;
  border-radius: 14px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: default;
  transform: scale(0.95);
  animation: lightboxZoomIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.92);
  }

  to {
    transform: scale(1);
  }
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  color: #ffffff;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100000;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.lightbox-close:hover {
  opacity: 1;
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
  color: #e7e9ea;
  font-size: 14px;
  font-weight: 600;
  margin-top: 14px;
  text-align: center;
  max-width: 90vw;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}