body {
  background: #FFFFFF;
  font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
  text-align: center;
  min-width: 1000px;
  font-size: 16px;
}

#container {
  margin: 0 auto;
  padding: 0;
  border: 0;
  width: 1000px;
}

#header {
  margin: 0;
  width: 1000px;
  text-align: center;
}

#header img {
  max-width: 100%;
  height: auto;
}

a.btn {
  display: inline-block;
  border: 1px solid silver;
  padding: 8px 16px;
  color: #770000;
  background-color: #EEEEEE;
  text-decoration: none;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 16px;
  transition: background-color 0.2s, color 0.2s;
}

a.btn:hover {
  background-color: #770000;
  color: white;
}

/* Main content area with two columns */
.main-content {
  display: flex;
  border: 1px solid silver;
  border-bottom: none;
  align-items: stretch;
}

#left {
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 20px;
  box-sizing: border-box;
  border-right: 1px solid silver;
}

#leftmessage {
  width: 175px;
  height: 25px;
  margin: 0;
  position: absolute;
  overflow: hidden;
  top: 0;
  left: 0;
  border: 1px solid silver;
  border-top: none;
  color: gray;
  padding: 2px 0 0 0;
}

#leftmessage a.gray:link,
#leftmessage a.gray:active,
#leftmessage a.gray:hover,
#leftmessage a.gray:visited {
  color: gray;
  text-decoration: none;
}

#leftmessage img {
  margin: 0 0 -2px 0;
  border-width: 0;
}

#leftmessage p {
  margin: 0;
  text-align: right;
}

#leftpoll {
  width: 100%;
  margin: 20px 0;
  color: #555;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}


.ads-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

#uploads {
  width: 260px;
  flex-shrink: 0;
  text-align: center;
  position: relative;
  padding: 20px 10px;
  box-sizing: border-box;
  background: #FFFFCC;
}

#up {
  margin: 0;
}

p.upload {
  font-size: 15px;
  margin: 5px 0;
}

p.caption {
  color: #660033;
  font-size: 22px;
  font-weight: bold;
  font-style: italic;
  margin: 10px 0;
}

h3.upload {
  color: #77965A;
  font-size: 20px;
  margin: 0 0 10px 0;
}

p.error {
  margin: 0;
  white-space: nowrap;
  position: absolute;
  top: -5px;
  left: 150px;
  color: red;
}

/* Image container for centering */
.image-container {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
}

img.main {
  border: 2px solid silver;
  max-width: 600px;
  max-height: 600px;
  width: auto;
  height: auto;
}

#footer {
  width: 1000px;
  box-sizing: border-box;
  text-align: center;
  padding: 20px;
  border-top: 1px solid silver;
}

.footer-cat-number {
  color: gray;
  font-size: 14px;
  margin-bottom: 15px;
}

.footer-blurb {
  text-align: left;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 15px 0;
  color: #555;
}

.footer-copyright {
  text-align: left;
  font-size: 14px;
  color: #888;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

/* Poll UI Styles */
.poll-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.poll-label {
  font-size: 18px;
  font-weight: bold;
  color: #660033;
}

.poll-buttons {
  display: flex;
  gap: 8px;
  justify-content: center;
  width: 100%;
}

.poll-btn {
  width: 52px;
  flex-shrink: 0;
  height: 40px;
  border: 2px solid #ccc;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #555;
  transition: all 0.2s;
}

.poll-btn:hover {
  background: #77965A;
  border-color: #77965A;
  color: white;
}

.poll-btn.selected {
  background: #770000;
  border-color: #770000;
  color: white;
}

.poll-scale {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  color: #888;
  padding: 0 5px;
}

.poll-submit {
  padding: 10px 24px;
  background: #77965A;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s;
}

.poll-submit:hover {
  background: #5a7a45;
}

.poll-avg {
  font-size: 15px;
  color: #666;
}

.poll-result {
  width: 100%;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-sizing: border-box;
}

.poll-result-label {
  font-size: 18px;
  font-weight: bold;
  color: #660033;
  margin-bottom: 12px;
  text-align: center;
}

.poll-result-bar {
  position: relative;
  height: 40px;
  background: #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.poll-result-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(to right, rgba(119, 0, 0, 0.3), rgba(119, 0, 0, 1));
  border-radius: 6px;
  transition: width 0.3s ease;
}

.poll-result-value {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: bold;
  color: #770000;
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 10px;
  border-radius: 4px;
}

.poll-result-scale {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #888;
  margin-top: 5px;
  padding: 0 5px;
}

.poll-result-votes {
  text-align: center;
  margin-top: 12px;
  font-size: 15px;
  color: #666;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 450px;
  margin: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #770000;
  margin-bottom: 15px;
}

.modal-text {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 25px;
}

.modal-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s;
}

.modal-btn-agree {
  background: #77965A;
  color: white;
}

.modal-btn-agree:hover {
  background: #5a7a45;
}

.modal-btn-cancel {
  background: #ddd;
  color: #555;
}

.modal-btn-cancel:hover {
  background: #ccc;
}

/* Upload form improvements */
#up input[type="file"] {
  display: none;
}

.file-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #77965A;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin: 10px 0;
  transition: background 0.2s;
}

.file-btn:hover {
  background: #5a7a45;
}

.file-name {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
  word-break: break-all;
  padding: 0 10px;
}

#up input[type="text"] {
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 200px;
  margin: 10px 0;
}

#up input[type="submit"] {
  padding: 10px 20px;
  background: #77965A;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  transition: background 0.2s;
}

#up input[type="submit"]:hover {
  background: #5a7a45;
}

#upload-preview {
  margin-top: 15px;
}

#upload-preview img {
  border: 2px solid silver;
  border-radius: 4px;
}
