:root {
  --bg-color: #0a0a0a;
  --surface-color: #1a1a1a;
  --ui-accent: #ffffff;
  --danger-color: #ff3b30;
  --success-color: #4cd964;
  --timer-color: #ffcc00;
  --text-main: #eeeeee;
  --text-dim: #aaaaaa;
}

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

body,
html {
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  overflow: hidden;
}

#landing-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.landing-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-color);
  padding: 32px 24px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.event-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ui-accent);
}

.event-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.launch-warning,
.status-message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.launch-warning {
  background: rgba(255, 204, 0, 0.12);
  border: 1px solid rgba(255, 204, 0, 0.32);
  color: #ffe082;
}

.status-message {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
}

.status-message.success,
.camera-status.success {
  background: rgba(76, 217, 100, 0.16);
  border-color: rgba(76, 217, 100, 0.38);
  color: #b8ffcb;
}

.status-message.error,
.camera-status.error {
  background: rgba(255, 59, 48, 0.16);
  border-color: rgba(255, 59, 48, 0.38);
  color: #ffb4ae;
}

.status-message.warning,
.camera-status.warning {
  background: rgba(255, 204, 0, 0.16);
  border-color: rgba(255, 204, 0, 0.34);
  color: #ffe082;
}

.status-message.info,
.camera-status.info {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

.input-section {
  text-align: left;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  background: #252525;
  border: 1px solid #333;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--ui-accent);
}

select.input-field {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M0 4l6 6 6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin-bottom: 32px;
}

.radio-option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #252525;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.radio-option.status-accepted {
  border-color: var(--success-color);
  background: rgba(76, 217, 100, 0.1);
}

.radio-option.status-denied {
  border-color: var(--danger-color);
  color: var(--danger-color);
  background: rgba(255, 59, 48, 0.1);
}

.radio-option input {
  margin-right: 16px;
  width: 20px;
  height: 20px;
  accent-color: var(--ui-accent);
}

.radio-option label {
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  flex: 1;
}

#start-btn {
  width: 100%;
  padding: 16px;
  background: var(--success-color);
  color: black;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  display: none;
}

.terms-link {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: underline;
  cursor: pointer;
}

#terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  flex-direction: column;
}

#terms-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 24px;
  color: #ccc;
  font-size: 13px;
  line-height: 1.6;
}

#terms-modal-content h2 {
  color: white;
  margin-top: 24px;
  margin-bottom: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid #333;
  padding-bottom: 5px;
}

#terms-modal-close {
  padding: 20px;
  background: var(--surface-color);
  text-align: center;
  color: var(--ui-accent);
  font-weight: 700;
  cursor: pointer;
}

#camera-view {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

#viewfinder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}

#viewfinder.is-flipped {
  transform: scaleX(-1);
}

.camera-status {
  position: absolute;
  top: 18px;
  left: 16px;
  right: 16px;
  z-index: 35;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  backdrop-filter: blur(10px);
}

#timer-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
  display: none;
  z-index: 31;
}

#timer-progress {
  height: 100%;
  width: 100%;
  background: var(--timer-color);
}

#controls-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  z-index: 30;
}

#bottom-ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
}

.mode-option {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: rgba(255, 255, 255, 0.4);
}

.mode-option svg {
  width: 28px;
  height: 28px;
  fill: none;
}

#camera-switch-btn svg {
  width: 34px;
  height: 34px;
}

.mode-option.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.shutter-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--ui-accent);
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shutter-btn::after {
  content: "";
  width: 50px;
  height: 50px;
  background-color: var(--ui-accent);
  border-radius: 50%;
  transition:
    transform 0.1s ease,
    border-radius 0.2s ease;
}

.shutter-btn.recording::after {
  background-color: var(--danger-color);
  border-radius: 8px;
  width: 28px;
  height: 28px;
}
