/* Fonte moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
  --primary: #2563eb; /* Azul principal */
  --primary-dark: #1e40af;
  --secondary: #22c55e; /* Verde para sucesso */
  --danger: #ef4444; /* Vermelho para erro */
  --background: #f4f6fa;
  --surface: #fff;
  --text: #22223b;
  --text-light: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 2px 12px 0 rgba(30, 64, 175, 0.07);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: var(--background);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

main, .main-container, .center-container {
  position: relative;
  z-index: 1;
}

.card, .responses-container, .bg-white, .shadow, .rounded-lg, .p-6 {
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

.button, button, .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 1.5rem;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  margin: 0.5rem 0.5rem 0.5rem 0;
  outline: none;
}
.button:hover, button:hover, .btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px 0 rgba(37,99,235,0.15);
  transform: translateY(-1px) scale(1.03);
}
.button:active, button:active, .btn:active {
  background: var(--primary);
  transform: scale(0.98);
}

input, select, textarea {
  background: #f9fafb;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.responses-list, #responses-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: flex-start;
  align-items: flex-start;
}
.responses-list > div, #responses-container > div {
  background: #f3f4f6;
  border-radius: 1rem;
  box-shadow: 0 1px 4px 0 rgba(30, 64, 175, 0.06);
  padding: 1rem 1.5rem;
  min-width: 160px;
  max-width: 320px;
  margin: 0.5rem 0;
  color: var(--text);
  font-size: 1rem;
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, border 0.2s;
}
.responses-list > div:hover, #responses-container > div:hover {
  box-shadow: 0 4px 16px 0 rgba(37,99,235,0.13);
  border: 1.5px solid var(--primary);
}

.stats, .stats-container, #stats-container {
  background: #e0e7ff;
  color: var(--primary-dark);
  border-radius: 1.25rem;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 1px 4px 0 rgba(37,99,235,0.07);
  margin: 1rem auto 0 auto;
  text-align: center;
}

nav, header {
  background: #fff;
  box-shadow: 0 2px 8px 0 rgba(30, 64, 175, 0.07);
  border-bottom: 1.5px solid var(--border);
  padding: 1.2rem 0;
  margin-bottom: 2rem;
}
nav h1, header h1 {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 800;
}

.text-danger { color: var(--danger); }
.text-success { color: var(--secondary); }

.bg-success { background: var(--secondary); color: #fff; }
.bg-danger { background: var(--danger); color: #fff; }

::-webkit-scrollbar {
  width: 8px;
  background: #e5e7eb;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}

@media (max-width: 900px) {
  .card, .responses-container, .bg-white, .shadow, .rounded-lg, .p-6 {
    padding: 1rem;
  }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }
}
@media (max-width: 600px) {
  .card, .responses-container, .bg-white, .shadow, .rounded-lg, .p-6 {
    padding: 0.5rem;
    border-radius: 0.7rem;
  }
  .responses-list > div, #responses-container > div {
    min-width: 100px;
    max-width: 100%;
    padding: 0.7rem 1rem;
  }
}

/* --- Admin Layout --- */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: #0f172a;
  color: #fff;
  padding: 2rem 2.5rem 1.2rem 2.5rem;
  border-bottom: 2px solid #1e293b;
  box-shadow: 0 2px 8px 0 rgba(30, 64, 175, 0.07);
}
.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.session-title {
  font-size: 2.1rem;
  font-weight: 700;
  margin: 0;
  color: #e0e7ff;
}
.session-participants {
  font-size: 1.1rem;
  color: #a5b4fc;
  margin-top: 0.2rem;
}
.header-right {
  display: flex;
  align-items: center;
}

.admin-actions {
  display: flex;
  gap: 1rem;
  background: #1e293b;
  padding: 1.2rem 2.5rem;
  border-bottom: 1.5px solid #334155;
}
.admin-actions .button {
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.8rem;
  padding: 0.7rem 1.7rem;
  box-shadow: 0 2px 8px 0 rgba(37,99,235,0.10);
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
}
.admin-actions .button:hover {
  background: #1e40af;
}

.admin-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.admin-card {
  background: #1e293b;
  color: #e0e7ff;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px 0 rgba(30, 64, 175, 0.10);
  padding: 2.2rem 2rem 2rem 2rem;
  border: 1.5px solid #334155;
  min-height: 340px;
  display: flex;
  flex-direction: column;
}
.admin-card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #3b82f6;
}
.admin-card hr {
  border: none;
  border-top: 1.5px solid #334155;
  margin-bottom: 1.2rem;
}
.questions-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.question-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #273449;
  border-radius: 0.8rem;
  padding: 1.1rem 1.3rem;
  box-shadow: 0 1px 4px 0 rgba(30, 64, 175, 0.06);
  border: 1px solid #334155;
}
.question-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.question-type {
  font-size: 0.95rem;
  color: #a5b4fc;
  font-weight: 400;
}
.question-actions {
  display: flex;
  gap: 0.5rem;
}
.empty-state {
  color: #a5b4fc;
  font-size: 1.1rem;
  padding: 1.2rem 0.5rem;
  text-align: center;
}
.card-results #realtime-results {
  min-height: 120px;
  margin-bottom: 1.2rem;
}
.card-results .stats {
  background: #334155;
  color: #a5b4fc;
  border-radius: 0.8rem;
  font-size: 1rem;
  margin-top: auto;
  box-shadow: none;
  padding: 0.7rem 1.2rem;
}

.bg-success { background: #22c55e !important; color: #fff !important; }
.bg-danger { background: #ef4444 !important; color: #fff !important; }

@media (max-width: 1100px) {
  .admin-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1.2rem;
  }
}
@media (max-width: 700px) {
  .admin-header, .admin-actions {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem 1rem;
    gap: 0.7rem;
  }
  .admin-main-grid {
    padding: 0.5rem;
  }
  .admin-card {
    padding: 1.2rem 0.7rem 1rem 0.7rem;
  }
}

/* --- Modal Nova Pergunta --- */
#newQuestionModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 23, 36, 0.75);
  justify-content: center;
  align-items: center;
  animation: fadeInModal 0.2s;
}
#newQuestionModal.show {
  display: flex;
}
#newQuestionModal .modal-content, #newQuestionModal > div {
  background: #fff;
  color: #22223b;
  border-radius: 1.2rem;
  box-shadow: 0 8px 32px 0 rgba(30, 64, 175, 0.18);
  padding: 2.2rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 95vw;
  margin: 0 auto;
  position: relative;
}
#newQuestionModal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #2563eb;
}
#newQuestionModal label {
  color: #2563eb;
  font-weight: 600;
}
#newQuestionModal input, #newQuestionModal select, #newQuestionModal textarea {
  background: #f4f6fa;
  color: #22223b;
  border: 1px solid #e5e7eb;
  border-radius: 0.7rem;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}
#newQuestionModal button {
  margin-top: 0.5rem;
}
#newQuestionModal .flex.justify-end {
  gap: 0.7rem;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 600px) {
  #newQuestionModal .modal-content, #newQuestionModal > div {
    min-width: 0;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
}

/* --- Modal Compartilhar Sessão --- */
#shareModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 23, 36, 0.75);
  justify-content: center;
  align-items: center;
  animation: fadeInModal 0.2s;
}
#shareModal.show {
  display: flex;
}
#shareModal .modal-content, #shareModal > div {
  background: #fff;
  color: #22223b;
  border-radius: 1.2rem;
  box-shadow: 0 8px 32px 0 rgba(30, 64, 175, 0.18);
  padding: 2.2rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 95vw;
  margin: 0 auto;
  position: relative;
}
#shareModal h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: #2563eb;
}
#shareModal input[type="text"] {
  background: #f4f6fa;
  color: #22223b;
  border: 1px solid #e5e7eb;
  border-radius: 0.7rem;
  padding: 0.7rem 1.2rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}
#shareModal .copy-btn {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.6rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  margin-left: 0.7rem;
  cursor: pointer;
  transition: background 0.2s;
}
#shareModal .copy-btn:hover {
  background: #1e40af;
}
#shareModal .close-btn {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 0.7rem;
  padding: 0.6rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
#shareModal .close-btn:hover {
  background: #b91c1c;
}
#shareModal #qrcode {
  display: flex;
  justify-content: center;
  margin: 1.2rem 0 0.5rem 0;
}
@media (max-width: 600px) {
  #shareModal .modal-content, #shareModal > div {
    min-width: 0;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
}

/* --- Centralização para tela do participante --- */
.participant-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 90vh;
  width: 100%;
}
#question-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #22223b;
  border-radius: 1.2rem;
  box-shadow: 0 2px 12px 0 rgba(30, 64, 175, 0.10);
  padding: 2.2rem 2rem 2rem 2rem;
  min-width: 340px;
  max-width: 95vw;
  margin: 0 auto 2rem auto;
}
#question-container h2 {
  text-align: center;
  margin-bottom: 1.2rem;
}
#answer-form, #responses-container, #stats-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#responses-container {
  margin-top: 1.2rem;
}
#stats-container {
  margin-top: 1.2rem;
  color: #2563eb;
  font-weight: 600;
}
@media (max-width: 600px) {
  #question-container {
    min-width: 0;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
  }
}

/* --- Alinhamento do título e card do participante --- */
.participant-card-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
.participant-title-card, #question-container {
  width: 100%;
  box-sizing: border-box;
}
.participant-title-card {
  background: #fff;
  border-radius: 1.2rem 1.2rem 0 0;
  box-shadow: 0 2px 12px 0 rgba(30, 64, 175, 0.10);
  margin-bottom: 0;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1.5px solid #e5e7eb;
  position: relative;
  z-index: 2;
}
.participant-title-card h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #2563eb;
  margin: 0;
  text-align: center;
}
#question-container {
  border-radius: 0 0 1.2rem 1.2rem;
  margin-top: 0;
  position: relative;
  z-index: 1;
  box-shadow: 0 2px 12px 0 rgba(30, 64, 175, 0.10);
}
#answer-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
#answer-form input[type="text"], #answer-form textarea {
  width: 100%;
  max-width: 320px;
  margin-bottom: 0;
}
#answer-form button {
  width: 100%;
  max-width: 160px;
  margin: 1rem auto 0 auto;
  display: block;
}
#stats-container {
  margin-top: 1.2rem;
  color: #2563eb;
  font-weight: 600;
  background: #e0e7ff;
  border-radius: 0.8rem;
  padding: 0.7rem 0;
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
#stats-container span, #stats-container {
  display: inline;
}
@media (max-width: 600px) {
  .participant-card-group, .participant-title-card, #question-container {
    max-width: 98vw;
    min-width: 0;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }
}

/* Estilos do Letreiro */
.marquee-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 12px 0 8px 0;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    font-size: 1.3rem;
    font-weight: 600;
    animation: marquee 18s linear infinite;
    padding-left: 100vw;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100vw); }
}

/* Ajuste para o conteúdo principal não ficar escondido atrás do letreiro */
.center-container {
    padding-bottom: 60px !important;
}

/* Modal de Nova Sessão */
#newSessionModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

#newSessionModal.show {
    display: block;
}

#newSessionModal .modal-content {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 32rem;
    margin: 5rem auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#newSessionModal h3 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

#newSessionModal label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 500;
}

#newSessionModal input,
#newSessionModal select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

#newSessionModal input:focus,
#newSessionModal select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    outline: none;
}

#newSessionModal .flex.justify-end {
    margin-top: 1.5rem;
}

#newSessionModal button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s;
}

#newSessionModal button[type="button"] {
    background-color: #e5e7eb;
    color: #374151;
}

#newSessionModal button[type="submit"] {
    background-color: var(--primary);
    color: white;
}

#newSessionModal button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 640px) {
    #newSessionModal .modal-content {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
} 