.posts-grid {
  margin-bottom: 5rem;
}

.post-card {
  width: 100%;
  margin-bottom: 1rem;
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
  position: relative;
  box-sizing: border-box;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pinned-post {
  border: 2px solid #ffd700;
  background: linear-gradient(to bottom, #fffdf7 0%, #fff 100%);
}

@media (min-width: 600px) {
  .post-card {
    width: calc(50% - 12px);
    margin-bottom: 1.5rem;
  }
}
@media (min-width: 1200px) {
  .post-card {
    width: calc(33.333% - 11px);
  }
}
@media (min-width: 1600px) {
  .post-card {
    width: calc(25% - 12px);
  }
}
.post-author {
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.post-content {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.post-media {
  margin-top: 1rem;
  border-radius: 8px;
  overflow: hidden;
}
.post-media img, .post-media video {
  width: 100%;
  display: block;
  cursor: zoom-in;
}

.post-date {
  font-size: 0.85rem;
  color: #999;
  margin-top: 1rem;
}

.like-button {
  background: none;
  border: 2px solid #ddd;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
}
.like-button:hover, .like-button.liked {
  border-color: #ff4b7b;
  color: #ff4b7b;
}
.like-button.liked {
  background: #fff0f4;
}

.vote-button {
  width: 100%;
  min-height: 52px;
  border: 2px solid #0ea5a4;
  background: linear-gradient(180deg, #1fc9c7 0%, #0ea5a4 100%);
  color: #fff;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.vote-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.vote-button:disabled {
  cursor: not-allowed;
  opacity: 0.8;
  transform: none;
}
.vote-button .vote-count {
  min-width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 0.95rem;
}
.vote-button.voted {
  border-color: #2f6f2f;
  background: linear-gradient(180deg, #5cbc5c 0%, #2f9f45 100%);
}
.vote-button.vote-locked {
  border-color: #c7d2d9;
  background: #eef3f6;
  color: #4b5b66;
}

.comment-container {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.75rem;
}

.comment-toggle {
  cursor: pointer;
  font-weight: bold;
  color: #666;
  font-size: 0.9rem;
  transition: color 0.2s;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.comment-toggle:hover {
  color: #333;
}

.comment-section {
  margin-top: 0.75rem;
}

.comment-list {
  max-height: 250px;
  overflow-y: auto;
  padding: 5px;
  margin-bottom: 1rem;
  background: #fdfdfd;
  border-radius: 12px;
}

.comment {
  background: #f1f1f1;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  position: relative;
  word-wrap: break-word;
}
.comment.comment-owner {
  background: #fff9c4;
  border: 1px solid #fbc02d;
}

.comment-content {
  margin: 0;
  padding-right: 20px;
}

.comment-meta {
  margin-top: 0.25rem;
  text-align: right;
  font-size: 0.75rem;
  color: #999;
}

.comment-delete-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}
.comment-delete-btn:hover {
  color: #dc3545;
}

.no-comments {
  color: #999;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
}

.comment-form {
  display: flex;
  gap: 0.5rem;
}
.comment-form textarea {
  flex-grow: 1;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 0.5rem;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 40px;
}
.comment-form button {
  background: #ffcb2b;
  border: none;
  border-radius: 12px;
  padding: 0 1rem;
  font-weight: bold;
  cursor: pointer;
}

.comment-login-prompt {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 12px;
}
.comment-login-prompt p {
  margin: 0 0 0.5rem 0;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  float: right;
  cursor: pointer;
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 0.8;
  color: #aaa;
  transition: all 0.2s;
}
.modal-close:hover {
  color: #dc3545;
  transform: scale(1.1);
}

.add-post-button {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffcb2b 0%, #ffa500 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(255, 203, 43, 0.4);
  cursor: pointer;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  z-index: 100;
}
.add-post-button:hover {
  transform: scale(1.1);
}

.teacher-controls {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.teacher-controls button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem;
  border-radius: 4px;
  line-height: 1;
  transition: background 0.15s;
}
.teacher-controls button:hover {
  background: rgba(0, 0, 0, 0.08);
}

.post-card:hover .teacher-controls {
  opacity: 1;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.post-actions-vote {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}
.post-actions-vote .post-date {
  margin-top: 0;
}

.youtube-embed {
  margin-top: 1rem;
}

.yt-video {
  position: relative;
  cursor: pointer;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.yt-video::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.yt-video img,
.yt-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.yt-video img {
  -o-object-fit: cover;
     object-fit: cover;
}
.yt-video:hover .yt-play, .yt-video:focus-visible .yt-play {
  transform: translate(-50%, -50%) scale(1.06);
}
.yt-video:focus-visible {
  outline: 3px solid rgba(255, 203, 43, 0.85);
  outline-offset: 2px;
}

.yt-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 48px;
  background: #ff0000;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.yt-play::after {
  content: "";
  position: absolute;
  left: 27px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.canva-embed {
  margin-top: 1rem;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(63, 69, 81, 0.16);
}
.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.audio-controls {
  width: 100%;
}

.pdf-download-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #374151;
  transition: background 0.15s;
}
.pdf-download-link:hover {
  background: #f3f4f6;
}
.pdf-download-link span {
  flex: 1;
}
.pdf-download-link small {
  color: #9ca3af;
  font-size: 0.8rem;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover {
  color: #ffcb2b;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  color: #fff;
  font-size: 0.9rem;
  opacity: 0.8;
}

.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-group input[type=text],
.form-group input[type=password],
.form-group input[type=email],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: #1f2937;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input[type=text]:focus,
.form-group input[type=password]:focus,
.form-group input[type=email]:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.form-group textarea {
  resize: vertical;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: #1f2937;
}
.form-control:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }
}

.char-counter {
  display: block;
  text-align: right;
  margin-top: 0.25rem;
  font-size: 0.82rem;
  color: #9ca3af;
}

#dropZone {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
#dropZone:hover {
  border-color: #ffcb2b;
  background: #fffef5;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  line-height: 1.4;
}
.btn-primary {
  background: linear-gradient(135deg, #ffcb2b, #ffa500);
  color: #1f1f1f;
  border-color: #e09900;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffd84d, #ffb020);
  box-shadow: 0 2px 8px rgba(255, 165, 0, 0.35);
}
.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}
.btn-secondary:hover {
  background: #e5e7eb;
}
.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.87rem;
}
.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

.comment-admin-hint {
  font-size: 0.75rem;
  color: #dc3545;
  margin-left: 0.5rem;
}
.comment-admin-hint[title] {
  cursor: help;
}

@media (max-width: 768px) {
  .comment-form {
    flex-direction: column;
  }
  .comment-form button {
    width: 100%;
  }
  .form-row {
    flex-direction: column;
  }
}/*# sourceMappingURL=board-classic.css.map */