:root {
  --bg: #111;
  --text: #eee;
  --muted: #aaa;
  --card: #1f1f1f;
  --border: #333;
  --accent: #00ffcc;
  --accent-hover: #00e6b3;
  --transition: all .3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font: 16px/1.6 Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  display: flex;
  max-width: 1000px;
  margin: 40px auto;
  gap: 20px;
  padding: 0 20px;
}

.main {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.post-header img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 20px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 20px;
}

.meta i {
  margin-right: 6px;
}

.post-title {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.post-content {
  margin-bottom: 30px;
}

.post-content p {
  margin-bottom: 1rem;
  color: var(--text);
}

.post-tags {
  margin-bottom: 15px;
}

.post-tags span {
  font-weight: bold;
  margin-right: 10px;
}

.post-tags a {
  margin-right: 8px;
  color: var(--muted);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 40px;
}

.share-buttons span {
  font-weight: bold;
  margin-right: 8px;
  color: var(--text);
}

.share-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  transition: var(--transition);
}

.share-buttons a:hover {
  transform: translateY(-2px);
}

.share-buttons a.fb { background: #3b5998; }
.share-buttons a.twitter { background: #1da1f2; }
.share-buttons a.linkedin { background: #0077b5; }
.share-buttons a.reddit { background: #ff4500; }
.share-buttons a.pinterest { background: #bd081c; }
.share-buttons a.whatsapp { background: #25d366; }
.share-buttons a.telegram { background: #0088cc; }
.share-buttons a.mail { background: var(--border); color: var(--text); }

.share-buttons i {
  font-size: 1rem;
  line-height: 1;
}

.comment-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 40px;
}

.comment-form h4 {
  color: var(--accent);
  margin-bottom: 15px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 15px;
}

.comment-form button {
  padding: 10px 20px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  cursor: pointer;
}

.comment-form button:hover {
  background: var(--accent-hover);
}

.comments-section {
  margin-bottom: 40px;
}

.comments-section h2 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.comment-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.author-meta strong {
  color: var(--accent);
}

.author-meta span {
  color: var(--muted);
  font-size: .85rem;
}

.comment-card p {
  margin-bottom: 16px;
  color: var(--text);
}

.comment-date {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.widget h4 {
  margin-bottom: 15px;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.widget img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
}

.categories a {
  flex: 1;
  color: var(--text);
}

.categories span {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tags a {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .85rem;
  color: var(--text);
}

.search-form {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.search-form input {
  flex: 1;
  padding: 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
}

.search-form button {
  padding: 0 10px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: var(--transition);
}

.search-form button:hover {
  background: var(--accent-hover);
}

.avatar-icon {
  font-size: 48px;
  color: var(--muted);
}

.up-to-top {
  position: fixed;
  right: 20px;
  bottom: 40px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 100;
}

.up-to-top:hover {
  background: var(--accent-hover);
}

.widget.subscribe-widget {}

.subscribe-description {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.4;
}

.subscribe-form {
  display: flex;
  width: 100%;
  gap: 6px;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px 0 0 4px;
  background: var(--bg);
  color: var(--text);
  font-size: .95rem;
  box-sizing: border-box;
}

.subscribe-form button {
  flex: 0 0 auto;
  padding: 0 12px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: var(--transition);
  font-size: .95rem;
}

.subscribe-form button:hover {
  background: var(--accent-hover);
}

.flash {
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-weight: bold;
}

.flash-success {
  background: rgba(46,204,113,.15);
  border: 1px solid #2ecc71;
  color: #2ecc71;
}

.flash-error {
  background: rgba(231,76,60,.15);
  border: 1px solid #e74c3c;
  color: #e74c3c;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    padding: 0 16px;
    gap: 16px;
  }

  .main {
    order: 1;
  }

  .sidebar {
    order: 2;
    width: 100%;
    margin-top: 24px;
  }

  .post-header img {
    margin-bottom: 16px;
  }

  .meta {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    font-size: .85rem;
  }

  .post-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 16px;
  }

  .post-content p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }

  .post-tags {
    text-align: center;
    margin-bottom: 20px;
  }

  .share-buttons {
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
  }

  .comment-form {
    padding: 16px;
  }

  .comment-form h4 {
    text-align: center;
  }

  .comment-form input,
  .comment-form textarea {
    padding: 8px;
  }

  .comment-form button {
    width: 100%;
    padding: 12px;
  }

  .comments-section h2 {
    text-align: center;
    margin-bottom: 16px;
  }

  .comment-card {
    padding: 16px;
  }

  .comment-author {
    justify-content: center;
  }

  .comment-author img {
    width: 40px;
    height: 40px;
  }

  .comment-date {
    justify-content: center;
    padding-top: 8px;
  }

  .widget {
    padding: 16px;
  }

  .widget ul li {
    flex-direction: column;
    align-items: flex-start;
  }

  .widget img {
    width: 100%;
    height: auto;
    margin-bottom: 8px;
  }

  .tags {
    justify-content: center;
  }

  .search-form input {
    padding: 6px;
    font-size: .9rem;
  }

  .search-form button {
    padding: 0 10px;
    font-size: .9rem;
  }

  .up-to-top {
    right: 16px;
    bottom: 24px;
  }
}

@media (max-width: 767px) {
  :root {
    font-size: 14px;
  }

  .container {
    padding: 0 12px;
    gap: 12px;
  }

  .post-title {
    font-size: 1.5rem;
  }

  .meta {
    font-size: .8rem;
  }

  .comment-form h4,
  .widget h4 {
    font-size: 1.2rem;
  }

  .flash {
    font-size: .9rem;
  }

  .share-buttons a {
    width: 32px;
    height: 32px;
  }
}
