/* Mockup Notice Banner */
.mockup-notice {
  background: linear-gradient(to right, #930b0b, #da2020, #930b0b);
  color: #fff;
  text-align: center;
  padding: 12px 15px;
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 0.5px;
  border-bottom: 3px solid #ffcc00;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1000;
  animation: notice-pulse 2s infinite;
}

.mockup-notice-icon {
  margin-right: 8px;
  color: #ffcc00;
}

@keyframes notice-pulse {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Basic resets and global styles */
body {
  margin: 0;
  padding: 0;
  font-family: Verdana, Arial, sans-serif;
  background-color: #353535;
  color: #ccc;
  font-size: 12px;
}
a {
  color: #ccc;
  text-decoration: none;
}
a:hover {
  color: #ffc800;
}

/* Header */
.header {
  background: linear-gradient(to bottom, #ff0, #ffc800, #ff0000);
  text-align: center;
  padding: 20px 0;
  border-bottom: 3px solid #900;
}
.header-title {
  font-size: 34px;
  color: #fff;
  font-weight: bold;
  text-shadow: 2px 2px 2px #000;
  margin: 0;
  padding: 5px 0;
}
.header-subtitle {
  color: #fff;
  font-size: 14px;
  margin: 0;
  padding: 0;
}

/* Mobile Menu Toggle - Hidden by default on desktop */
.mobile-menu-toggle {
  display: none;
  background-color: #e50b0b;
  color: #fff;
  padding: 10px;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  position: relative;
  z-index: 100;
}
.mobile-menu-toggle .menu-icon {
  margin-right: 5px;
}

/* Main menu */
.main-menu {
  text-align: center;
  background-color: #e50b0b;
  padding: 8px 10px;
  font-size: 11px;
}
.main-menu a {
  color: #fff;
  margin: 0 5px;
  font-weight: bold;
  display: inline-block;
  padding: 3px 5px;
}

/* Layout: Three Columns */
.content {
  display: flex;
  margin: auto;
  max-width: 1200px;
  padding: 10px;
}

/* Sidebar (Left Column) */
.sidebar {
  width: 200px;
  background-color: #a00;
  padding: 5px;
  color: #fff;
  font-size: 11px;
}
.sidebar-header {
  background-color: #da2020;
  padding: 5px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 3px;
}
.arrow {
  margin-right: 3px;
  color: #ffcc00;
}
.sidebar-menu-item {
  background-color: #930b0b;
  padding: 3px 5px;
  margin-bottom: 2px;
  cursor: pointer;
}
.sidebar-menu-item:hover {
  background-color: #b31212;
}

/* Main Content (Center Column) */
.main-content {
  flex: 1;
  padding-left: 15px;
  font-size: 12px;
}
.page-title {
  color: #fff;
  font-size: 15px;
  margin-bottom: 15px;
  border-bottom: 1px dotted #666;
}

/* Right Subtitles Column */
.right-subtitles {
  width: 220px;
  background-color: #222;
  border: 1px solid #444;
  color: #ccc;
  font-size: 12px;
  margin-left: 10px;
  padding: 5px;
  border-radius: 4px;
}
.recent-subtitles-header {
  background-color: #da2020;
  padding: 5px;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 3px;
  color: #fff;
}
.subtitles-menu-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.subtitles-menu-list li {
  background-color: #333;
  border-bottom: 1px solid #444;
  padding: 3px 5px;
  font-size: 11px;
  color: #ccc;
  width: 100%;
  box-sizing: border-box;
}
.subtitles-menu-list li:hover {
  background-color: #444;
  cursor: pointer;
}

/* Forum posts */
.forum-post {
  background-color: #2D2D2D;
  margin-bottom: 15px;
  border: 1px solid #444;
  border-left: 4px solid #ffcc00;
  padding: 0;
}
.post-title {
  padding: 8px 10px;
  background-color: #333;
  border-bottom: 1px solid #444;
  font-size: 13px;
  font-weight: bold;
  color: #fff;
}
.post-date {
  font-size: 10px;
  color: #999;
  padding: 8px 10px;
}
.post-content {
  margin-top: 5px;
  font-size: 12px;
  line-height: 16px;
  padding: 8px 10px;
}

/* Post comment toggle */
.post-comments {
  background-color: #333;
  border-top: 1px solid #444;
  text-align: left;
  padding: 5px 10px;
  color: #ccc;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comment-sort-options {
  display: flex;
  flex-wrap: wrap;
  font-size: 10px;
}
.comment-sort-options span {
  cursor: pointer;
  margin-left: 8px;
  padding: 2px 5px;
}
.comment-sort-options span:hover,
.comment-sort-options span.active {
  background-color: #4a4a4a;
  border-radius: 3px;
}

/* Comment list & items */
.comment-list {
  display: none;
  margin-top: 0;
  padding: 0;
  background-color: #353535;
}
.comment-list.active {
  display: block;
}
.comment-page {
  display: none;
}
.comment-page.active {
  display: block;
}
.comment-item {
  border-top: 1px solid #444;
  background-color: #2A2A2A;
  position: relative;
  padding: 0;
  margin: 0;
}
.comment-item-content {
  padding: 8px 10px;
  color: #ccc;
  line-height: 1.4;
}
.comment-header {
  display: flex;
  align-items: center;
  background-color: #222;
  padding: 5px;
}
.author-avatar {
  width: 40px;
  height: 40px;
  background-color: #444;
  border: 1px solid #555;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 20px;
  margin-right: 10px;
}
.comment-author {
  color: #ffa500;
  font-weight: bold;
}
.comment-date {
  font-size: 10px;
  color: #777;
  margin-left: 10px;
}
.comment-item.pinned {
  background-color: #2A2A2A;
  border-left: none;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  margin-bottom: 0;
  border-top: 2px solid #ffc800;
}
.comment-item.pinned::before {
  content: "★";
  position: absolute;
  top: 8px;
  right: 8px;
  color: #ffc800;
  font-size: 16px;
  z-index: 1;
  text-shadow: 0 0 3px #000;
}
.comment-item.pinned > .comment-header {
  background-color: #4a4000;
  border-bottom: 1px solid #ffc800;
}
.comment-item.pinned > .comment-footer {
  background-color: #3a3300;
  border-top: 1px solid #ffc800;
}
.comment-item.pinned > .comment-header .comment-author {
  color: #ffc800;
}
.comment-item.pinned > .comment-item-content {
  border-left: none;
  background-color: rgba(255, 200, 0, 0.05);
}

/* Ensure replies to pinned comments have normal styling */
.comment-item.pinned .comment-reply-list .comment-item {
  background-color: #2A2A2A;
  border-left: none;
  border-top: 1px solid #444;
  border-bottom: none;
  box-shadow: none;
  margin-bottom: 0;
}
.comment-item.pinned .comment-reply-list .comment-item::before {
  content: none;
}
.comment-item.pinned .comment-reply-list .comment-header {
  background-color: #222;
  border-bottom: none;
}
.comment-item.pinned .comment-reply-list .comment-footer {
  background-color: #282828;
  border-top: 1px solid #333;
}
.comment-item.pinned .comment-reply-list .comment-author {
  color: #ffa500;
}
.comment-item.pinned .comment-reply-list .comment-item-content {
  border-left: none;
  background-color: transparent;
  padding-left: 10px;
}

/* Replies styling */
.comment-reply-list {
  padding-left: 20px;
  border-left: 1px dotted #444;
  margin-left: 20px;
}

/* Comment footer & voting */
.comment-footer {
  display: flex;
  justify-content: space-between;
  background-color: #282828;
  padding: 3px 10px;
  font-size: 10px;
  color: #777;
  border-top: 1px solid #333;
}
.comment-status {
  font-style: italic;
}
.comment-item.pinned .comment-status {
  color: #ffc800;
  font-weight: bold;
}
.comment-votes {
  display: flex;
  align-items: center;
}
.vote-btn {
  cursor: pointer;
  margin: 0 3px;
}
.vote-btn:hover {
  color: #ffc800;
}
.vote-count {
  margin: 0 5px;
  color: #999;
}
.vote-count.positive {
  color: #8cb366;
}
.vote-count.negative {
  color: #b36666;
}

/* Comment form */
.comment-form {
  margin-top: 10px;
  background-color: #2D2D2D;
  padding: 10px;
  border-top: 1px solid #444;
}
.comment-textarea {
  width: 100%;
  background-color: #444;
  color: #ccc;
  border: 1px solid #555;
  padding: 5px;
  min-height: 80px;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 5px;
}
.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.comment-form-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  font-size: 10px;
  color: #999;
  margin-bottom: 10px;
}
.comment-form-options label {
  margin-right: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.comment-form-options input {
  margin-right: 3px;
}
.comment-submit {
  background-color: #930b0b;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}
.comment-submit:hover {
  background-color: #b31212;
}

/* User badges */
.user-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 3px;
  border-radius: 2px;
  margin-left: 5px;
  vertical-align: middle;
}
.user-badge.admin {
  background-color: #a00;
  color: #fff;
}
.user-badge.mod {
  background-color: #0a74da;
  color: #fff;
}
.user-badge.vip {
  background-color: #b9a200;
  color: #fff;
}

.comment-actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 5px;
}

.comment-actions span {
  display: inline-block;
  padding: 5px 10px;
  margin-right: 5px;
  margin-bottom: 5px;
  background-color: #555;
  color: #fff;
  border: 1px solid #777;
  border-radius: 3px;
  cursor: pointer;
  font-size: 10px;
  transition: background-color 0.2s ease;
}
.comment-actions span:hover {
  background-color: #930b0b;
}

/* Search Box Styling */
.search-box {
  margin-top: 15px;
  padding: 10px;
  background-color: #444;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
}
.search-box input[type="text"] {
  width: calc(100% - 12px);
  padding: 5px;
  margin-top: 5px;
  margin-bottom: 5px;
  border: 1px solid #777;
  border-radius: 3px;
  background-color: #222;
  color: #ccc;
  box-sizing: border-box;
}
.search-box button {
  background-color: #930b0b;
  border: none;
  color: #fff;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  transition: background-color 0.2s ease;
}
.search-box button:hover {
  background-color: #b31212;
}

/* Right subtitles search box specific styling */
.right-subtitles .search-box {
  margin-top: 0;
  margin-bottom: 10px;
  background-color: #222;
  border: none;
  border-bottom: 1px solid #444;
  padding: 8px;
  font-weight: normal;
  border-radius: 0;
}
.right-subtitles .search-box input[type="text"] {
  margin-top: 0;
  margin-bottom: 6px;
  width: 100%;
  background-color: #333;
  border: 1px solid #555;
}
.right-subtitles .search-box button {
  width: 100%;
  margin-top: 2px;
  font-weight: bold;
}

/* Statistics Panel Styling */
.statistics {
  margin-top: 15px;
  padding: 10px;
  background-color: #222;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
  text-align: center;
}
.statistics div {
  margin-bottom: 5px;
}

/* Loading text animation */
.loading-text {
  animation: pulse 1.5s infinite;
  display: inline-block;
  color: #777;
}

@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Counter styles */
.counter-value {
  color: #ffcc00;
  font-weight: bold;
}

.counter-error {
  color: #ff6666;
  font-style: italic;
}

.subtitle-date {
  color: #777;
  font-size: 10px;
  margin-left: 5px;
}

/* Pagination */
.comment-pagination {
  display: flex;
  justify-content: center;
  margin: 5px 0;
  background-color: #282828;
  padding: 3px 0;
  flex-wrap: wrap;
}
.pagination-btn {
  background-color: #333;
  border: 1px solid #444;
  color: #ccc;
  padding: 2px 5px;
  margin: 3px;
  cursor: pointer;
  font-size: 10px;
  min-width: 30px;
  text-align: center;
}
.pagination-btn:hover,
.pagination-btn.active {
  background-color: #930b0b;
  color: #fff;
}
.pagination-info {
  font-size: 10px;
  color: #999;
  margin: 5px 10px;
  width: 100%;
  text-align: center;
}

.bottom-navigation {
  text-align: left;
  margin: 20px 0;
}

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

.modal-overlay.active {
  display: flex;
}

.modal-container {
  background-color: #2D2D2D;
  border: 1px solid #444;
  border-left: 4px solid #ffcc00;
  width: 90%;
  max-width: 400px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.modal-header {
  background-color: #333;
  padding: 8px 10px;
  border-bottom: 1px solid #444;
  color: #fff;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  color: #999;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
}

.modal-close:hover {
  color: #ffcc00;
}

.modal-body {
  padding: 15px;
  color: #ccc;
  line-height: 1.4;
}

.modal-footer {
  padding: 8px 10px;
  background-color: #282828;
  border-top: 1px solid #333;
  text-align: right;
}

.modal-button {
  background-color: #930b0b;
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  border-radius: 3px;
}

.modal-button:hover {
  background-color: #b31212;
}

/* Login form styles */
.login-form {
  background-color: #a00;
  padding: 5px;
  margin-bottom: 10px;
}
.login-header {
  background-color: #da2020;
  padding: 5px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin-bottom: 5px;
}
.login-field {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.login-field label {
  color: #fff;
  font-size: 11px;
  margin-right: 5px;
}
.login-field input[type="text"],
.login-field input[type="password"] {
  width: 130px;
  background-color: #fff;
  border: 1px solid #555;
  padding: 2px;
  font-size: 11px;
  box-sizing: border-box;
}
.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}
.checkbox-container input {
  margin-right: 5px;
}
.checkbox-container label {
  color: #fff;
  font-size: 11px;
}
.login-button {
  background-color: #930b0b;
  color: #fff;
  border: none;
  padding: 3px 8px;
  font-size: 11px;
  cursor: pointer;
  display: block;
  margin: 0 auto 5px auto;
}
.login-button:hover {
  background-color: #b31212;
}
.login-links {
  text-align: center;
  margin-top: 5px;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
  padding: 0 5px;
}
.login-links a {
  color: #fff;
  text-decoration: none;
}
.login-links a:hover {
  color: #ffc800;
}

/* Hide user panel by default */
.user-panel {
  display: none;
}

/* Report modal specific styles */
.report-reason {
  width: 100%;
  padding: 8px;
  margin: 10px 0;
  background-color: #333;
  color: #ccc;
  border: 1px solid #555;
  border-radius: 3px;
}

.report-description {
  width: 100%;
  min-height: 80px;
  padding: 8px;
  margin: 10px 0;
  background-color: #333;
  color: #ccc;
  border: 1px solid #555;
  border-radius: 3px;
  resize: vertical;
}

.reported-comment-preview {
  margin-top: 15px;
  padding: 10px;
  background-color: #222;
  border-left: 3px solid #da2020;
  color: #999;
  font-style: italic;
  max-height: 100px;
  overflow-y: auto;
}

.modal-button.cancel {
  background-color: #555;
  margin-right: 10px;
}

.modal-button.submit {
  background-color: #930b0b;
}

.modal-button.cancel:hover {
  background-color: #777;
}

/* Search Results Modal Styles */
#searchResultsModal .modal-container {
  max-width: 600px;
  width: 90%;
}

.search-results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.search-results-list li {
  background-color: #333;
  border-bottom: 1px solid #444;
  padding: 8px 10px;
  margin-bottom: 3px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-results-list li:hover {
  background-color: #444;
}

.search-result-title {
  color: #ffcc00;
  font-weight: bold;
  margin-bottom: 3px;
}

.search-result-meta {
  color: #999;
  font-size: 10px;
}

.search-no-results {
  text-align: center;
  color: #999;
  padding: 20px;
  font-style: italic;
}

/* Mobile styles - Improved */
@media (max-width: 768px) {
  /* Toggle mobile menu button */
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Change main menu to vertical dropdown */
  .main-menu {
    display: none;
    flex-direction: column;
    padding: 0;
  }
  
  .main-menu.active {
    display: flex;
  }
  
  .main-menu a {
    display: block;
    padding: 12px 15px;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    font-size: 14px;
  }
  
  .main-menu a:last-child {
    border-bottom: none;
  }
  
  /* Content layout */
  .content {
    flex-direction: column;
    padding: 5px;
  }

  .sidebar, 
  .right-subtitles, 
  .main-content {
    width: 100%;
    margin: 0;
    padding: 5px;
    box-sizing: border-box;
  }

  .sidebar {
    order: 2; /* Sidebar below main content */
    margin-top: 15px;
  }

  .main-content {
    order: 1; /* Main content first */
    padding-left: 0;
  }

  .right-subtitles {
    order: 3; /* Subtitles list at the bottom */
    margin-top: 15px;
  }

  .header-title {
    font-size: 28px;
  }

  .header-subtitle {
    font-size: 14px;
  }

  /* Forum post and comments */
  .forum-post, 
  .comment-form {
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Improve comment pagination */
  .comment-pagination {
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 0;
  }
  
  .pagination-info {
    order: -1;
    margin-bottom: 8px;
  }
  
  /* Improve sorting controls for mobile */
  .post-comments {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-comments-left {
    margin-bottom: 8px;
    width: 100%;
  }
  
  .comment-sort-options {
    width: 100%;
    justify-content: flex-start;
    margin-top: 5px;
  }
  
  .comment-sort-options span {
    margin: 0 5px 5px 0;
    padding: 5px 8px;
  }
  
  /* Improve comment form */
  .comment-form-footer {
    flex-direction: column;
    align-items: stretch;
  }
  
  .comment-form-options {
    margin-bottom: 10px;
    width: 100%;
  }
  
  .comment-submit {
    width: 100%;
    padding: 10px;
    font-size: 14px;
  }
  
  /* Improve comment actions */
  .comment-actions {
    margin-top: 8px;
    justify-content: space-between;
    width: 100%;
  }
  
  .comment-actions span {
    flex-grow: 1;
    text-align: center;
    margin-right: 5px;
    margin-bottom: 5px;
    padding: 8px 5px;
  }
  
  /* Login form improvements */
  .login-form {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
  }
  
  .login-field {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .login-field label {
    margin-bottom: 5px;
    font-size: 12px;
  }
  
  .login-field input[type="text"],
  .login-field input[type="password"] {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    box-sizing: border-box;
  }
  
  .login-button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    margin-top: 10px;
  }
  
  .login-links {
    flex-direction: column;
    align-items: center;
  }
  
  .login-links a {
    margin-bottom: 8px;
    font-size: 12px;
  }
  
  /* Modal improvements */
  .modal-container {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .modal-body {
    padding: 15px 10px;
  }
  
  .modal-footer {
    padding: 10px;
  }
  
  .modal-button,
  .modal-button.cancel,
  .modal-button.submit {
    padding: 12px 15px;
    font-size: 14px;
    min-width: 100px;
  }
}

/* Additional mobile improvements for smaller screens */
@media (max-width: 480px) { 
  body { 
    font-size: 14px; 
  } 
  
  .header-title {
    font-size: 24px;
  }
  
  .sidebar-header, 
  .sidebar-menu-item, 
  .recent-subtitles-header { 
    font-size: 14px; 
    padding: 10px 8px; 
  } 
  
  .comment-item-content, 
  .post-content { 
    font-size: 14px; 
    line-height: 1.5; 
    padding: 12px; 
  } 
  
  .sidebar-menu-item {
    padding: 12px 10px;
    margin-bottom: 5px;
  }
  
  /* Improve comment spacing */
  .comment-reply-list {
    padding-left: 10px;
    margin-left: 10px;
  }
  
  /* Improve avatar size */
  .author-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  /* Voting buttons bigger for touch */
  .vote-btn {
    font-size: 18px;
    padding: 5px 8px;
  }
  
  .vote-count {
    font-size: 14px;
  }
  
  /* Improve pagination - make buttons bigger */
  .pagination-btn {
    padding: 8px 12px;
    font-size: 14px;
    min-width: 40px;
  }
  
  /* Make modal buttons more accessible */
  .modal-button,
  .modal-button.cancel,
  .modal-button.submit {
    padding: 15px;
    font-size: 16px;
    min-width: auto;
    width: 45%;
  }
  
  .login-form {
    padding: 10px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .login-field { 
    margin-bottom: 10px;
    width: 100%;
  }
  
  .login-field input[type="text"], 
  .login-field input[type="password"] {
    padding: 10px;
    font-size: 16px; /* Larger text for better readability */
    width: 100%;
    height: 40px; /* Taller input for better touch targets */
  }
  
  .checkbox-container {
    margin: 10px 0;
  }
  
  .checkbox-container label {
    font-size: 14px;
  }
}