/* POLI - Hauptstyles */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --danger: #dc2626;
  --success: #16a34a;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}

.subtitle {
  color: var(--text-light);
  font-size: 1rem;
  margin-top: 5px;
}

.back-link {
  display: inline-block;
  color: var(--secondary);
  text-decoration: none;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--primary);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  color: var(--text-light);
  margin-bottom: 16px;
}

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

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary);
}

input[type="text"]::placeholder {
  color: #94a3b8;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #475569;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.divider span {
  padding: 0 16px;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Session Header */
.session-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.session-code-box {
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
}

.session-code-box .label {
  display: block;
  font-size: 0.75rem;
  opacity: 0.8;
}

.session-code-box .code {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 3px;
}

.session-question {
  font-style: italic;
  color: var(--text-light);
}

/* URL Box */
.url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--background);
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

/* Stats */
.stats {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}

.stat {
  flex: 1;
  text-align: center;
  padding: 16px;
  background: var(--background);
  border-radius: 8px;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Actions */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.actions .btn {
  flex: 1;
  min-width: 150px;
}

/* Sessions List */
.sessions-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.sessions-list-item:last-child {
  border-bottom: none;
}

.sessions-list-item .title {
  font-weight: 500;
}

.sessions-list-item .code {
  font-family: monospace;
  color: var(--primary);
  font-weight: 600;
}

/* Feedback */
.feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #dcfce7;
  color: var(--success);
  border-radius: 8px;
  margin-top: 16px;
}

.feedback .checkmark {
  font-size: 1.5rem;
}

/* Submitted Words */
.submitted-words {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.submitted-words h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

.submitted-words ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.submitted-words li {
  background: var(--background);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Error */
.error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 8px;
}

/* Loading */
.loading {
  text-align: center;
  color: var(--text-light);
  padding: 20px;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  header h1 {
    font-size: 2rem;
  }
  
  .session-header {
    flex-direction: column;
  }
  
  .stats {
    flex-direction: column;
  }
}

/* ============================================
   NEUE STYLES FÜR SICHTBARKEITS-OPTIONEN
   ============================================ */

/* Radio-Button Gruppe */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--background);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.radio-option:hover {
  background: #e2e8f0;
}

.radio-option input[type="radio"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.radio-label {
  display: flex;
  flex-direction: column;
}

.radio-label strong {
  color: var(--text);
  font-weight: 600;
}

.radio-label small {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* Sichtbarkeits-Info */
.visibility-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--background);
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.visibility-info .label {
  color: var(--text-light);
}

/* Hervorgehobene Frage für Teilnehmer */
.highlight-question {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  padding: 16px 20px;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 1.1rem;
  font-style: normal;
  color: var(--text);
  margin-bottom: 20px;
}

/* Teilnehmer Wortwolke Container */
#participant-cloud-container {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 8px;
  padding: 16px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#participant-cloud {
  width: 100%;
  height: 300px;
}

.cloud-hint {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 12px;
}

/* Card Titel h3 */
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text);
}

/* Badge für beendete Sessions */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #64748b;
  border-radius: 4px;
  margin-left: 8px;
}

.sessions-list-item.inactive {
  opacity: 0.6;
}

/* Inline Form (Session per Code laden) */
.inline-form {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.inline-form input {
  flex: 1;
}

/* Edit Section */
.edit-notice {
  background: #fef3c7;
  color: #92400e;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

#edit-form .form-group {
  margin-bottom: 12px;
}

#edit-form select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
}

/* Sessions List mit Actions */
.session-item-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-item-actions {
  display: flex;
  gap: 8px;
}

.sessions-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

/* Disabled Button */
.btn-disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.btn-disabled:hover {
  background: #e2e8f0 !important;
}
