/* PitSponsor Study - Mobile-First Industrial Theme */
:root {
  --bg-primary: #0d0f12;
  --bg-secondary: #171a21;
  --bg-card: #20242d;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-blue: #3b82f6;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border-color: #2d3340;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

header {
  padding: 12px 20px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-badge .dst-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.brand-badge .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-badge .company-title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

.brand-badge .project-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-badge .tag {
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-left: 16px;
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  width: 100%;
}

.study-container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Card layout for instructions & intro */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 24px;
  width: 100%;
  max-width: 640px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.card h1 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: #fff;
}

.card p {
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.rule-box {
  background: var(--bg-card);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  border-radius: 0 6px 6px 0;
  margin: 18px 0;
  font-size: 0.9rem;
  color: #d1d5db;
}

.rule-box ul {
  margin-left: 20px;
  margin-top: 8px;
}

.rule-box li {
  margin-bottom: 6px;
}

/* 16:9 Experiment Stage */
.stage-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.stage-viewport {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid #333a48;
}

.stage-16-9 {
  width: 1600px;
  height: 900px;
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* Fixation Cross */
.fixation-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fixation-cross::before,
.fixation-cross::after {
  content: "";
  position: absolute;
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.fixation-cross::before {
  width: 32px;
  height: 4px;
}

.fixation-cross::after {
  width: 4px;
  height: 32px;
}

/* Stimulus Logo */
.stimulus-logo {
  position: absolute;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Response Controls */
.response-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.input-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.study-input {
  flex: 1;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 1.15rem;
  color: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.study-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #374151;
  color: #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  background: #4b5563;
}

.btn-danger-outline {
  background: transparent;
  color: #f87171;
  border: 1px solid #7f1d1d;
}

.btn-danger-outline:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

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

/* Progress bar & Header */
.progress-panel {
  width: 100%;
  max-width: 600px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  margin-left: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.2s ease;
}

/* Helpers */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* Footer */
footer {
  padding: 16px 20px;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-content img {
  height: 22px;
  width: auto;
  opacity: 0.85;
}

/* Prize Drawing & Incentive Styles */
.prize-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 20px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
}

.prize-banner-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.prize-banner-content h4 {
  font-size: 0.98rem;
  color: var(--accent);
  margin-bottom: 2px;
}

.prize-banner-content p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.35;
}

.prize-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 24px;
  margin-top: 24px;
  text-align: left;
}

.prize-form-group {
  margin-bottom: 14px;
}

.prize-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.prize-form-input {
  width: 100%;
  padding: 10px 14px;
  background: #0d0f12;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.prize-form-input:focus {
  border-color: var(--accent);
}

.prize-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
  margin-top: 10px;
}

.prize-checkbox-label input {
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.prize-feedback {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  display: none;
}

.prize-feedback.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.prize-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

