/* Font Faces */
@font-face {
  font-family: 'Arial Narrow';
  src: url('Arial Narrow.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Ellis';
  src: url('ELLIS___.TTF') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'CalligraphyHandMade';
  src: url('random-fonts/CalligraphyHandMade-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'CrayonSketches';
  src: url('random-fonts/CrayonSketches.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Fluid';
  src: url('random-fonts/FLUID-LI.TTF') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Horses';
  src: url('random-fonts/Horses 1.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Humna';
  src: url('random-fonts/Humna.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'KremlinKourier';
  src: url('random-fonts/Kremlin Kourier II Bold.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'SportViper';
  src: url('random-fonts/SPORTVIPER.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Adorable';
  src: url('random-fonts/acsf-adorable-4pt-light.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'AhabeshaTypewriter';
  src: url('random-fonts/ahabesha\'stypewriter.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'MeyneTextur';
  src: url('random-fonts/meyne_textur.ttf') format('truetype');
  font-display: swap;
}


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

body {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #F4F4F4;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  top: -15vh;
}

/* Header */
.header {
  text-align: center;
  padding: 32px 24px 24px;
  position: sticky;
  top: 0;
  background: transparent;
  z-index: 100;
}

.svg-link {
  position: absolute;
  top: 28px;
  right: 32px;
  font-size: 18px;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.svg-link:hover {
  color: #555;
}

.logo {
  font-size: 55px;
  font-weight: 700;
  color: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  height: 80px;
  overflow: visible;
}

.logo-random {
  display: flex;
  gap: -4px;
  height: 36px;
  align-items: center;
  justify-content: center;
}

.logo-random span {
  display: inline-block;
  transition: font-family 0.15s ease;
  line-height: 1;
}

/* Font variations for animation */
.logo-random .font-var-0 { font-family: 'CalligraphyHandMade', cursive; }
.logo-random .font-var-1 { font-family: 'CrayonSketches', cursive; }
.logo-random .font-var-2 { font-family: 'Fluid', sans-serif; }
.logo-random .font-var-3 { font-family: 'Horses', fantasy; }
.logo-random .font-var-4 { font-family: 'Humna', sans-serif; }
.logo-random .font-var-5 { font-family: 'KremlinKourier', sans-serif; }
.logo-random .font-var-6 { font-family: 'SportViper', sans-serif; }
.logo-random .font-var-7 { font-family: 'Adorable', sans-serif; }
.logo-random .font-var-8 { font-family: 'AhabeshaTypewriter', monospace; }
.logo-random .font-var-9 { font-family: 'MeyneTextur', serif; }

.logo-dafont {
  font-family: 'Ellis', serif;
  color: #c00;
  font-size: 64px;
  line-height: 1;
  height: 36px;
  display: flex;
  align-items: center;
}

/* Main wrapper */
.main-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
  padding-top: 12%;
  min-height: 35vh;
}

/* Gallery Container - the "red box" that controls overall width */
.gallery-container {
  position: relative;
  width: 100%;
  max-width: 1270px;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  position: relative;
  z-index: 1;
  margin-bottom: 72px;
}

.gallery.grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

/* Font Card */
.font-card {
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  border: 0.7px solid #C8C8C8;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  min-height: 200px;
  position: relative;
}

.font-card:hover {
  background: #c00;
}

.font-card:hover .font-name,
.font-card:hover .font-category {
  color: #fff;
}

.font-preview-container {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.font-card:hover .font-preview-container {
  background: #b00;
}

.font-preview {
  width: calc(100% + 18px);
  height: auto;
  display: block;
  margin-top: -2px;
  margin-left: -2px;
  object-fit: cover;
  object-position: left top;
}

.font-info {
  padding: 8px 8px 8px 14px;
  border-top: 0.7px solid #C8C8C8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s;
}

.font-card:hover .font-info {
  border-top-color: rgba(255, 255, 255, 0.3);
}

.font-details {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.font-name {
  font-weight: 400;
  font-size: 15px;
  color: #222;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.font-category {
  font-size: 12px;
  color: #888;
  transition: color 0.15s;
}

/* Download Button */
.btn-download {
  width: 41px;
  height: 41px;
  border-radius: 10px;
  background: transparent;
  border: 0.7px solid #C8C8C8;
  color: #bdbdbd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}

.btn-download:hover {
  background: #fff;
  color: #c00;
  border-color: #fff;
}

.font-card:hover .btn-download {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.font-card:hover .btn-download:hover {
  background: #fff;
  color: #c00;
  border-color: #fff;
}

/* Skeleton Loading - Simplified */
.font-card.skeleton {
  pointer-events: none;
  background: #e8e8e8;
  border-color: #d5d5d5;
}

/* Refresh Button */
.btn-refresh {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 77px;
  height: 77px;
  border-radius: 50%;
  background: #c00;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  z-index: 10;
}

.btn-refresh:hover:not(:disabled) .refresh-icon {
  transform: rotate(5deg);
}

.refresh-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  width: 62px;
  height: 62px;
}

.refresh-icon.spinning {
  animation: spin360 0.8s ease-out forwards;
}

@keyframes spin360 {
  from {
    transform: rotate(5deg);
  }
  to {
    transform: rotate(365deg);
  }
}

.btn-refresh:disabled {
  background: #999;
  cursor: not-allowed;
}

.btn-refresh:disabled .refresh-icon {
  opacity: 0.7;
}

/* Icon buttons (undo/redo) */
.controls-left {
  position: absolute;
  bottom: 24px;
  left: 0;
  display: flex;
  gap: 4px;
  z-index: 5;
}

/* Positioned relative to .gallery-container */

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F4F4F4;
  border: 0.7px solid #C8C8C8;
  color: #bdbdbd;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-icon:hover:not(:disabled) {
  background: #c00;
  color: #fff;
  border-color: #c00;
}

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

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* Count buttons (3/6) */
.controls-right {
  position: absolute;
  bottom: 24px;
  right: 0;
  display: flex;
  gap: 4px;
  z-index: 5;
}

.count-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 0.7px solid #C8C8C8;
  color: #d5d5d5;
  cursor: pointer;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  padding: 0;
}

.count-btn:hover:not(:disabled) {
  background: #c00;
  color: #fff;
  border-color: #c00;
}

.count-btn:hover:not(:disabled) .dot {
  fill: #fff;
}

.count-btn:disabled {
  cursor: default;
}

.dots-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 8px;
}

.count-btn .dot {
  fill: transparent;
  transition: fill 0.2s;
}

.count-btn.active .dot {
  fill: currentColor;
}

/* Empty State */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #d5d5d5;
  font-size: 16px;
}

/* Status - Hidden */
.status {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 768px) {
  body {
    top: -10vh;
  }

  .main-wrapper {
    padding: 0 16px;
    padding-top: 8vh;
    min-height: 65vh;
  }

  .gallery-container {
    width: 100%;
  }

  .header {
    padding: 24px 16px 20px;
  }

  .svg-link {
    top: 24px;
    right: 16px;
    font-size: 11px;
  }

  .logo {
    font-size: 24px;
    height: auto;
    gap: 0;
  }

  .logo-random {
    height: auto;
    line-height: 1;
  }

  .logo-dafont {
    font-size: 28px;
    height: 14px;
    line-height: 1;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 60px;
  }

  .gallery .font-card:first-child {
    margin-top: 18px;
  }

  .gallery.grid-6 {
    grid-template-columns: 1fr;
  }

  .controls-left {
    bottom: 20px;
  }

  .controls-right {
    bottom: 20px;
  }

  .btn-icon,
  .count-btn {
    width: 36px;
    height: 36px;
  }

  .btn-icon svg {
    width: 16px;
    height: 16px;
  }

  .count-btn {
    font-size: 14px;
  }

  .btn-refresh {
    width: 67px;
    height: 67px;
    bottom: 20px;
  }

  .btn-refresh svg {
    width: 26px;
    height: 26px;
  }
}

/* ============================================
   POSTER GALLERY SECTION
   ============================================ */

.poster-section {
  width: 100%;
  margin: 0 auto;
  padding: 220px 40px 60px;
}


.poster-gallery {
  padding: 0;
  font-size: 0;
  text-align: center;
}

/* Info Card - First card in poster gallery */
.info-card {
  display: inline-block;
  vertical-align: top;
  width: 264px;
  height: 400px;
  background: #c00;
  border-radius: 24px;
  --scroll-offset: 0px;
  transform: rotate(-2deg) translateY(var(--scroll-offset));
  margin-right: 31px;
  margin-bottom: 18px;
  margin-top: -80px;
  padding: 26px 27px;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}

.info-card:hover {
  transform: rotate(0deg) translateY(var(--scroll-offset));
  box-shadow: 0 20px 50px rgba(204, 0, 0, 0.4);
}

.info-text-italic {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 16px;
}

.info-instagram-link {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #fff;
}

.arrow-animate {
  display: inline-block;
  animation: arrow-slide 3.6s ease-in-out infinite;
}

@keyframes arrow-slide {
  0%, 100% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(6px);
  }
}



.info-cta {
  display: block;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 40px;
  font-weight: 400;
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #fff;
  text-decoration-thickness: 1.8px;
  text-underline-offset: 4px;
  letter-spacing: 0px;
  margin-bottom: 6px;
  line-height: 1.2;
  padding: 44px 0;
  text-align: center;
  font-style: normal;
}

.info-cta:hover {
  font-weight: 700;
}





.info-author {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #fff;
  margin-top: auto;
  position: absolute;
  bottom: 26px;
  left: 27px;
}

.info-author a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: #fff;
}

.info-card {
  position: relative;
}

.poster-card {
  display: inline-block;
  vertical-align: top;
  cursor: pointer;
  margin-right: 18px;
  margin-bottom: 18px;
  transition: transform 0.15s ease;
}

.poster-card:hover {
  transform: translateY(-3px);
}

.poster-card:last-child {
  margin-right: 0;
}

.poster-image {
  height: 340px;
  width: auto;
  display: block;
}

.poster-info {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2px;
  font-size: 14px;
}

.poster-author {
  display: none;
}

.poster-instagram {
  font-size: 14px;
  font-weight: 400;
  color: #888;
  text-decoration: none;
  transition: color 0.2s;
}

.poster-instagram:hover {
  color: #c00;
}

.poster-empty {
  text-align: center;
  padding: 80px 20px;
  color: #888;
  font-size: 16px;
}

/* Hide mobile instagram card on desktop */
.mobile-instagram-card {
  display: none;
}

/* Poster Gallery Responsive */
@media (max-width: 768px) {
  .poster-section {
    padding: 60px 16px 40px;
  }

  .poster-gallery {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .info-card {
    width: 100%;
    height: auto;
    padding: 20px;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 16px;
    transform: none;
    border-radius: 16px;
  }

  .info-card:hover {
    transform: none;
  }

  .info-card .info-text-italic:nth-child(2) {
    display: none;
  }

  .info-text-italic {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .info-cta {
    font-size: 18px;
    padding: 16px 0;
  }

  .info-rules {
    font-size: 12px;
  }

  .info-author {
    position: static;
    margin-top: 12px;
    font-size: 12px;
  }

  /* Mobile Instagram card */
  .mobile-instagram-card {
    display: block !important;
    width: 100%;
    background: #c00;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: left;
    font-size: 14px;
    order: 1;
  }

  .info-card {
    order: 0;
  }

  .poster-card {
    order: 2;
  }

  .mobile-instagram-card a {
    font-family: "Arial Narrow", Arial, sans-serif;
    font-size: 14px;
    color: #fff;
    text-decoration: underline;
  }

  .mobile-instagram-card a:hover {
    color: #fff;
  }

  .poster-card {
    margin-right: 0;
    margin-bottom: 16px;
    width: 100%;
  }

  .poster-image {
    height: auto;
    width: 100%;
  }
}

/* ============================================
   LIGHTBOX FOR FULLSCREEN POSTER VIEW
   ============================================ */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s, opacity 0.2s;
  z-index: 10;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-nav:disabled:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev {
  left: 24px;
}

.lightbox-next {
  right: 24px;
}

.lightbox-info {
  position: fixed;
  bottom: 15px;
  left: 15px;
  transform: none;
  background: #ffffff00;
  padding: 8px;
  border-radius: 3px;
  width: 192px;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2001;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.3;
}

.lightbox-author {
  display: none;
}

.lightbox-instagram {
  font-size: 14px;
  color: #d6d6d6;
  text-decoration: none;
  transition: color 0.2s;
  word-break: break-word;
  font-weight: 400;
  white-space: pre;
}

.lightbox-instagram:hover {
  color: #c00;
  text-decoration: underline;
}

.lightbox-fonts {
  font-size: 14px;
  color: #d6d6d6;
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.lightbox-font-item {
  line-height: 1.3;
  white-space: pre;
}

.lightbox-svg-badge {
  font-size: 14px;
  color: #d6d6d6;
  font-style: normal;
}

.lightbox-svg-badge a {
  color: #d6d6d6;
  text-decoration: underline;
  transition: color 0.2s;
  white-space: pre-line;
}

.lightbox-svg-badge a:hover {
  color: #c00;
}

.lightbox-date {
  font-size: 14px;
  color: #d6d6d6;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .lightbox-close,
  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 16px;
  }

  .lightbox-next {
    right: 16px;
  }

  .lightbox-info {
    bottom: 16px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .lightbox-author {
    font-size: 14px;
  }

  .lightbox-instagram {
    font-size: 13px;
  }
}

/* ============================================
   MODAL
   ============================================ */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-anon-message {
  position: fixed;
  top: calc(31.5% + 45vh);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
  color: #22c55e;
  z-index: 1001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.modal-anon-message.visible {
  opacity: 1;
}

/* Form Styles */
.poster-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 400;
  color: #333;
}

.form-group input[type="text"] {
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input[type="text"]:focus {
  outline: none;
  border-color: #c00;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}


/* File Upload */
.file-upload {
  position: relative;
  border: 2px dashed #ddd;
  border-radius: 8px;
  transition: border-color 0.2s, background 0.2s;
  min-height: 180px;
  background: #e5e5e5;
}

.file-upload:hover {
  border-color: #CB0200;
  background: #fef5f5;
}

.file-upload input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.file-upload-content {
  position: relative;
  padding: 32px 20px;
  text-align: center;
  color: #888;
  min-height: 180px;
}

/* Upload Image Placeholder */
.upload-image-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.upload-image-placeholder svg {
  width: 207px;
  height: auto;
  transition: transform 0.15s ease, color 0.2s;
  color: #919191;
}

.file-upload:hover .upload-image-placeholder {
  opacity: 0.7;
}

.file-upload:hover .upload-image-placeholder svg {
  transform: scale(1.15);
  color: #CB0200;
}

/* Scattered Upload Labels */
.upload-label {
  position: absolute;
  font-size: 14px;
  font-weight: 400;
  color: #777;
  white-space: nowrap;
  transition: color 0.2s;
}

.file-upload:hover .upload-label {
  color: #CB0200;
}

.upload-label-required {
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(1deg);
  animation: float-required 3s ease-in-out infinite;
}

@keyframes float-required {
  0%, 100% {
    transform: translate(-50%, -50%) rotate(1deg) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) rotate(1deg) translateY(-5px);
  }
}

.upload-label-ratio {
  top: 18px;
  left: 24px;
  transform: rotate(-4deg);
}

.upload-label-formats {
  top: 22px;
  right: 20px;
  transform: rotate(3deg);
}

.upload-label-action {
  bottom: 28px;
  left: 28px;
  transform: rotate(2deg);
  animation: float-updown 2.5s ease-in-out infinite;
}

.upload-label-size {
  bottom: 24px;
  right: 24px;
  transform: rotate(-5deg);
}

@keyframes float-updown {
  0%, 100% {
    transform: rotate(2deg) translateY(0);
  }
  50% {
    transform: rotate(2deg) translateY(-6px);
  }
}

.file-preview {
  position: relative;
  padding: 12px;
  z-index: 15;
}

.file-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
}

.file-remove {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: transparent;
  border-radius: 50%;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  z-index: 20;
}

.file-remove:hover {
  border-color: #c00;
  color: #c00;
}

/* Optional Section */
.optional-section {
  margin-top: 24px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}


/* Instagram Field Layout */
.form-group-instagram {
  flex-direction: row !important;
  align-items: center;
  gap: 0;
}

/* Instagram Input Wrapper with @ prefix */
.instagram-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.instagram-input-wrapper:focus-within {
  border-color: #c00;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.instagram-at-prefix {
  font-size: 14px;
  color: #666;
  padding: 11px 0 12px 14px;
  flex-shrink: 0;
  border-right: 1px solid #ddd;
  padding-right: 12px;
  margin-right: 12px;
  background: transparent;
}

.instagram-input-wrapper input {
  flex: 1;
  border: none !important;
  box-shadow: none !important;
  padding: 12px 16px 12px 0 !important;
  outline: none;
}

.instagram-input-wrapper input:focus {
  box-shadow: none !important;
}

.instagram-input-wrapper.highlight-green {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25) !important;
}

@keyframes green-pulse {
  0%, 100% {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
  }
  50% {
    border-color: #16a34a;
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.3);
  }
}

/* Font Inputs */
.font-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.font-input-row {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.font-name-input {
  width: 110px;
  max-width: 200px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s, width 0.15s ease;
  height: 38px;
  box-sizing: border-box;
}

.font-name-input:focus {
  outline: none;
  border-color: #c00;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.btn-add-font {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: none;
  border: 1px solid #ddd;
  background: transparent;
  font-size: 20px;
  font-weight: 400;
  color: #b5b5b5;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  margin-left: 0;
}

.btn-add-font:hover {
  border-color: #c00;
  color: #c00;
}

.btn-add-font:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.font-inputs.show-add-btn .btn-add-font {
  display: flex;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: default;
  font-size: 14px;
  color: #555;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  height: 38px;
  box-sizing: border-box;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #c00;
  flex-shrink: 0;
}

.checkbox-label span {
  cursor: default;
}

.checkbox-link {
  color: #555;
  text-decoration: underline;
  transition: color 0.2s;
}

.checkbox-link:hover {
  color: #c00;
}

/* Hint trigger */
.hint-trigger {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #ddd;
  font-size: 11px;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  flex-shrink: 0;
}

.hint-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.hint-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

.hint-trigger:hover .hint-tooltip {
  opacity: 1;
  visibility: visible;
}

/* Checkbox and Submit Row */
.form-row-checkbox-submit {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 0px;
}


.btn-submit {
  padding: 0 20px;
  background: #c00;
  border: none;
  border-radius: 8px;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  min-width: 120px;
  height: 38px;
  box-sizing: border-box;
}

.btn-submit.highlight-green {
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.btn-submit.highlight-green:hover {
  background: #22c55e;
}

.btn-submit:hover {
  background: #a00;
}

.btn-submit:disabled {
  background: #999;
  cursor: not-allowed;
}

/* Success State */
.submit-success {
  text-align: center;
  padding: 20px 0;
}

.submit-success h4 {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
}

.submit-success p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

/* Modal Responsive */
@media (max-width: 768px) {
  .modal-content {
    padding: 24px;
    margin: 16px;
  }

  .modal-title {
    font-size: 20px;
  }

  .form-actions {
    flex-direction: column;
  }
}
