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

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background-color: #000;
  color: #e7e9ea;
}

.container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 275px;
  padding: 0 12px;
  border-right: 1px solid #2f3336;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

.logo {
  padding: 12px;
  margin-bottom: 4px;
}

.logo svg {
  width: 30px;
  height: 30px;
  fill: #e7e9ea;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 4px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  color: #e7e9ea;
}

.nav-item:hover {
  background-color: #181818;
}

.nav-item svg {
  width: 26px;
  height: 26px;
  margin-right: 20px;
  fill: currentColor;
}

.nav-text {
  font-size: 20px;
  font-weight: 400;
}

.tweet-btn {
  background-color: white;
  color: black;
  border: none;
  border-radius: 9999px;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin: 16px 0;
  transition: background-color 0.2s;
}

.tweet-btn:hover {
  background-color: #1a8cd8;
}

.profile-info {
  margin-top: auto;
  margin-bottom: 1.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.profile-details {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.profile-text :nth-child(1) {
  font-weight: 700;
}

.profile-text :nth-child(2) {
  color: #484b4f;
  font-weight: 400;
  font-size: 15px;
}

/* Main Feed */
.main-feed {
  flex: 1;
  max-width: 600px;
  border-right: 1px solid #2f3336;
}

.feed-header {
  position: sticky;
  top: 0;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  padding: 16px;
  border-bottom: 1px solid #2f3336;
  font-size: 20px;
  font-weight: 700;
  z-index: 10;
}

/* Tweet Box */
.tweet-box {
  padding: 16px;
  border-bottom: 1px solid #2f3336;
  display: flex;
  gap: 12px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.tweet-input-container {
  flex: 1;
}

.tweet-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #e7e9ea;
  font-size: 20px;
  outline: none;
  resize: none;
  font-family: inherit;
  padding: 12px 0;
}

.tweet-input::placeholder {
  color: #71767b;
}

.tweet-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2f3336;
}

.tweet-icons {
  display: flex;
  gap: 4px;
}

.icon-btn {
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
  background: transparent;
  border: none;
}

.icon-btn:hover {
  background-color: rgba(29, 155, 240, 0.1);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: #1d9bf0;
}

.post-btn {
  background-color: #1d9bf0;
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}

.post-btn:hover {
  background-color: #1a8cd8;
}

/* Tweet */
.tweet {
  padding: 16px;
  border-bottom: 1px solid #2f3336;
  display: flex;
  gap: 12px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.tweet:hover {
  background-color: #080808;
}

.tweet-content {
  flex: 1;
}

.media-box {
  border: 1px solid #2f3336;
  border-radius: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
  z-index: 1;
}

.tweet-media img,
.tweet-media video {
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: -1;
}

.tweet-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.username {
  font-weight: 700;
  color: #e7e9ea;
}

.handle {
  color: #71767b;
}

.timestamp {
  color: #71767b;
}

.tweet-text {
  margin-bottom: 12px;
  line-height: 1.5;
}

.tweet-stats {
  display: flex;
  justify-content: space-between;
  max-width: 425px;
  margin-top: 12px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #71767b;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.stat svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.stat:hover {
  color: #1d9bf0;
}

.stat.like:hover {
  color: #f91880;
}

.stat.retweet:hover {
  color: #00ba7c;
}

/* Right Sidebar */
.right-sidebar {
  width: 350px;
  padding: 0 16px;
}

.search-box {
  position: sticky;
  top: 0;
  background-color: #000;
  padding: 4px 0 16px;
  z-index: 10;
}

.search-input {
  width: 100%;
  background-color: #000;
  border: 1px solid #202327;
  border-radius: 9999px;
  padding: 12px 16px;
  color: #e7e9ea;
  outline: none;
  font-size: 15px;
}

.search-input:focus {
  background-color: #000;
  border-color: #1d9bf0;
}

.search-input::placeholder {
  color: #71767b;
}

/* Search Results */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #000;
  border: 1px solid #202327;
  border-radius: 12px;
  margin-top: 8px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 20;
}

.search-results-header {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 15px;
  border-bottom: 1px solid #2f3336;
  color: #e7e9ea;
}

.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #2f3336;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-result-item:hover {
  background-color: #1c1f23;
}

.search-result-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d9bf0, #0d47a1);
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-weight: 700;
  color: #e7e9ea;
}

.search-result-handle {
  color: #71767b;
  font-size: 13px;
}

.search-result-text {
  color: #71767b;
  font-size: 13px;
  line-height: 1.3;
}

/* Profile Modal */
.profile-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.profile-modal-content {
  background-color: #000;
  border: 1px solid #2f3336;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-modal {
  position: absolute;
  top: 12px;
  left: 12px;
  background: transparent;
  border: none;
  color: #e7e9ea;
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
  z-index: 10;
}

.close-modal:hover {
  background-color: #1c1f23;
}

.profile-header {
  position: relative;
}

.profile-banner {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, #1d9bf0, #0d47a1);
}

.profile-info-section {
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: -30px;
  margin-bottom: 8px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #000;
}

.follow-btn {
  background-color: #1d9bf0;
  color: white;
  border: none;
  border-radius: 9999px;
  padding: 10px 24px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: background-color 0.2s;
  margin-top: 12px;
}

.follow-btn:hover {
  background-color: #1a8cd8;
}

.follow-btn.following {
  background-color: transparent;
  border: 1px solid #71767b;
  color: #e7e9ea;
}

.follow-btn.following:hover {
  background-color: rgba(244, 33, 128, 0.1);
  color: #f91880;
}

.profile-details-section {
  padding: 0 16px 16px;
}

.profile-name {
  font-weight: 700;
  font-size: 20px;
  color: #e7e9ea;
  margin-bottom: 4px;
}

.profile-handle {
  color: #71767b;
  font-size: 15px;
  margin-bottom: 8px;
}

.profile-bio {
  color: #e7e9ea;
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.profile-stats {
  display: flex;
  gap: 16px;
}

.stat-item {
  display: flex;
  gap: 4px;
}

.stat-number {
  font-weight: 700;
  color: #e7e9ea;
}

.stat-label {
  color: #71767b;
  font-size: 15px;
}

.profile-tweets-section {
  border-top: 1px solid #2f3336;
}

.profile-tweets-header {
  padding: 12px 16px;
  font-weight: 700;
  border-bottom: 1px solid #2f3336;
}

.profile-tweets-list {
  max-height: 300px;
  overflow-y: auto;
}

.profile-tweet-item {
  padding: 12px 16px;
  border-bottom: 1px solid #2f3336;
  font-size: 14px;
  color: #e7e9ea;
  line-height: 1.3;
}

.profile-tweet-item:hover {
  background-color: #1c1f23;
}

.trends-box {
  background-color: #000;
  border: 1px solid #202327;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.trends-header {
  padding: 16px;
  font-size: 20px;
  font-weight: 700;
}

.trend {
  padding: 12px 16px;
  transition: background-color 0.2s;
  cursor: pointer;
}

.trend:hover {
  background-color: #1c1f23;
}

.trend.active {
  background-color: #1d9bf0;
  border-left: 4px solid #1d9bf0;
}

.trend.active .trend-name {
  color: #fff;
}

.trend.active .trend-category,
.trend.active .trend-tweets {
  color: #b0d9ff;
}

.trend-category {
  color: #71767b;
  font-size: 13px;
}

.trend-name {
  font-weight: 700;
  margin: 4px 0;
}

.trend-tweets {
  color: #71767b;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1002px) {
  .right-sidebar {
    display: none;
  }
}

@media (max-width: 1279px) {
  .sidebar {
    width: 88px;
    height: 100vh;
  }

  .nav-text {
    display: none;
  }

  .tweet-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tweet-btn-text {
    display: none;
  }

  .tweet-btn::after {
    content: url("+");
    font-size: 24px;
  }
  .profile-text,
  .more-info {
    display: none;
  }
}

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

  .main-feed {
    max-width: 100%;
  }
}
