.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 80px;
  transition: width 0.3s ease;
  z-index: 100;
  background-color: white;
  border-right: 1px solid var(--line-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
}

.sidebar:hover {
  width: 245px;
}

.sidebar a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  width: 100%;
}
.sidebar button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  outline: none;
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  text-decoration: none;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.logo {
  padding: 12px;
  margin: 2px 0px;
  flex-shrink: 0;
}

.logo svg {
  width: 32px;
  height: 32px;
  fill: var(--text-color);
  display: block;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
}

.nav-menu > li {
  display: flex;
  align-items: center;
  margin: 2px 0px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.nav-menu > li:hover {
  background-color: var(--search-bg-color);
}

.nav-menu > li > a,
.nav-menu > li > button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  width: 100%;
}

.nav-menu > li svg,
.nav-menu > li img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  fill: var(--text-color);
  border-radius: 50%;
  object-fit: cover;
}

.nav-menu span {
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
  color: var(--text-color);
}

.sidebar:hover .nav-menu span,
.sidebar:hover .sidebar-bottom span {
  opacity: 1;
}

.post-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-color);
}

.sidebar-bottom {
  margin: 2px 0px;
  flex-shrink: 0;
}

.sidebar-bottom:hover {
  border-radius: 8px;
  background-color: var(--search-bg-color);
}
.sidebar-bottom > button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  white-space: nowrap;
}
.sidebar-bottom svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  fill: var(--text-color);
}

.sidebar-bottom span {
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
  color: var(--text-color);
}

.bottom-nav {
  display: none;
}
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--base-color);
    border-top: 1px solid var(--line-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    padding: 0 8px;
  }

  .bottom-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
  }

  .bottom-nav-item svg {
    width: 26px;
    height: 26px;
    fill: var(--text-color);
  }

  .bottom-nav-item img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
  }
}

.hidden {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.create-post {
  background-color: var(--base-color);
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  min-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.new-post-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-color);
  width: 100%;
}

.close-btn,
.back-btn {
  grid-column: 1;
  justify-self: start;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--text-color);
}

.close-btn:hover,
.back-btn:hover {
  opacity: 0.7;
}

.header-text {
  grid-column: 2;
  justify-self: center;
  font-size: 16px;
  font-weight: 600;
}

.next-btn,
.publish-btn {
  grid-column: 3;
  justify-self: end;
  background: none;
  border: none;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.next-btn[data-disabled="true"] {
  opacity: 0.3;
  cursor: default;
}

.publish-btn:hover {
  opacity: 0.7;
}

.post-image-area {
  width: 100%;
  background-color: var(--line-color);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.post-image-area #image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  color: var(--text-color);
  opacity: 0.5;
}

.upload-label span {
  font-size: 14px;
}

.step2-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
}

.step2-body #image-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.step2-body textarea {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-color);
  resize: none;
  outline: none;
  min-height: 100px;
  line-height: 1.5;
}

.sidebar-collapsed {
  display: none;
}

.search-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 100vh;
  background-color: white;
  border-right: 1px solid var(--line-color);
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  z-index: 101;
  transform: translateX(-110%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.search-panel.open {
  transform: translateX(0);
}

.search-panel-header {
  position: relative;
  padding: 24px 20px 20px;
}

.search-panel-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  text-align: left;
}

.search-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--secondary-text-color);
  padding: 4px 8px;
  border-radius: 50%;
  transition: background-color 0.15s ease;
}

.search-wrapper {
  padding: 0 16px;
  position: relative;
  display: flex;
  justify-content: space-between;
}

.search-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  border: none;
  border-radius: 25px;
  background-color: var(--search-bg-color);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-color);
  outline: none;
  box-sizing: border-box;
}

.input-close-btn {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--line-color);
  color: var(--base-color);
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  display: grid;
  place-items: center;
  opacity: 0.75;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
}
.input-close-btn:hover {
  opacity: 0.6;
}
.search-input::placeholder {
  color: var(--hover-text-color);
}

.search-results {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
}

.search-result-card {
  display: block;
  text-decoration: none;
  color: var(--text-color);
  padding: 0 12px;
}

.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.result-card:hover {
  background-color: var(--hover-bg-color);
}

.result-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.result-info img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.result-info span {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-close-btn {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--secondary-text-color);
  cursor: pointer;
  padding: 4px 8px;
  flex-shrink: 0;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.result-close-btn:hover {
  transform: scale(1.1);
}

.search-no-result {
  text-align: center;
  grid-column: 1 / -1;
  color: var(--secondary-text-color);
  padding: 40px 20px;
  font-size: 14px;
}

.mobile-top-nav {
  display: none;
}

@media (max-width: 768px) {
  body:has(.mobile-top-nav) {
    padding-top: 50px;
  }
  .create-post {
    width: 90%;
  }

  .mobile-top-nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background-color: var(--base-color);
    border-bottom: 1px solid var(--line-color);
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    z-index: 100;
  }

  .mobile-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .mobile-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--text-color);
  }

  .mobile-search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--gray-100);
    border-radius: 12px;
    padding: 0 10px;
    height: 36px;
  }

  .mobile-search-wrapper > svg {
    width: 18px;
    height: 18px;
    fill: var(--secondary-text-color);
    flex-shrink: 0;
  }

  .mobile-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    padding: 0 8px;
    font-size: 14px;
    color: var(--text-color);
    font-family: inherit;
  }

  .mobile-search-input::placeholder {
    color: var(--secondary-text-color);
  }

  .mobile-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--base-color);
    max-height: 60vh;
    overflow-y: auto;
    z-index: 101;
    padding-top: 12px;
  }

  .mobile-search-results:empty {
    display: none;
  }
}
