body {
  margin: 0;
  display: flex;
  height: 100vh;
  font-family: sans-serif;
}

/* Left video pane */
#videoPane {
  flex: 2;
  background: #000;
  display: flex;
  flex-direction: column;
}
#videoContainer {
  flex: 1;
}
#controls {
  padding: 10px;
  background: #f3f3f3;
}

/* Right pane */
#rightPane {
  flex: 1;
  border-left: 1px solid #ccc;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Container for statements + timeline (scrollable) */
#contentPane {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Statements */
#statementsPane .statement {
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  font-weight: normal;
  transition: all 0.5s ease;
  overflow: hidden;
}
#statementsPane .statement.active {
  background: #fff;
  font-weight: bold;
  color: #000;
}
#statementsPane .statement.redacted {
  color: #666;
  line-height: 1.6;
}
#statementsPane .statement.voted {
  opacity: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* New animation states */
#statementsPane .statement.voting-agree {
  background: #c8f3c8 !important;
  color: #000 !important;
  transition: all 0.3s ease;
}

#statementsPane .statement.voting-disagree {
  background: #f3c8c8 !important;
  color: #000 !important;
  transition: all 0.3s ease;
}

#statementsPane .statement.voting-pass {
  background: #ddd !important;
  color: #000 !important;
  transition: all 0.3s ease;
}

#statementsPane .statement.fading-out {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.4s ease;
}

#statementsPane .statement.facing-out {
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.3s ease;
}

#statementsPane .statement.no-next {
  filter: blur(2px);
  transform: scale(0.8);
  opacity: 0.5;
  transition: all 0.5s ease;
}

/* Timeline */
#timelineWrapper {
  height: 40px;
  margin-top: 10px;
  margin-bottom: 10px;
  width: 100%;
}
#timelineCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Buttons fixed at bottom */
#buttons {
  margin-top: 10px;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
#buttons button {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
}

/* Collapsible sections */
#manageStatementsSection {
  margin-top: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
}

.section-toggle {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.section-toggle:hover {
  background-color: #e9ecef;
}

.toggle-icon {
  font-size: 16px;
  font-weight: bold;
  margin-right: 8px;
  transition: transform 0.2s ease;
  color: #007bff;
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 12px;
}

.collapsible-content.expanded {
  max-height: 400px;
  padding: 12px;
}

.section-toggle.expanded .toggle-icon {
  transform: rotate(45deg);
}

/* Add statement form */
#addStatementForm {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

#newStatementInput {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#newStatementInput:focus {
  outline: none;
  border-color: #007bff;
}

#addStatementBtn {
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

#addStatementBtn:hover {
  background-color: #0056b3;
}

#addStatementBtn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* Transcript section */
#transcriptSection {
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}

#transcriptSection h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

#transcriptTextarea {
  width: 100%;
  height: 200px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  resize: vertical;
  box-sizing: border-box;
  background-color: #f8f9fa;
  line-height: 1.4;
  white-space: pre-wrap;
}

#transcriptTextarea:focus {
  outline: none;
  border-color: #007bff;
}

/* Export content */
#exportContent {
  margin-top: 15px;
}

#exportBtn {
  width: 100%;
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
}

#exportBtn:hover {
  background-color: #218838;
}

#exportTextarea {
  width: 100%;
  height: 120px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 12px;
  font-family: monospace;
  resize: vertical;
  box-sizing: border-box;
}

#exportTextarea:focus {
  outline: none;
  border-color: #007bff;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 500px;
  animation: slideIn 0.3s ease;
}

.modal-content h2 {
  margin: 0 0 20px 0;
  color: #333;
  text-align: center;
}

.modal-content input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.modal-content input:focus {
  outline: none;
  border-color: #007bff;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.modal-buttons button[type="submit"] {
  background-color: #007bff;
  color: white;
}

.modal-buttons button[type="submit"]:hover {
  background-color: #0056b3;
}

.modal-buttons button[type="button"] {
  background-color: #6c757d;
  color: white;
}

.modal-buttons button[type="button"]:hover {
  background-color: #545b62;
}

/* Configure button */
.configure-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  z-index: 10;
}

.configure-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}