/* === Demo Submission Page === */

/* --- Mouse trail canvas (matches main page) --- */
.mouse-trail {
  position: fixed;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* --- Floating particles background (matches main page) --- */
.floating-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}

.floating-particles .particle {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform, opacity;
  animation-name: particle-rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.floating-particles .particle-dot {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation-name: particle-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes particle-rise {
  0%   { transform: translate(var(--p-x), 110vh); opacity: 0; }
  10%  { opacity: var(--p-op); }
  50%  { transform: translate(var(--p-x), 50vh); opacity: var(--p-op); }
  90%  { opacity: var(--p-op); }
  100% { transform: translate(var(--p-x), -10vh); opacity: 0; }
}

@keyframes particle-drift {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(calc(var(--p-drift) * 0.5)); }
  100% { transform: translateX(var(--p-drift)); }
}

.demo-section {
  position: relative;
  z-index: 1;
  padding: 120px 40px 100px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 140px);
}

.demo-card {
  max-width: 600px;
  width: 100%;
  padding: 48px 48px 44px;
  border-radius: 24px;
  border: 1px solid rgba(29,228,212,0.15);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(29,228,212,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 100%, rgba(123,79,201,0.05) 0%, transparent 50%),
    rgba(4,7,13,0.65);
  backdrop-filter: blur(16px);
  box-shadow:
    0 0 40px rgba(29,228,212,0.06),
    0 0 80px rgba(123,79,201,0.04),
    0 4px 32px rgba(0,0,0,0.4);
}

.demo-title {
  font-family: 'Cinzel Decorative', serif;
  color: var(--teal);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  text-shadow: 0 0 30px rgba(29,228,212,0.25);
  text-align: center;
}

.demo-desc {
  font-family: 'Cormorant Garamond', serif;
  color: var(--muted);
  font-size: 18px;
  font-style: italic;
  margin-bottom: 36px;
  line-height: 1.5;
  text-align: center;
}

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

.demo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.demo-input,
.demo-textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 14px 22px;
  border-radius: 16px;
  border: 1px solid rgba(29,228,212,0.25);
  background: rgba(4,7,13,0.7);
  color: var(--text);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  cursor: text !important;
  width: 100%;
}

.demo-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.demo-input::placeholder,
.demo-textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.demo-input:focus,
.demo-textarea:focus {
  border-color: rgba(29,228,212,0.6);
  box-shadow: 0 0 24px rgba(29,228,212,0.12), inset 0 0 12px rgba(29,228,212,0.04);
}

/* File drop zone */
.demo-file-drop {
  position: relative;
  border: 2px dashed rgba(29,228,212,0.25);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
  cursor: pointer !important;
}

.demo-file-drop.dragover {
  border-color: var(--teal);
  background: rgba(29,228,212,0.04);
  box-shadow: 0 0 24px rgba(29,228,212,0.12);
}

.demo-file-drop.has-file {
  border-style: solid;
  border-color: rgba(29,228,212,0.35);
}

.demo-file-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 12px;
  color: var(--muted);
  opacity: 0.6;
}

.demo-file-drop.has-file .demo-file-icon {
  color: var(--teal);
  opacity: 1;
}

.demo-file-text {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.demo-file-hint {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  opacity: 0.5;
  margin-top: 8px;
}

.demo-file-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.demo-file-name {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--teal);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-file-size {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.demo-file-remove {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(200,121,65,0.15);
  border: 1px solid rgba(200,121,65,0.3);
  color: var(--copper-light);
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer !important;
  transition: background 0.3s, border-color 0.3s;
}

.demo-file-remove:hover {
  background: rgba(200,121,65,0.25);
  border-color: rgba(200,121,65,0.5);
}

.demo-file-input {
  display: none;
}

/* Progress bar */
.demo-progress-wrap {
  display: none;
  margin-top: 4px;
}

.demo-progress-wrap.active {
  display: block;
}

.demo-progress-bar {
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(74,112,128,0.2);
  overflow: hidden;
}

.demo-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--purple-light));
  border-radius: 2px;
  transition: width 0.2s ease;
}

.demo-progress-text {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--teal-dim);
  margin-top: 6px;
  text-align: right;
}

/* Submit button */
.demo-btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 16px 30px;
  border-radius: 28px;
  border: 1px solid rgba(29,228,212,0.35);
  background: linear-gradient(135deg, rgba(29,228,212,0.18), rgba(123,79,201,0.12));
  color: var(--teal);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  cursor: pointer !important;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, transform 0.2s, opacity 0.3s;
  margin-top: 8px;
  width: 100%;
}

.demo-btn:hover {
  background: linear-gradient(135deg, rgba(29,228,212,0.3), rgba(123,79,201,0.2));
  border-color: rgba(29,228,212,0.6);
  box-shadow: 0 0 28px rgba(29,228,212,0.18), 0 0 8px rgba(29,228,212,0.1);
  transform: translateY(-1px);
}

.demo-btn:active {
  transform: translateY(0);
}

.demo-btn-hidden {
  display: none !important;
}

.demo-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  transform: none;
}

.demo-btn:disabled:hover {
  background: linear-gradient(135deg, rgba(29,228,212,0.18), rgba(123,79,201,0.12));
  border-color: rgba(29,228,212,0.35);
  box-shadow: none;
  transform: none;
}

/* Status messages */
.demo-status {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  margin-top: 20px;
  min-height: 20px;
  letter-spacing: 0.05em;
  text-align: center;
}

.demo-status.success {
  color: var(--teal);
  text-shadow: 0 0 12px rgba(29,228,212,0.3);
}

.demo-status.error {
  color: var(--copper-light);
}

/* Field validation error */
.demo-field-error {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--copper-light);
  min-height: 0;
}

/* Nav demo link (on demo page — back to home) */
.nav-back-link {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 11px;
  color: var(--copper);
  text-shadow: none;
  transition: color 0.3s, text-shadow 0.3s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-back-link:hover {
  color: var(--copper-light);
  text-shadow: 0 0 12px rgba(232,160,96,0.4);
}

.nav-back-icon {
  width: 14px;
  height: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .demo-section {
    padding: 90px 20px 60px;
  }
  .demo-card {
    padding: 36px 28px 32px;
  }
  .demo-title {
    font-size: 19px;
  }
}

@media (max-width: 520px) {
  .demo-section {
    padding: 80px 16px 40px;
  }
  .demo-card {
    padding: 28px 20px 24px;
    border-radius: 18px;
  }
  .demo-file-info {
    flex-direction: column;
    gap: 6px;
  }
}
