* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #fefefe;
  color: #000;
}

a {
  text-decoration: none;
  color: #000;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  font-size: 24px;
  font-weight: bold;
}

header a {
  font-weight: normal;
}

header .searchbox {
  display: flex;
  align-items: center;
  background-color: #FFF;
  border: 1px solid #E5E5E5;
  border-radius: 40px 40px 40px 40px;
  padding: 4px 10px;
}

header input.search-input {
  outline: none;
  border: none;
  height: 24px;
  margin: 0;
}

header .profile-pic {
  width: 28px;
  height: 28px;
  background-color: #ddd;
  border-radius: 50%;
}

header a.header-right {
  display: flex;
  font-size: 16px;
}

header .header-text {
  flex: 1;
  padding: 4px;
}

h2 {
  font-size: 18px;
  font-weight: bold;
  padding: 0 16px;
  margin-top: 8px;
}

.channel-list {
  padding: 8px 16px 32px;
}

.channel {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: box-shadow 0.2s ease-in-out;
}

.channel:hover {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.03);
}


.channel img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-right: 12px;
  object-fit: cover;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-name {
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-meta {
  color: #666;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-list .add-button {
  background-color: #007aff;
  color: #fff;
  border: none;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.channel-list .add-button:hover {
  background-color: #0060d6;
}

.channel-list .visit-button {
  background-color: #f1f1f1;
  border: none;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}


@media (max-width: 480px) {
  .channel-name {
    font-size: 15px;
  }

  .channel-meta {
    font-size: 13px;
  }

  .channel img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
}

.profile-section {
  display: flex;
  align-items: center;
  padding: 16px;
}

.profile-section img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 12px;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}

.hidden {
  display: none;
}

.subscribed-btn {
  font-size: 12px;
  padding: 2px 8px;
  background-color: #f1f1f1;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-left: 6px;
  cursor: pointer;
}

.subscribe-btn {
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  background-color: #167ffc;
  border: 1px solid #fff;
  border-radius: 6px;
  margin-left: 6px;
  cursor: pointer;
}

.profile-meta {
  font-size: 13px;
  color: #555;
}

.tabs {
  display: flex;
  padding: 0 16px;
  margin-top: 12px;
  border-bottom: 1px solid #eee;
}

.tab {
  margin-right: 16px;
  padding: 8px 0;
  cursor: pointer;
}

.tab.active {
  font-weight: 500;
  border-bottom: 2px solid #000;
}

.plus-icon {
  margin-left: auto;
  font-size: 20px;
}

.plus-icon a {
  color: #454545;
}

.post-list {
  padding: 16px;
}

.post {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  position: relative;
}


.post-page .post {
  margin-bottom: 0px;
}

.post-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.post-actions, .comment-actions {
  position: absolute;
  top: 12px;
  right: 12px;
}

.more-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 30px;
  right: 0;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 6px 12px;
  z-index: 10;
}

.dropdown-menu .delete-btn, .dropdown-menu .delete-comment-btn {
  color: #d00;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.trash-icon {
  margin-right: 6px;
}

.post-content {
  font-size: 14px;
  color: #333;
  margin-bottom: 10px;
}

.post-image img {
  width: 100%;
  border-radius: 8px;
  margin: 10px 0;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 300px;
}

.post-page .post-image img {
  max-height: none;
}

.post-footer {
  font-size: 13px;
  color: #777;
}

.form-section {
  padding: 16px;
}

input[type="text"],input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
}

textarea {
  resize: vertical;
  height: 100px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.image-upload {
  display: flex;
  align-items: center;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
}

.image-upload span {
  font-size: 20px;
}

.publish-btn {
  margin-top: 16px;
  background-color: #111;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  float: right;
}

@media (max-width: 480px) {
  .profile-section img {
    width: 44px;
    height: 44px;
  }

  .profile-name {
    font-size: 15px;
  }

  .profile-meta {
    font-size: 12px;
  }

  .subscribed-btn {
    padding: 2px 6px;
    font-size: 11px;
  }

  .publish-btn {
    width: 100%;
    float: none;
  }
}


.post-box {
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px;
  margin: 16px;
}

.post-box h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.post-box p {
  font-size: 14px;
  margin-bottom: 12px;
  color: #333;
}

.post-meta {
  font-size: 13px;
  color: #666;
}

.comment-form {
  padding: 0 16px;
}

.need-login {
  padding: 36px;
}

.need-login a {
  font-weight: bold;
  color: #000;
  text-decoration: none;
}

.comment-form input[type="text"] {
  width: 100%;
  padding: 12px;
  margin: 12px 0;
  border: 1px solid #eee;
  border-radius: 10px;
  font-size: 14px;
}

.comment-form button {
  padding: 10px 20px;
  background: #111;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  float: right;
  cursor: pointer;
}

.comment-list {
  padding: 0 16px;
  margin-top: 36px;
}

.comment {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  position: relative;
}

.comment img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 12px;
  margin-top: 4px;
}

.comment .profile-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-right: 12px;
  margin-top: 4px;
  background: #ddd;
}

.comment-body {
  flex: 1;
}

.comment-user {
  font-weight: 600;
  font-size: 14px;
}

.comment-time {
  font-size: 12px;
  color: #777;
  margin-left: 6px;
}

.comment-text {
  margin: 4px 0 8px;
  font-size: 14px;
  color: #333;
}

.reply {
  font-size: 13px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
}

/* login & signup */
.login-container, .signup-container, .profile-container {
  max-width: 400px;
  margin: 0 auto;
}

h1 {
  margin-top: 32px;
  margin-bottom: 24px;
  font-size: 24px;
  padding: 0;
}

.login-container label, .signup-container label{
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.profile-container label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 500;
}

.profile-container .profile-pic {
  width: 120px;
  height: 120px;
  background-color: #ddd;
  border-radius: 50%;
  margin: 0 auto 24px;
}

.profile-container .profile-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.login-container button, .signup-container button, .profile-container button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  background-color: #1c1c1c;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 12px;
}

.profile-container .btn-logout {
  background-color: #c91414;
  color: #fff;
}

.login-container .footer, .signup-container .footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.login-container .footer a, .signup-container .footer a {
  font-weight: bold;
  color: #000;
  text-decoration: none;
}