/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f4f7fa;
  color: #333;
  line-height: 1.6;
}

header {
  background-color: #1d3557;
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

header .button {
  position: absolute;
  right: 20px;
  top: 20px;
  background-color: #e63946;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}

header .button:hover {
  background-color: #d62828;
}

main {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.message-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  position: relative;
}

.message-card:hover {
  transform: scale(1.02);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 10px rgba(0,0,0,0.1);
}

textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  font-size: 1rem;
  margin-bottom: 20px;
}

button {
  background-color: #1d3557;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #457b9d;
}

footer {
  text-align: center;
  padding: 20px;
  background: #f1f1f1;
  margin-top: 40px;
}

.error {
  color: #e63946;
  margin-bottom: 15px;
  font-weight: bold;
}

.hidden {
  display: none;
}

/* Report form toggle */
.show-report-link {
  display: inline-block;
  margin-top: 10px;
  color: #e63946;
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline;
}

.show-report-link:hover {
  color: #c82333;
}

/* Report form styling */
.report-form {
  margin-top: 10px;
}

.report-form input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 8px;
}

.report-form button {
  background-color: #e63946;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.report-form button:hover {
  background-color: #c82333;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1d3557;
  color: white;
  padding: 15px 25px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: translateY(20px);
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Info Box */
.info-box {
  background-color: #e1f5fe;
  border-left: 6px solid #0288d1;
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  color: #0d47a1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Modal Overlay */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Hidden by default */
.hidden {
  display: none;
}

/* Modal Box */
.modal-content {
  background: #fff;
  padding: 30px;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  font-size: 0.95rem;
}

.modal-content h2 {
  margin-bottom: 15px;
  color: #1d3557;
}

.modal-content ul {
  list-style: disc inside;
  padding-left: 0;
}

.modal-content button {
  background-color: #1d3557;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #457b9d;
}

/* Responsive for small screens */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }

  .button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
  }

  .grid-container {
    grid-template-columns: 1fr !important;
  }

  .form-container,
  .message-card {
    padding: 15px;
  }

  textarea,
  input[type="text"] {
    font-size: 1rem;
  }

  .modal-content {
    width: 90%;
    font-size: 0.9rem;
  }
}

/* Poll */

/* Layout for main content and sidebar */
.main-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  padding: 20px;
}

/* Main content takes remaining space */
.main-content {
  flex: 1;
}

/* Poll Box */
.poll-box {
  flex: 0 0 280px;
  background: #f1faff;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  font-size: 0.95rem;
  position: sticky;
  top: 100px;
}

.poll-box h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: #0d47a1;
}

/* Responsive behavior for small screens */
@media (max-width: 768px) {
  .main-wrapper {
    flex-direction: column;
  }

  .poll-box {
    position: relative;
    top: auto;
    width: 100%;
    margin-top: 30px;
  }
}


/* Poll results */

.poll-results {
  margin-top: 20px;
}

.result-row {
  margin-bottom: 15px;
}

.result-row span {
  display: inline-block;
  vertical-align: middle;
}

.result-bar {
  background: #e0e0e0;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 5px;
}

.result-bar .fill {
  background: #2196f3;
  height: 100%;
  width: 0;
  transition: width 0.5s ease;
}
