html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: 'Baloo 2', cursive;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.02) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.02) 6px), linear-gradient(160deg, #b8956a 0%, #c4a574 25%, #d4b896 50%, #c4a574 75%, #b8956a 100%);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.background-clouds {
  display: block;
  position: fixed;
  top: -5vh;
  left: -5vw;
  width: 110vw;
  height: 110vh;
  z-index: 0;
  background: url('../Sky.png') center center / cover no-repeat;
  pointer-events: none;
}

.sidebar {
  /* Width controlled by universal style.css rule (400px) */
  background: url('../Sidebar.png') center center / 100% 100% no-repeat;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  outline: none !important;
  height: 85vh;
}

.layout-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 1800px;
  width: min(100%, 90vw);
  min-width: 0;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.container {
  margin: 20px;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100%;
  padding: 20px;
  overflow-x: hidden;
  box-sizing: border-box;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 2px solid #8b7355;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.08);
  height: 85vh !important;
  min-height: 85vh !important;
  max-height: 85vh !important;
  display: flex;
  position: relative;
}

/* Stitch frame inside container (leather seam) */
.create .container::before,
body:has(.create-steps) .container::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 2px dashed rgba(139, 90, 43, 0.5);
  border-radius: 12px;
  pointer-events: none;
  z-index: 0;
}

/* Legacy theme override for create page */
body.legacy-theme-active .container {
    background: url('../Page.png') center center / 100% 100% no-repeat !important;
    background-image: url('../Page.png') !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 12px;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 115, 85, 0.5) transparent;
}

.main-content::-webkit-scrollbar {
  width: 6px;
}
.main-content::-webkit-scrollbar-track {
  background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
  background: rgba(139, 115, 85, 0.4);
  border-radius: 4px;
}
.main-content::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 115, 85, 0.65);
}

/* Create page header strip - leather, like achievements */
.create-header {
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border-radius: 20px;
  padding: clamp(18px, 3vw, 28px) clamp(14px, 3vw, 32px) clamp(16px, 2.5vw, 24px);
  margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  border: 3px solid #8b7355;
  position: relative;
  width: 100%;
  max-width: min(700px, 100%);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}

.create-header::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), rgba(255,255,255,0.2), transparent);
  border-radius: 18px 18px 0 0;
  pointer-events: none;
}

.create-header::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  border-bottom: 2px dashed rgba(139, 90, 43, 0.5);
  pointer-events: none;
}

.create-header h1 {
  margin: 0 0 8px 0;
  font-size: 1.85rem;
  color: #2d2520;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
  text-align: center;
}

.create-header-subtitle {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  color: #3d352c;
  text-align: center;
  line-height: 1.4;
}

.create-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.create-steps .step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 14px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 2px solid #8b7355;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  font-size: 0.85rem;
  color: #2d2520;
  font-weight: bold;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.create-steps .step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  font-size: 0.8rem;
}

.create-steps .step .step-label {
  font-size: 0.8rem;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .create-steps .step .step-label { display: none; }
}

.create-steps .step.active {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%), linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  border-color: #4d7c0f;
  box-shadow: 0 4px 0 0 #166534, 0 5px 12px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(0,0,0,0.2);
  transform: translateY(-1px);
  color: #0f0f0f;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.create-steps .step.active .step-num {
  background: rgba(255,255,255,0.35);
}

.create-steps .step.completed {
  background: linear-gradient(145deg, #b8956e 0%, #a08060 100%);
  border-color: #8b7355;
  color: #2d2520;
}

.create-steps .step.completed::after {
  content: ' ✓';
  font-weight: bold;
  color: #166534;
}

.main-content h1 {
  color: #2d2520;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}

.fun-subtitle {
  margin: 6px 0 10px;
  font-size: 1rem;
  color: #2d2520;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}

/* Create Segment Styles - realistic leather (home page style) */
.create-segment {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: min(700px, 100%);
  margin: 40px auto;
  padding: clamp(20px, 4vw, 35px);
  box-sizing: border-box;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border-radius: 20px;
  border: 3px solid #8b7355;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 10px 20px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.15), inset 1px 0 0 rgba(255,255,255,0.2), inset -1px 0 0 rgba(0,0,0,0.1);
  position: relative;
  animation: fadeIn 0.3s ease-in;
}

.create-segment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.25), transparent);
  border-radius: 20px 20px 0 0;
  pointer-events: none;
}

/* Leather stitch at bottom of segment */
.create-segment::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  height: 0;
  border-bottom: 2px dashed rgba(139, 90, 43, 0.55);
  pointer-events: none;
}

.create-segment.hidden {
  display: none;
}

.create-segment.active {
  display: flex;
}

.create-segment h2,
.create-segment-title {
  margin: 0 0 12px 0;
  color: #2d2520;
  font-size: 1.5rem;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
  position: relative;
  padding-bottom: 8px;
  border-bottom: 2px dashed rgba(139, 90, 43, 0.45);
}

/* Inner panel: lighter "paper" surface inside leather card */
.create-segment-inner {
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(232,223,208,0.6) 50%, rgba(214,184,150,0.5) 100%);
  border-radius: 14px;
  padding: 24px 28px 20px;
  border: 2px solid rgba(139, 115, 85, 0.5);
  box-shadow: inset 0 2px 8px rgba(255,255,255,0.3), inset 0 -2px 6px rgba(0,0,0,0.06);
  position: relative;
}

.create-segment-inner::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 12px;
  right: 12px;
  border-bottom: 1px dashed rgba(139, 90, 43, 0.35);
  pointer-events: none;
}

.create-segment-desc {
  margin: 0 0 20px 0;
  font-size: 0.95rem;
  color: #3d352c;
  line-height: 1.45;
}

/* Form field styling */
.create-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2d2520;
}

.create-field-hint {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  color: #5d5348;
}

.create-input,
.create-textarea,
.create-select {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-family: inherit;
  font-size: 1rem;
  border: 2px solid #8b7355;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,246,242,0.95) 100%);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.create-textarea {
  min-height: 100px;
  resize: vertical;
}

.create-genre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .create-genre-grid { grid-template-columns: 1fr; }
}

.create-field {
  margin-bottom: 0;
}

.create-fields-block .create-input,
.create-fields-block .create-textarea {
  margin-bottom: 18px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Segment enter: fade + slide up (satisfying step transition) */
@keyframes segmentEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.create-segment.active.segment-enter {
  animation: segmentEnter 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform;
}

/* Form groups: always visible; optional subtle animate-in on scroll */
.create-form-group {
  opacity: 1;
  transform: translateY(0);
}

.create-form-group.animate-in {
  animation: segmentEnter 0.4s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .create-segment.active.segment-enter,
  .create-form-group.animate-in {
    animation: none;
  }
}

/* Tan leather helper cards (poll no-file, zip instructions) */
.create-helper-card {
  text-align: center;
  padding: 32px 24px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 40%, #e6d4b8 50%, #d4b896 60%, #c4a574 100%);
  border: 2px solid #8b7355;
  border-radius: 12px;
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.2);
}

.create-helper-icon {
  font-size: 48px;
  color: #5d4e37;
  margin-bottom: 12px;
  display: block;
}

.create-helper-title {
  color: #2d2520;
  margin-bottom: 8px;
  font-size: 1.15rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.create-helper-text {
  color: #4a4035;
  font-size: 0.95rem;
  margin: 0;
}

/* Post-to-fandom card: green leather */
.create-fandom-card {
  margin-top: 25px;
  padding: 20px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(145deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
  border: 3px solid #059669;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2), inset 0 2px 4px rgba(255,255,255,0.8), inset 0 -2px 4px rgba(0,0,0,0.08);
}

.create-fandom-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.create-fandom-card-header .material-icons {
  font-size: 1.5rem;
  color: #059669;
}

.create-fandom-card-title {
  color: #065f46;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
  cursor: pointer;
}

.create-fandom-card-desc {
  color: #047857;
  margin: 0 0 15px 0;
  font-size: 0.95rem;
}

/* Green 3D button for create page (Select Fandom, Add Option, etc.) */
.create-green-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%), linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%) !important;
  border: 2px solid #4d7c0f !important;
  color: #0f0f0f !important;
  box-shadow: 0 5px 0 0 #166534, 0 6px 14px rgba(0,0,0,0.3), inset 0 -2px 4px rgba(0,0,0,0.2) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.create-green-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 0 #166534, 0 8px 18px rgba(0,0,0,0.35), inset 0 -2px 4px rgba(0,0,0,0.2) !important;
}

.create-green-btn:active {
  transform: scale(0.98) translateY(2px);
  box-shadow: 0 2px 0 0 #166534, 0 4px 10px rgba(0,0,0,0.3), inset 0 2px 6px rgba(0,0,0,0.2) !important;
}

/* Input focus: green tint */
.create-segment input:focus,
.create-segment textarea:focus,
.create-segment select:focus {
  outline: none;
  border-color: #65a30d;
  box-shadow: 0 0 0 3px rgba(101, 163, 13, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* File drop success state */
.file-drop.file-success {
  border-color: #166534;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.25), 0 4px 12px rgba(22, 101, 52, 0.2);
}

.file-drop.file-success .file-drop-message::before {
  content: '✓ ';
  color: #166534;
  font-weight: bold;
}

/* Segment Navigation Buttons - Skeuomorphic */
.segment-navigation {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  padding-top: 25px;
  border-top: 2px dashed rgba(139, 90, 43, 0.5);
}

.nav-btn-segment {
  flex: 1;
  padding: 16px 28px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.1rem;
  font-weight: bold;
  border: 3px solid;
  border-radius: 12px;
  cursor: pointer;
  text-shadow: 
    0 1px 0 rgba(255,255,255,0.8),
    0 -1px 0 rgba(0,0,0,0.3);
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.nav-btn-segment::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.3), transparent);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.nav-btn-segment:first-child {
  background: 
    linear-gradient(145deg, #a0a0a0 0%, #808080 50%, #606060 100%);
  border-color: #707070 #b0b0b0 #b0b0b0 #707070;
  color: #fff;
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.3),
    0 3px 6px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.3),
    inset 0 -2px 4px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.nav-btn-segment:last-child:not(.submit-btn),
.nav-btn-segment.submit-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%), linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  border: 2px solid #4d7c0f;
  color: #0f0f0f;
  box-shadow: 0 6px 0 0 #166534, 0 8px 18px rgba(0,0,0,0.35), inset 0 -2px 4px rgba(0,0,0,0.2);
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.nav-btn-segment:last-child:not(.submit-btn):hover,
.nav-btn-segment.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 0 #166534, 0 10px 22px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.2);
}

.nav-btn-segment:last-child:not(.submit-btn):active,
.nav-btn-segment.submit-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 0 #166534, 0 4px 10px rgba(0,0,0,0.35), inset 0 3px 10px rgba(0,0,0,0.25);
}

.nav-btn-segment:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.35),
    0 4px 8px rgba(0,0,0,0.25),
    inset 0 2px 4px rgba(255,255,255,0.4),
    inset 0 -2px 4px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.nav-btn-segment:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.3),
    inset 0 3px 6px rgba(0,0,0,0.3),
    inset 0 -1px 2px rgba(255,255,255,0.2);
}

.nav-btn-segment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 
    0 2px 4px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(0,0,0,0.2);
}

.logo {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}
.logo-img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.logo-text-img {
  height: 50px;
  width: auto;
}

.nav-buttons {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.nav-auth-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.nav-auth-buttons .nav-btn {
  width: 100%;
  padding: 8px 45px;
  font-size: 1rem;
}

.nav-btn {
  width: 100%;
  padding: 12px 0; /* Homepage-style compact padding */
  font-size: 1rem; /* Homepage-style font size */
  font-family: 'Baloo 2', cursive;
  border: none !important;
  border-radius: 10px;
  background: url('../GreyButton.png') center center / 100% 100% no-repeat !important;
  background-color: transparent !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  cursor: none !important;
  outline: none !important;
  text-shadow: 
    1px 1px 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.5) !important;
  -webkit-text-stroke: 0 !important;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s ease;
}

.nav-btn.active, 
.nav-btn:hover,
.nav-btn.active:focus,
.nav-btn:hover:focus,
.nav-btn.active:focus-visible,
.nav-btn:hover:focus-visible {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat !important;
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
  transform: translateY(-1px);
  outline: none !important;
  text-shadow: 
    1px 1px 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.5) !important;
  -webkit-text-stroke: 0 !important;
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 3px 6px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.15) !important;
}

.nav-auth-buttons .nav-btn:hover {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat !important;
  background-color: transparent !important;
}

.greeting-avatar {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-bottom: 40px;
}

.greeting {
  font-size: 2.5rem;
  color: #000;
  margin: 0;
}
.username {
  color: #000;
}

.avatar-edit-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #000;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
}
.avatar-img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-text {
  position: absolute;
  bottom: 5px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0 4px;
}


.featured-projects h2 {
  font-size: 1.8rem;
  color: #000;
  margin-bottom: 25px;
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}
.project-card {
  background: #fff;
  border: 3px solid #000;
  padding: 5px;
}

.project-card img {
  width: 100%;
  height: auto;
  display: block;
}

.project-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 14px;
  justify-items: center;
}

.project-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(232,223,208,0.55) 100%);
  border: 2px solid #8b7355;
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.4);
  position: relative;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: 160px;
}

.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.5);
  border-color: #6d5a45;
}

.project-btn:focus-visible {
  outline: 2px solid #65a30d;
  outline-offset: 2px;
}

.project-btn img {
  display: block;
  max-width: 100%;
  width: 72px;
  height: auto;
  margin-bottom: 6px;
}

.project-btn[data-label]::after {
  content: attr(data-label);
  font-size: 0.82rem;
  font-weight: 700;
  color: #2d2520;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
}

/* Subscription Feature Blur Styles */
.subscription-feature {
  position: relative;
  pointer-events: none;
  cursor: not-allowed;
}

.subscription-feature > * {
  filter: blur(5px);
  opacity: 0.6;
}

.subscription-feature::before {
    content: 'lock';
    font-family: 'Material Icons';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4a5568;
    font-size: 40px;
    z-index: 10;
    filter: none !important;
    opacity: 1 !important;
    /* Skeuomorphic lock icon styling */
    background: linear-gradient(145deg, #e2e8f0, #cbd5e0);
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: inline-block;
    line-height: 80px;
    text-align: center;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,1);
    border: 2px solid;
    border-color: #cbd5e0 #f7fafc #f7fafc #cbd5e0;
    text-shadow: 
        0 1px 2px rgba(255,255,255,0.8),
        0 -1px 1px rgba(0,0,0,0.2);
}

.subscription-feature::after {
    content: 'Coming Soon';
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #4a5568;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    filter: none !important;
    opacity: 1 !important;
    text-shadow: 
        0 1px 2px rgba(255,255,255,0.8),
        0 -1px 1px rgba(0,0,0,0.1);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.subscription-feature.has-access {
  filter: none;
  pointer-events: auto;
  opacity: 1;
  cursor: pointer;
}

.subscription-feature.has-access::before,
.subscription-feature.has-access::after {
  display: none;
}

/* Maintenance Mode Styles */
.maintenance-mode {
  position: relative;
  pointer-events: none;
  cursor: not-allowed;
}

.maintenance-mode > * {
  filter: blur(5px);
  opacity: 0.6;
}

.maintenance-mode::before {
    content: 'build';
    font-family: 'Material Icons';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #f59e0b;
    font-size: 40px;
    z-index: 10;
    filter: none !important;
    opacity: 1 !important;
    /* Skeuomorphic maintenance icon styling */
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: inline-block;
    line-height: 80px;
    text-align: center;
    box-shadow: 
        0 8px 16px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,1);
    border: 2px solid;
    border-color: #fde68a #fef9c3 #fef9c3 #fde68a;
    text-shadow: 
        0 1px 2px rgba(255,255,255,0.8),
        0 -1px 1px rgba(0,0,0,0.2);
}

.maintenance-mode::after {
    content: 'Under Maintenance';
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #92400e;
    font-size: 14px;
    font-weight: bold;
    z-index: 10;
    filter: none !important;
    opacity: 1 !important;
    text-shadow: 
        0 1px 2px rgba(255,255,255,0.8),
        0 -1px 1px rgba(0,0,0,0.1);
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* Removed text labels under project type images */

#upload-form.hidden {
  display: none;
}

.hidden {
  display: none;
}

#upload-form, #article-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 700px;
  margin: 40px auto;
  padding: 30px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border-radius: 16px;
  border: 2px solid #8b7355;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
  position: relative;
}

/* Stitch at bottom of form */
#upload-form::after, #article-form::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 14px;
  right: 14px;
  height: 0;
  border-bottom: 2px dashed rgba(139, 90, 43, 0.55);
  pointer-events: none;
}

.helper-tip {
  width: 100%;
  text-align: left;
  font-size: 0.95rem;
  color: #2d2520;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 2px solid #8b7355;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25);
}

/* Scheduler */
.schedule-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
}

.schedule-toggle label {
  font-weight: bold;
  color: #2d2520;
}

.schedule-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  border: 2px solid #8b7355;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25);
}

.schedule-input-row label.inline {
  margin: 0;
}

.schedule-input-row input[type="datetime-local"] {
  border: 2px solid #999;
  border-radius: 8px;
  padding: 8px 10px;
  font-family: 'Baloo 2', cursive;
}

#upload-form label, #article-form label,
.create-segment label {
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem;
  text-align: left;
  color: #2d2520;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
  margin-bottom: 8px;
  display: block;
}

/* Skeuomorphic Input Fields */
#upload-form input[type="text"],
#upload-form textarea,
#upload-form select,
.create-segment input[type="text"],
.create-segment textarea,
.create-segment select {
  width: 100%;
  padding: 14px 16px;
  border: 3px solid;
  border-color: #a0a0a0 #e0e0e0 #e0e0e0 #a0a0a0;
  border-radius: 12px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  background: 
    linear-gradient(145deg, #ffffff 0%, #f5f5f5 50%, #ebebeb 100%);
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.15),
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  color: #333;
  transition: all 0.2s ease;
}

#upload-form input[type="text"]:focus,
#upload-form textarea:focus,
#upload-form select:focus,
.create-segment input[type="text"]:focus,
.create-segment textarea:focus,
.create-segment select:focus {
  outline: none;
  border-color: #4aa3ff #a0d4ff #a0d4ff #4aa3ff;
  background: 
    linear-gradient(145deg, #ffffff 0%, #f8fbff 50%, #f0f7ff 100%);
  box-shadow: 
    0 6px 12px rgba(74,163,255,0.25),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,102,204,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(-1px);
}

/* Custom Dropdown Styles - Matching Inventory */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.action-btn {
  width: 100%;
  background: 
    linear-gradient(145deg, #ffffff 0%, #e6e6e6 50%, #d0d0d0 100%);
  color: #333333;
  border: 3px solid;
  border-color: #a0a0a0 #e0e0e0 #e0e0e0 #a0a0a0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.8),
    inset 0 -2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  position: relative;
  text-align: left;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), transparent);
  border-radius: 12px 12px 0 0;
  pointer-events: none;
}

.action-btn:hover {
  background: 
    linear-gradient(145deg, #f0f0f0 0%, #d9d9d9 50%, #c0c0c0 100%);
  box-shadow: 
    0 6px 12px rgba(0,0,0,0.25),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(-1px);
}

.action-btn:active,
.action-btn.active {
  background: 
    linear-gradient(145deg, #d0d0d0 0%, #e6e6e6 50%, #f0f0f0 100%);
  box-shadow: 
    inset 0 3px 6px rgba(0,0,0,0.2),
    inset 0 -2px 4px rgba(255,255,255,0.8),
    inset 0 1px 0 rgba(255,255,255,0.6);
  transform: translateY(2px);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: 
    linear-gradient(145deg, #ffffff 0%, #f8f9fa 50%, #f0f0f0 100%);
  border: 3px solid;
  border-color: #a0a0a0 #e0e0e0 #e0e0e0 #a0a0a0;
  border-radius: 12px;
  min-width: 100%;
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.25),
    0 5px 10px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.9),
    inset 0 -2px 4px rgba(0,0,0,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  z-index: 1000;
  display: none;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: 1px;
  left: 1px;
  right: 1px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
  border-radius: 12px 12px 0 0;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-family: 'Baloo 2', cursive;
  font-weight: 600;
  color: #333333;
  cursor: pointer;
  transition: all 0.2s ease;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
  position: relative;
}

.dropdown-item:hover {
  background: 
    linear-gradient(145deg, #f0f0f0 0%, #e6e6e6 50%, #d9d9d9 100%);
  color: #1e293b;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.1);
}

.dropdown-item:active {
  background: 
    linear-gradient(145deg, #e6e6e6 0%, #f0f0f0 50%, #ffffff 100%);
  box-shadow: 
    inset 0 2px 3px rgba(0,0,0,0.2),
    inset 0 -1px 2px rgba(255,255,255,0.6);
}

.dropdown-item:not(:last-child) {
  border-bottom: 2px solid;
  border-color: #d0d0d0 #e8e8e8 #e8e8e8 #d0d0d0;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,0.8),
    inset 0 -1px 0 rgba(0,0,0,0.05);
}

/* File input: transparent full-zone overlay — no visible button */
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  font-size: 0; /* suppress any text rendering */
}

.file-drop input[type="file"]::-webkit-file-upload-button {
  display: none;
}

.file-drop input[type="file"]::file-selector-button {
  display: none;
}

.file-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 110px;
  border-radius: 16px;
  border: 2.5px dashed #9b8365;
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.02) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.02) 6px),
    linear-gradient(135deg, #cbb088 0%, #ddc4a2 40%, #eeddc4 55%, #ddc4a2 70%, #cbb088 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 2px 0 rgba(255,255,255,0.3), inset 0 -1px 0 rgba(0,0,0,0.08);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  gap: 4px;
  overflow: hidden;
}

/* Top sheen */
.file-drop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.45), transparent);
  border-radius: 16px 16px 0 0;
  pointer-events: none;
  z-index: 0;
}

/* Upload icon via pseudo */
.file-drop::after {
  content: '⬆';
  position: static;
  font-size: 1.6rem;
  opacity: 0.45;
  pointer-events: none;
  order: -1;
  z-index: 1;
}

.file-drop .file-drop-message {
  position: static;
  transform: none;
  font-size: 0.88rem;
  color: #3d2f20;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 1;
  text-align: center;
  line-height: 1.4;
}

.thumb-drop { min-height: 90px; }

/* Section 2: Thumbnail + Image Editor */
.segment-2-editor-hint {
  margin: 0 0 10px 0;
  font-size: 0.9rem;
  color: #64748b;
}
.thumbnail-and-editor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}
.thumbnail-and-editor-row .thumb-drop {
  flex: 1 1 min(280px, 100%);
  min-width: 0;
}
.thumbnail-editor-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.thumbnail-editor-wrap.hidden { display: none !important; }
.segment-2-editor-btn {
  width: auto !important;
  padding: 10px 16px !important;
  white-space: nowrap;
}
.segment-2-editor-btn .material-icons {
  font-size: 1.1em;
  vertical-align: middle;
  margin-right: 4px;
}
.segment-2-editor-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Copyright Detection Status Styles */
.copyright-status {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 2px solid #d4d4d4;
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.copyright-status.checking {
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
}

.copyright-status.safe {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  border-color: #10b981;
  color: #065f46;
}

.copyright-status.warning {
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  border-color: #ef4444;
  color: #991b1b;
  animation: pulse-warning 2s ease-in-out infinite;
}

.copyright-status.unavailable {
  background: linear-gradient(145deg, #fef3c7, #fde68a);
  border-color: #f59e0b;
  color: #92400e;
}

@keyframes pulse-warning {
  0%, 100% {
    box-shadow: 
      0 4px 8px rgba(0, 0, 0, 0.1),
      inset 0 2px 4px rgba(255, 255, 255, 0.8),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 
      0 4px 12px rgba(239, 68, 68, 0.3),
      inset 0 2px 4px rgba(255, 255, 255, 0.8),
      inset 0 -2px 4px rgba(0, 0, 0, 0.1),
      0 0 0 3px rgba(239, 68, 68, 0.1);
  }
}

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

/* Image Cropper Modal Styles (for thumbnail cropping) */
.image-cropper-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.cropper-modal-content {
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px), linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
    border: 3px solid #8b7355;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.35), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.12);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.cropper-modal-content::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed rgba(139, 90, 43, 0.5);
    border-radius: 16px;
    pointer-events: none;
}

.cropper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px dashed rgba(139, 90, 43, 0.5);
    background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
}

.cropper-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2d2520;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
}

.cropper-close {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    border: 2px solid #b91c1c;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.cropper-close:hover {
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.cropper-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: auto;
}

.cropper-canvas-container {
    position: relative;
    display: inline-block;
    border: 3px solid #c0c4c8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

#cropper-canvas {
    display: block;
    cursor: move;
    user-select: none;
}

.banner-position-options,
.thumbnail-position-options {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.banner-position-options label,
.thumbnail-position-options label {
    font-weight: 600;
    color: #333;
    font-family: 'Baloo 2', cursive;
}

.position-buttons {
    display: flex;
    gap: 10px;
}

.position-btn {
    padding: 10px 20px;
    border: 2px solid #c0c4c8;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: 'Baloo 2', cursive;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.position-btn:hover {
    border-color: #4caf50;
    background: linear-gradient(145deg, #f1f8f4, #e8f5e9);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(76, 175, 80, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 1);
}

.position-btn.active {
    background: linear-gradient(145deg, #4caf50, #45a049);
    color: #fff;
    border-color: #4caf50;
    box-shadow: 
        0 4px 8px rgba(76, 175, 80, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.cropper-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 2px dashed rgba(139, 90, 43, 0.5);
    background: linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
}

.cropper-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Baloo 2', cursive;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
}

.cropper-cancel {
    background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
    color: #333;
    border: 2px solid #c0c4c8;
}

.cropper-cancel:hover {
    background: linear-gradient(145deg, #d0d0d0, #c0c0c0);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 1);
}

.cropper-confirm {
    background: linear-gradient(145deg, #4caf50, #45a049);
    color: #fff;
    border: 2px solid #45a049;
}

.cropper-confirm:hover {
    background: linear-gradient(145deg, #45a049, #3d8b40);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(76, 175, 80, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.file-drop.dragover {
  border-color: #65a30d;
  box-shadow: 0 6px 20px rgba(101,163,13,0.3), inset 0 2px 0 rgba(255,255,255,0.3);
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.02) 6px),
    linear-gradient(135deg, #d4e8b0 0%, #e8f5d0 50%, #d4e8b0 100%) !important;
}

.file-drop:hover {
  border-color: #7d6545;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.35);
}

#upload-form button[type="submit"], #article-form button[type="submit"] {
  background: url('../GreenButton.png') center center / 100% 100% no-repeat;
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 1.3rem; /* Larger font */
  font-weight: bold;
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  padding: 15px 0;
  cursor: pointer;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
  transition: filter 0.2s, background 0.2s; /* Added background to transition */
  width: 280px; /* Slightly wider button */
  align-self: center;
}

#upload-form button[type="submit"]:hover, #article-form button[type="submit"]:hover {
  filter: brightness(1.1);
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
}

#upload-form button[type="submit"]:disabled {
  background: url('../GreyButton.png') center center / 100% 100% no-repeat;
  cursor: not-allowed;
  filter: brightness(0.9);
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
}

#back-btn, .back-link {
  align-self: flex-start;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  color: #000;
}

@media (max-width: 1200px) {
  .sidebar {
    width: 300px;
  }
  .greeting {
    font-size: 2.2rem;
  }
  .featured-projects h2 {
    font-size: 1.6rem;
  }
  .projects-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 992px) {
  .layout-wrapper {
    flex-direction: column;
    height: auto;
    width: 100%;
    gap: 0;
  }
  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
    box-sizing: border-box;
  }
  .logo {
    margin-bottom: 0;
  }
  .logo-text {
    font-size: 1.5rem;
  }
  .nav-buttons {
    flex-direction: row;
    width: auto;
    gap: 8px;
    align-items: center;
  }
  .nav-btn {
    padding: 10px 15px;
    font-size: 1rem;
    white-space: nowrap;
  }
  .nav-auth-buttons {
    display: contents;
  }
  .container {
    width: 100%;
    height: 85vh !important;
    min-height: 85vh !important;
    max-height: 85vh !important;
    border-radius: 0;
  }
  .main-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .greeting-avatar {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
  }
  .greeting {
    font-size: 1.8rem;
  }
  .sidebar {
    padding: 10px;
  }
  .logo-img {
      display: none;
  }
  .nav-buttons {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    scrollbar-width: none; /* Firefox */
  }
  .nav-buttons::-webkit-scrollbar { 
    display: none; /* Safari and Chrome */
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 15px;
  }
  .greeting {
    font-size: 1.5rem;
  }
  .featured-projects h2 {
    font-size: 1.3rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .project-buttons {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-btn img {
    max-width: 200px;
  }
}

.success-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}

.success-message h1 {
  font-size: 3rem;
  color: #2e7d32;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.success-message p {
  font-size: 1.2rem;
  color: #000;
  margin-bottom: 20px;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Copyright Agreement Checkbox Styles */
.copyright-agreement {
  margin: 20px 0;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

/* Preview area */
.preview-area {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.preview {
  border-radius: 14px;
  border: 2px solid #8b7355;
  background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25);
  padding: 10px;
}

.preview img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

/* Fandom preview specific styles */
#fandom-avatar-preview {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  max-width: 200px;
  max-height: 200px;
  width: 100%;
  height: auto;
}

#fandom-banner-preview {
  aspect-ratio: 21 / 9;
  object-fit: cover;
  width: 100%;
  max-width: 600px;
  height: auto;
}

.preview-label {
  font-size: 0.9rem;
  color: #2d2520;
  margin-bottom: 6px;
  text-align: left;
}

/* Checkbox Styles - Remade from scratch */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-family: 'Baloo 2', cursive;
  font-size: 0.6rem;
  line-height: 1.4;
  color: #000;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.checkmark {
  display: inline-block;
  width: 28px;
  height: 28px;
  min-width: 28px;
  max-width: 28px;
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  margin-top: 1px;
  background: linear-gradient(145deg, #f5f5f5 0%, #e0e0e0 50%, #d0d0d0 100%);
  border: 3px solid;
  border-color: #b0b0b0 #f8f8f8 #f8f8f8 #b0b0b0;
  border-radius: 6px;
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

/* Shine effect on top */
.checkmark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 6px 6px 0 0;
  pointer-events: none;
}

/* Checkmark when checked */
.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: linear-gradient(145deg, #4ade80 0%, #22c55e 50%, #16a34a 100%);
  border-color: #15803d #86efac #86efac #15803d;
  box-shadow: 
    0 4px 8px rgba(34, 197, 94, 0.4),
    0 2px 4px rgba(34, 197, 94, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -2px 4px rgba(21, 128, 61, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 -1px 2px rgba(255, 255, 255, 0.3);
}

/* Hover state */
.checkbox-label:hover .checkmark {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 5px 10px rgba(0, 0, 0, 0.25),
    0 2px 5px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.checkbox-label:hover input[type="checkbox"]:checked + .checkmark {
  box-shadow: 
    0 5px 10px rgba(34, 197, 94, 0.5),
    0 2px 5px rgba(34, 197, 94, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -2px 4px rgba(21, 128, 61, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Active/pressed state */
.checkbox-label:active .checkmark {
  transform: translateY(0px) scale(0.98);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 1px 2px rgba(0, 0, 0, 0.25),
    inset 0 3px 6px rgba(0, 0, 0, 0.2),
    inset 0 -1px 2px rgba(255, 255, 255, 0.2);
}

.guidelines-agreement {
  margin: 20px 0;
  text-align: left;
  width: 100%;
  max-width: 500px;
}

.guidelines-agreement a {
  color: #0066cc;
  text-decoration: underline;
  font-weight: bold;
}

.guidelines-agreement a:hover {
  color: #004499;
}

/* Responsive design for checkbox */
@media (max-width: 768px) {
  .guidelines-agreement {
    margin: 15px 0;
  }
  
  .checkbox-label {
    font-size: 0.8rem;
  }
  
  .checkmark {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    height: 24px;
  }
  
  .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .checkbox-label {
    font-size: 0.75rem;
  }
  
  .checkmark {
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    height: 22px;
  }
  
  .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    font-size: 14px;
  }
}

/* Tags input styling (tagify removed) */
#tags {
    width: 100%;
    min-height: 40px;
    display: block;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

/* Zip Instructions Styling */
.zip-instructions {
    margin: 15px 0;
    transition: all 0.3s ease;
}

.zip-instructions.hidden {
    display: none;
}

.instruction-box {
    background: repeating-linear-gradient(45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px), linear-gradient(135deg, #d4b896 0%, #e6d4b8 50%, #d4b896 100%);
    border: 2px solid #8b7355;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.25);
    position: relative;
}

.instruction-box::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    height: 0;
    border-bottom: 2px dashed rgba(139, 90, 43, 0.5);
    pointer-events: none;
}

.instruction-box h4 {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.instruction-box p {
    margin: 0 0 15px 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.4;
}

.file-structure {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.folder {
    color: #007bff;
    font-weight: 600;
    margin-bottom: 5px;
}

.folder-content {
    margin-left: 20px;
    margin-bottom: 10px;
}

.file {
    color: #28a745;
    margin: 2px 0;
}

.file-structure .folder {
    color: #007bff;
    font-weight: 600;
}

.file-structure .file {
    color: #28a745;
}

.note {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
    padding: 10px 15px;
    margin: 15px 0 0 0;
    border-radius: 0 6px 6px 0;
    font-size: 0.9rem;
    color: #0056b3;
    font-style: italic;
}

/* Article Page Styles */
.article-form-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.article-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.editor-hint {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.article-rich-editor-container {
    margin-bottom: 20px;
}

.publish-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.publish-btn {
    background: linear-gradient(145deg, #10b981, #059669);
    color: white;
    border: 3px solid;
    border-color: #047857 #34d399 #34d399 #047857;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Baloo 2', cursive;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(16, 185, 129, 0.3),
        0 2px 4px rgba(5, 150, 105, 0.2),
        inset 0 2px 4px rgba(255,255,255,0.2),
        inset 0 -2px 4px rgba(0,0,0,0.2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.publish-btn:hover:not(:disabled) {
    background: linear-gradient(145deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px rgba(16, 185, 129, 0.4),
        0 3px 6px rgba(5, 150, 105, 0.3),
        inset 0 2px 4px rgba(255,255,255,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.2);
}

.publish-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.3),
        inset 0 -2px 4px rgba(255,255,255,0.3);
}

.publish-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.publish-btn.publishing {
    background: linear-gradient(145deg, #f59e0b, #d97706);
    border-color: #b45309 #fbbf24 #fbbf24 #b45309;
    animation: pulse 1.5s ease-in-out infinite;
}

.publish-btn.published {
    background: linear-gradient(145deg, #10b981, #059669);
    border-color: #047857 #34d399 #34d399 #047857;
}

.publish-btn-secondary {
    background: linear-gradient(145deg, #6b5344, #5c4033);
    color: #e8dcc8;
    border-color: #4a3728 #8b7355 #8b7355 #4a3728;
}

.publish-btn-secondary:hover:not(:disabled) {
    background: linear-gradient(145deg, #7d6b5a, #6b5344);
}

.my-drafts-section {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(145deg, #e8e0d4 0%, #d4c8b8 100%);
    border: 2px solid #8b7355;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.3);
}

.my-drafts-title {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
    color: #2d2520;
}

.my-drafts-list {
    margin: 0;
    padding-left: 24px;
}

.my-drafts-list li {
    margin: 6px 0;
}

.my-drafts-list a {
    color: #5c4033;
    font-weight: 600;
    text-decoration: none;
}

.my-drafts-list a:hover {
    text-decoration: underline;
}

.draft-date {
    font-size: 0.85rem;
    color: #6b5344;
    margin-left: 8px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.publish-status {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.5);
}

.publish-status.success {
    background: linear-gradient(145deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 2px solid #10b981;
}

.publish-status.error {
    background: linear-gradient(145deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 2px solid #ef4444;
}

.publish-status.info {
    background: linear-gradient(145deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    border: 2px solid #16a34a;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #2d2520;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    text-shadow: 0 1px 2px rgba(255,255,255,0.3);
}

.back-link:hover {
    color: #5c4033;
    text-decoration: underline;
}

.dropdown-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border: 3px solid;
    border-color: #a0a0a0 #e0e0e0 #e0e0e0 #a0a0a0;
    border-radius: 8px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8);
    z-index: 1000;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: 'Baloo 2', cursive;
    font-size: 0.95rem;
    color: #0b3d66;
    transition: background 0.2s ease;
}

.dropdown-item {
    color: #2d2520;
}

.dropdown-item:hover {
    background: linear-gradient(145deg, #e0e0e0, #d0d0d0);
}

.dropdown-item:first-child {
    border-radius: 5px 5px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 5px 5px;
}

/* Poll Calendar Styles */
.poll-calendar-trigger:hover {
    border-color: #16a34a !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255,255,255,0.8) !important;
    transform: translateY(-1px);
}

.poll-calendar-trigger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

.poll-calendar-nav:hover {
    background: linear-gradient(135deg, #84cc16 0%, #166534 100%) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4) !important;
    transform: translateY(-1px);
}

.poll-calendar-nav:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
}

#poll-calendar-clear:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4) !important;
    transform: translateY(-1px);
}

#poll-calendar-clear:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3) !important;
}

/* Force calendar nav and apply buttons to green 3D on create page */
.create-segment .poll-calendar-nav,
.create-segment .poll-calendar-nav:hover {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%) !important;
  border: 2px solid #4d7c0f !important;
  color: #0f0f0f !important;
  box-shadow: 0 3px 0 0 #166534, 0 4px 8px rgba(0,0,0,0.2) !important;
}

#project-publish-calendar-apply,
#poll-publish-calendar-apply {
  background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%) !important;
  color: #0f0f0f !important;
  border: 2px solid #4d7c0f !important;
  box-shadow: 0 3px 0 0 #166534, 0 2px 4px rgba(0,0,0,0.2) !important;
}

#project-publish-calendar-apply:hover,
#poll-publish-calendar-apply:hover {
  background: linear-gradient(135deg, #a3e635 0%, #84cc16 100%) !important;
  box-shadow: 0 4px 0 0 #166534, 0 4px 8px rgba(0,0,0,0.25) !important;
}

/* Calendar trigger icon green on create page */
.create-segment .poll-calendar-trigger .material-icons {
  color: #166534 !important;
}

.create-fandom-name {
  color: #065f46;
}

/* Upload progress container green on create page */
.upload-progress-container {
  background: linear-gradient(145deg, #ecfdf5, #d1fae5) !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2) !important;
}

.upload-progress-container .material-icons,
.upload-progress-container [style*="color: #1e40af"],
#upload-progress-percent {
  color: #065f46 !important;
}

#upload-progress-bar {
  background: linear-gradient(90deg, #84cc16, #65a30d, #4d7c0f) !important;
  box-shadow: 0 2px 4px rgba(22, 101, 52, 0.4) !important;
}

/* ═══════════════════════════════════════════════════════════════
   SEGMENT 1 — TYPE PICKER GRID  (smoother, larger, grid-focused)
   ═══════════════════════════════════════════════════════════════ */

/* Segment 1: stay within main column — avoid 4×140px forcing horizontal scroll */
#segment-1.create-segment {
  max-width: min(820px, 100%);
  padding: clamp(16px, 3vw, 28px) clamp(12px, 3vw, 32px);
  box-sizing: border-box;
}

/* Fluid columns: icons shrink on narrow viewports (was fixed 140px × 4) */
.project-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(4px, 1.5vw, 10px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-items: center;
}

@media (max-width: 700px) {
  .project-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .project-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

/* Image-only buttons in type grid — no card container */
.project-type-grid .project-btn {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  justify-self: center;
  transition: transform 0.2s ease;
}

/* Hide text label */
.project-type-grid .project-btn[data-label]::after {
  content: none;
}

/* Icon size — fluid so grid never exceeds viewport width */
.project-type-grid .project-btn img {
  width: 100%;
  max-width: min(140px, 24vw);
  height: auto;
  margin: 0 auto;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: block;
}

/* Hover: just pop the icon */
.project-type-grid .project-btn:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.project-type-grid .project-btn:hover img {
  transform: scale(1.15) translateY(-4px);
}

/* Active: press icon */
.project-type-grid .project-btn:active img {
  transform: scale(0.95) translateY(1px);
}

/* ═══════════════════════════════════════════════════════════════
   SEGMENT 2 — FORM DECK LAYOUT  (two-column: main + sidebar)
   ═══════════════════════════════════════════════════════════════ */

/* Widen segment-2 to accommodate two-column form deck */
#segment-2.create-segment {
  max-width: min(1060px, 100%);
  padding: clamp(16px, 2.5vw, 24px) clamp(14px, 2.5vw, 28px) 28px;
  box-sizing: border-box;
}

/* Two-column grid: main content | sidebar */
.form-deck {
  display: grid;
  grid-template-columns: 1fr minmax(0, 272px);
  gap: 20px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  align-items: start;
  box-sizing: border-box;
}

@media (max-width: 860px) {
  .form-deck { grid-template-columns: 1fr; }
}

.form-deck-main,
.form-deck-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* ─── Leather panel cards ─── */
.form-panel,
.sidebar-panel {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,0.04) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.04) 6px),
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.03) 0px, transparent 2px, transparent 4px, rgba(0,0,0,0.03) 6px),
    linear-gradient(135deg, #c4a574 0%, #d4b896 35%, #e6d4b8 50%, #d4b896 65%, #c4a574 100%);
  border: 2px solid #8b7355;
  border-radius: 16px;
  padding: 14px 18px 18px;
  box-shadow: 0 5px 14px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.1);
  position: relative;
  transition: box-shadow 0.2s ease;
}

/* Panel header row */
.form-panel-header,
.sidebar-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 2px dashed rgba(139, 90, 43, 0.4);
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d2520;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.form-panel-header .material-icons,
.sidebar-panel-header .material-icons {
  font-size: 1.15rem;
  color: #5d4e37;
}

/* ─── Individual form fields ─── */
.form-field {
  margin-bottom: 12px;
}
.form-field:last-child { margin-bottom: 0; }

.form-field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2d2520;
  margin-bottom: 5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

.form-field-hint {
  margin: 0 0 7px 0;
  font-size: 0.8rem;
  color: #4a3f34;
  line-height: 1.4;
}

/* Type badge heading */
.form-type-badge {
  margin: 0 0 10px 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #2d2520;
  text-shadow: 0 1px 2px rgba(255,255,255,0.4);
}

/* ─── Back-to-type button (grey 3D) ─── */
.back-type-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  font-family: 'Baloo 2', cursive;
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(145deg, #a8a8a8 0%, #888888 50%, #686868 100%);
  border: 2px solid #707070;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  box-shadow: 0 4px 0 0 #484848, 0 6px 12px rgba(0,0,0,0.22), inset 0 2px 0 rgba(255,255,255,0.22);
  transition: all 0.15s ease;
}

.back-type-btn .material-icons { font-size: 1.1rem; }

.back-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #484848, 0 8px 16px rgba(0,0,0,0.28), inset 0 2px 0 rgba(255,255,255,0.28);
}

.back-type-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 0 #484848, 0 3px 8px rgba(0,0,0,0.2), inset 0 3px 6px rgba(0,0,0,0.2);
}

/* ─── Audience rating pills ─── */
.audience-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.audience-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  font-family: 'Baloo 2', cursive !important;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px !important;
  border: 2px solid #d0cac4 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f5f3f1 100%) !important;
  color: #3d352c !important;
  cursor: pointer;
  text-shadow: none !important;
  box-shadow: 0 2px 0 0 rgba(0,0,0,0.12), 0 3px 6px rgba(0,0,0,0.09), inset 0 1px 0 rgba(255,255,255,1) !important;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.audience-pill .material-icons {
  font-size: 1.25rem;
  color: #4a4440;
  transition: color 0.15s;
}

.audience-pill small {
  font-size: 0.64rem;
  opacity: 0.75;
  font-weight: 400;
}

.audience-pill:hover {
  transform: translateY(-2px);
  border-color: #b0aaa4;
  box-shadow: 0 4px 0 0 rgba(0,0,0,0.12), 0 6px 12px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,1);
}

.audience-pill.active {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%) !important;
  border-color: #4d7c0f !important;
  color: #0f0f0f !important;
  box-shadow: 0 4px 0 0 #166534, 0 6px 12px rgba(0,0,0,0.22), inset 0 -2px 4px rgba(0,0,0,0.18) !important;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5) !important;
  transform: translateY(-1px);
}

.audience-pill.active .material-icons {
  color: #1a4d0a;
}

.audience-pill.active small {
  opacity: 1;
}

/* ─── Schedule / calendar trigger ─── */
.schedule-trigger-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-family: 'Baloo 2', cursive;
  font-size: 0.88rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,246,242,0.96) 100%);
  border: 2px solid #8b7355;
  border-radius: 10px;
  color: #2d2520;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}

.schedule-trigger-btn:hover {
  border-color: #65a30d;
  box-shadow: 0 0 0 3px rgba(101, 163, 13, 0.18), inset 0 2px 4px rgba(0,0,0,0.06);
}

.schedule-trigger-btn .material-icons {
  font-size: 1.1rem;
  color: #166534;
  flex-shrink: 0;
}

/* ─── Submit / Create Project button ─── */
.submit-project-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-family: 'Baloo 2', cursive;
  font-size: 1.05rem;
  font-weight: 700;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 25%, transparent 50%),
    linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  border: 2px solid #4d7c0f;
  border-radius: 14px;
  color: #0f0f0f;
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  box-shadow: 0 6px 0 0 #166534, 0 8px 18px rgba(0,0,0,0.28), inset 0 -2px 4px rgba(0,0,0,0.18);
  transition: all 0.15s ease;
}

.submit-project-btn .material-icons { font-size: 1.2rem; }

.submit-project-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 0 #166534, 0 10px 22px rgba(0,0,0,0.32), inset 0 -2px 4px rgba(0,0,0,0.18);
}

.submit-project-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 2px 0 0 #166534, 0 4px 10px rgba(0,0,0,0.28), inset 0 3px 10px rgba(0,0,0,0.22);
}

.submit-project-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ─── Jam dates two-column row ─── */
.jam-dates-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .jam-dates-row { grid-template-columns: 1fr; }
}

/* ─── Smooth scroll-area in main-content ─── */
.main-content {
  scroll-behavior: smooth;
}

/* ─── create-input/textarea inside form-deck: tighter margin ─── */
.form-deck .create-input,
.form-deck .create-textarea,
.form-deck .create-select {
  margin-bottom: 0;
}

/* ─── Override oversized global label rule inside form panels ─── */
.form-panel label,
.sidebar-panel label,
.form-deck label {
  font-size: 0.88rem !important;
  margin-bottom: 5px !important;
}

/* ─── Hide redundant "Project File" label (panel header covers it) ─── */
#project-file-label {
  display: none;
}

/* ─── Tighter create-segment margin for segment 2 ─── */
#segment-2.create-segment {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* ─── Reduce create-header padding ─── */
.create-header {
  padding: 18px 24px 16px !important;
  margin-bottom: 14px !important;
}

/* ─── Art multi-upload section ─── */
#art-multi-upload-section .file-drop {
  min-height: 120px;
  max-width: 420px;
  align-self: flex-start;
}

/* Art image preview grid */
.art-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.art-preview-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #8b7355;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
  aspect-ratio: 1 / 1;
  background: rgba(0,0,0,0.05);
}

.art-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* "Cover" badge on first image */
.art-preview-item:first-child::after {
  content: 'Cover';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(22, 101, 52, 0.85);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  padding: 3px 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  letter-spacing: 0.04em;
}

/* Remove button on each preview item */
.art-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.85);
  border: none;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 4;
}

.art-preview-remove:hover {
  background: rgba(185, 28, 28, 0.95);
  transform: scale(1.15);
}
/* Drag-to-reorder states */
.art-preview-item[draggable="true"] { cursor: grab; }
.art-preview-item.dragging { opacity: 0.35; }
.art-preview-item.drag-over {
  border-color: #65a30d;
  box-shadow: 0 0 0 3px rgba(101,163,13,0.45), 0 3px 8px rgba(0,0,0,0.2);
}



/* ─── Compact form panel gaps to reduce crowding ─── */
.form-deck-main,
.form-deck-sidebar {
  gap: 10px;
}

.form-panel,
.sidebar-panel {
  padding: 12px 16px 14px;
}

.form-panel-header,
.sidebar-panel-header {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

/* Smaller description textarea */
.form-deck .create-textarea {
  min-height: 80px;
}

/* ─── File success message ─── */
.file-drop .file-success-name {
  font-size: 0.8rem;
  color: #166534;
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
  text-align: center;
  z-index: 1;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Community Guidelines Popup ─── */
.guidelines-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  isolation: isolate;
  contain: layout style paint;
  transform: translateZ(0);
  animation: fadeIn 0.18s ease;
}

.guidelines-popup-overlay.hidden {
  display: none;
}

.guidelines-popup {
  background: linear-gradient(160deg, #fdf6ee 0%, #f5ead8 100%);
  border: 3px solid #a0845c;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.7);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  animation: popupEnter 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popupEnter {
  from { opacity: 0; transform: scale(0.88) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.guidelines-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 14px;
  border-bottom: 2px solid rgba(139, 115, 85, 0.25);
  background: linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 100%);
}

.guidelines-popup-header .material-icons {
  font-size: 1.6rem;
  color: #6b4f2a;
}

.guidelines-popup-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #3d2b1a;
}

.guidelines-popup-body {
  padding: 16px 22px;
  color: #4a3828;
  font-size: 0.93rem;
  line-height: 1.6;
}

.guidelines-popup-body p {
  margin: 0 0 10px;
}

.guidelines-popup-body p:last-child {
  margin-bottom: 0;
}

.guidelines-popup-body a {
  color: #8b5e2a;
  font-weight: 600;
  text-decoration: underline;
}

.guidelines-popup-footer {
  padding: 14px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 2px solid rgba(139, 115, 85, 0.2);
}

.guidelines-popup-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #3d2b1a;
  font-weight: 600;
}

.guidelines-popup-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #4d7c0f;
}

.guidelines-popup-agree-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  border: 2px solid #4d7c0f;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 50%),
              linear-gradient(145deg, #bef264 0%, #a3e635 25%, #84cc16 50%, #65a30d 75%, #4d7c0f 100%);
  color: #0f0f0f;
  box-shadow: 0 4px 0 0 #166534, 0 6px 14px rgba(0,0,0,0.22);
  cursor: pointer;
  transition: all 0.15s ease;
}

.guidelines-popup-agree-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: 0 2px 0 0 #166534, 0 3px 8px rgba(0,0,0,0.12);
  transform: none !important;
}

.guidelines-popup-agree-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 #166534, 0 10px 20px rgba(0,0,0,0.25);
}

.guidelines-popup-agree-btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 0 #166534, 0 4px 8px rgba(0,0,0,0.2);
}
