body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(to bottom, #1a1a1a, #121212);
  color: #f0f0f0;
  margin: 0;
  padding: 0;
}

/* Kontener posta */
.post-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin: 40px auto;
  padding: 20px;
  max-width: 1200px;
  background: #1a1a1a;
  border-radius: 10px;
  box-sizing: border-box;
}

/* Lewy sidebar */
.post-sidebar {
  width: 100%;
  max-width: 280px;
  background: #2b2b2b;
  padding: 20px;
  border-radius: 10px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 20px;
  overflow: hidden;
  text-align: center;
  flex-shrink: 0;
}

.user-info .avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 15px;
  border: 3px solid #ff6666;
  box-shadow: 0 4px 10px rgba(255, 102, 102, 0.3);
  transition: transform 0.3s ease;
}
.user-info .avatar:hover {
  transform: scale(1.05);
}

.username {
  font-size: 22px;
  font-weight: bold;
  background: linear-gradient(to right, #ff6666, #e04e4e);
  margin: 10px 0;
}

.reputation {
  font-size: 16px;
  color: #ccc;
  margin: 15px 0;
}

.reputation-button {
  background: linear-gradient(to right, #ff6666, #e04e4e);
  border: none;
  padding: 12px 25px;
  color: white;
  font-size: 16px;
  cursor: pointer;
  border-radius: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.reputation-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 102, 102, 0.4);
}

/* Główna treść posta */
.post-content {
  flex: 1;
  min-width: 300px;
  background: #222;
  border-radius: 10px;
  padding: 20px;
  overflow-wrap: break-word;
  box-sizing: border-box;
}

.post-title {
  font-size: 28px;
  color: #ff4c4c;
  margin-bottom: 25px;
  border-bottom: 2px solid #444;
  padding-bottom: 15px;
}

.post-body {
  line-height: 1.8;
  font-size: 16px;
  color: #e0e0e0;
  padding: 15px 0;
}

.edit-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 25px;
  padding: 12px 25px;
  background: linear-gradient(to right, #ff6666, #e04e4e);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.edit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 102, 102, 0.4);
}

/* Pasek nad postem */
.post-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 30px auto 0;
  padding: 15px 30px;
  background: #1e1e1e;
  border-bottom: 2px solid #333;
  border-radius: 8px 8px 0 0;
  max-width: 1100px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.post-page-title {
  font-size: 24px;
  color: #ff4c4c;
  margin: 0;
}

.viewers-btn {
  background: #444;
  border: none;
  padding: 10px 20px;
  color: white;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.viewers-btn:hover {
  background: #c43030;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #222;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  color: #fff;
  box-shadow: 0 0 10px #000;
}

.modal-content h3 {
  margin-top: 0;
  color: #ff4c4c;
  font-size: 20px;
}

.viewers-list {
  list-style: none;
  padding: 0;
  margin-top: 15px;
}

.viewers-list li {
  margin-bottom: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.close {
  float: right;
  font-size: 22px;
  color: #aaa;
  cursor: pointer;
}

/* BBCode / cytaty / iframe */
.bbcode-code {
  background: #1e1e1e;
  color: #e0e0e0;
  padding: 15px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  margin: 15px 0;
}

.mention {
  color: #ff4c4c;
  font-weight: bold;
  text-decoration: none;
  background-color: rgba(255, 76, 76, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.mention:hover {
  background-color: rgba(255, 76, 76, 0.25);
  text-decoration: underline;
}

/* Formularz odpowiedzi */
.add-subpost-reply {
  max-width: 1100px;
  margin: 40px auto;
  padding: 20px;
  background: #2b2b2b;
  border-radius: 10px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.add-subpost-reply textarea {
  width: 100%;
  min-height: 80px;
  border: none;
  border-radius: 8px;
  padding: 10px;
  background: #1e1e1e;
  color: #fff;
  font-family: monospace;
  font-size: 15px;
  margin-bottom: 15px;
  resize: vertical;
}

.add-subpost-reply button {
  background: #ff4c4c;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.add-subpost-reply button:hover {
  background: #e03b3b;
}

/* RWD */
@media (max-width: 1024px) {
  .post-container {
    flex-direction: column;
    align-items: stretch;
    margin: 20px;
  }

  .post-sidebar {
    width: 100%;
    max-width: none;
    position: static;
    margin-bottom: 20px;
    box-sizing: border-box;
  }

  .post-content {
    width: 100%;
    box-sizing: border-box;
  }
}


@media (max-width: 600px) {
  .post-header-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .post-page-title {
    font-size: 20px;
  }

  .viewers-btn {
    margin-top: 10px;
    padding: 8px 16px;
  }
}

.post-sidebar, .subpost-sidebar {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #444;
    width: 240px;
}

.user-stats {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    font-size: 14px;
    color: #ccc;
}

.user-stats li {
    margin: 4px 0;
}

.user-socials i {
    font-size: 20px;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.user-socials a:hover i {
    transform: scale(1.2);
}

.post-sidebar .avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 2px solid #555;
    object-fit: cover;
    margin-bottom: 15px;
}

.post-sidebar .username a {
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
}

.user-details {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    font-size: 14px;
}

.user-details li {
    margin-bottom: 4px;
}

.user-socials {
    margin-top: 10px;
    gap: 8px;
    align-items: center;
}

.user-socials a {
    color: var(--accent);
    font-size: 20px;
    transition: color 0.2s ease;
  align-items: center;
}

.user-socials a:hover {
    color: var(--accent-hover);
}

.post-meta, .subpost-meta {
    margin-top: 5px;
    font-size: 0.85em;
    color: #777;
    font-style: italic;
}

.post-meta em, .subpost-meta em {
    color: #555;
}

.post-meta small, .subpost-meta small {
    display: block;
    padding: 2px 0;
}

.post-meta, .subpost-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-buttons a {
    display: inline-block;
    margin-left: 5px;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
}

.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-green { background-color: var(--accent);; }
.btn-red { background-color: var(--accent); }
.btn-blue { background-color: var(--accent); }
.btn-orange { background-color: var(--accent); }

.admin-buttons a:hover {
    opacity: 0.85;
}

button.btn {
  border: none;
  outline: none;
  background-clip: padding-box;
}

/* do szablonów */
.topic-closed-banner {
    background-color: #313131a4;
    border: 1px solid #444;
    padding: 15px;
    border-radius: 8px;
    color: #b22222;
    font-weight: bold;
    font-size: 1.1em;
}