/* styles.css */
:root {
  --primary: #1da1f2;
  --primary-dark: #1a91da;
  --background: #ffffff;
  --text: #14171a;
  --light-text: #657786;
  --border: #e1e8ed;
  --card-bg: #ffffff;
  --hover: #f5f8fa;
  --like: #e0245e;
  --retweet: #17bf63;
  --comment: #1da1f2;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --dark-bg: #15202b;
  --dark-card: #192734;
  --dark-text: #f7f9f9;
  --dark-border: #38444d;
  --notification-bg: #1da1f2;
  --error-bg: #e0245e;
  --success-bg: #17bf63;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--background);
  color: var(--text);
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: var(--dark-bg);
  color: var(--dark-text);
}

/* Login Page Styles */
.login-container {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1da1f2, #006dbf);
  width: 100%;
  padding: 20px;
}

.login-box {
  background-color: var(--card-bg);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 450px;
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease;
}

.dark-mode .login-box {
  background-color: var(--dark-card);
}

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

.login-logo {
  font-size: 48px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 20px;
}

.login-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

.dark-mode .login-title {
  color: var(--dark-text);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.dark-mode .form-group label {
  color: var(--dark-text);
}

.form-control {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.dark-mode .form-control {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

.form-control:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.2);
}

.login-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-btn:hover {
  background-color: var(--primary-dark);
}

.signup-link, .login-link {
  text-align: center;
  margin-top: 20px;
  color: var(--light-text);
}

.dark-mode .signup-link,
.dark-mode .login-link {
  color: #8899a6;
}

.signup-link a, .login-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.signup-link a:hover, .login-link a:hover {
  text-decoration: underline;
}

/* Main App Styles */
#mainApp {
  display: none;
  width: 100%;
  position: relative;
}

/* Sidebar Styles */
.sidebar {
  width: 250px;
  padding: 20px;
  position: fixed;
  height: 100vh;
  border-right: 1px solid var(--border);
  background-color: var(--card-bg);
  transition: all 0.3s;
  overflow-y: auto;
  z-index: 100;
}

.dark-mode .sidebar {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
}

.logo {
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--primary);
  text-align: center;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 5px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 18px;
  font-weight: 600;
}

.dark-mode .nav-item {
  color: var(--dark-text);
}

.nav-item:hover, .nav-item.active {
  background-color: var(--hover);
  color: var(--primary);
}

.dark-mode .nav-item:hover, 
.dark-mode .nav-item.active {
  background-color: #1e2a38;
}

.nav-item i {
  margin-right: 15px;
  width: 25px;
  text-align: center;
}

.notification-badge {
  display: inline-block;
  width: 20px;
  height: 20px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  text-align: center;
  line-height: 20px;
  margin-left: 5px;
}

.tweet-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 30px;
  font-size: 18px;
  font-weight: 700;
  width: 100%;
  margin-top: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.tweet-btn:hover {
  background-color: var(--primary-dark);
}

.user-profile {
  position: absolute;
  bottom: 20px;
  display: flex;
  align-items: center;
  width: calc(100% - 40px);
  padding: 10px;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.dark-mode .user-profile {
  color: var(--dark-text);
}

.user-profile:hover {
  background-color: var(--hover);
}

.dark-mode .user-profile:hover {
  background-color: #1e2a38;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-handle {
  color: var(--light-text);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dark-mode .user-handle {
  color: #8899a6;
}

/* Theme toggle */
.theme-toggle {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  margin-top: 20px;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.theme-toggle:hover {
  background-color: var(--hover);
}

.dark-mode .theme-toggle:hover {
  background-color: #1e2a38;
}

.theme-toggle i {
  margin-right: 15px;
  width: 25px;
  text-align: center;
}

/* Main Content Styles */
.main-content {
  flex: 1;
  margin-left: 250px;
  max-width: 600px;
  border-right: 1px solid var(--border);
  transition: all 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dark-mode .main-content {
  border-color: var(--dark-border);
}

.header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dark-mode .header {
  background-color: rgba(25, 39, 52, 0.95);
  border-color: var(--dark-border);
}

.header h1 {
  font-size: 20px;
  flex: 1;
}

.dark-mode .header h1 {
  color: var(--dark-text);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.logout-btn:hover {
  background-color: rgba(29, 161, 242, 0.1);
}

.dark-mode .logout-btn:hover {
  background-color: rgba(29, 161, 242, 0.2);
}

/* Page styles */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
}

.page.active {
  display: block;
}

/* Tweet Form Styles */
.tweet-form {
  padding: 15px;
  border-bottom: 10px solid var(--background);
}

.dark-mode .tweet-form {
  border-color: var(--dark-bg);
}

.tweet-input {
  display: flex;
  padding-bottom: 15px;
}

.tweet-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.tweet-textarea {
  width: 100%;
  border: none;
  resize: none;
  font-size: 20px;
  min-height: 60px;
  outline: none;
  padding: 10px 0;
  background: transparent;
}

.dark-mode .tweet-textarea {
  color: var(--dark-text);
}

.tweet-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 65px;
}

.tweet-icons {
  display: flex;
}

.tweet-icons i {
  color: var(--primary);
  font-size: 20px;
  margin-right: 15px;
  cursor: pointer;
  transition: color 0.2s;
}

.tweet-icons i:hover {
  color: var(--primary-dark);
}

.image-upload-label {
  cursor: pointer;
}

.image-preview {
  position: relative;
  margin-bottom: 10px;
  width: 100%;
  max-width: 500px;
  border-radius: 15px;
  overflow: hidden;
}

#previewImage {
  width: 100%;
  height: auto;
  display: block;
}

.remove-image-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-image-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Tweet Styles */
.tweets-container {
  flex: 1;
  overflow-y: auto;
}

.tweet {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s;
  cursor: pointer;
  animation: slideIn 0.3s ease;
}

.dark-mode .tweet {
  border-color: var(--dark-border);
}

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

.tweet:hover {
  background-color: var(--hover);
}

.dark-mode .tweet:hover {
  background-color: #1e2a38;
}

.tweet-content {
  flex: 1;
}

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

.tweet-author {
  font-weight: 700;
  margin-right: 5px;
}

.dark-mode .tweet-author {
  color: var(--dark-text);
}

.tweet-handle, .tweet-time {
  color: var(--light-text);
  margin-right: 5px;
}

.dark-mode .tweet-handle,
.dark-mode .tweet-time {
  color: #8899a6;
}

.tweet-text {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 15px;
  white-space: pre-wrap;
}

.dark-mode .tweet-text {
  color: var(--dark-text);
}

.tweet-image {
  width: 100%;
  border-radius: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
  max-height: 400px;
  object-fit: cover;
}

.tweet-stats {
  display: flex;
  color: var(--light-text);
  max-width: 500px;
  justify-content: space-between;
  margin-top: 10px;
}

.tweet-stat {
  display: flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 20px;
  transition: all 0.3s;
  cursor: pointer;
}

.dark-mode .tweet-stat {
  color: #8899a6;
}

.tweet-stat:hover {
  background-color: rgba(29, 161, 242, 0.1);
  color: var(--primary);
}

.tweet-stat i {
  margin-right: 5px;
}

.tweet-stat.comment:hover {
  background-color: rgba(29, 161, 242, 0.1);
  color: var(--comment);
}

.tweet-stat.retweet:hover {
  background-color: rgba(23, 191, 99, 0.1);
  color: var(--retweet);
}

.tweet-stat.like:hover {
  background-color: rgba(224, 36, 94, 0.1);
  color: var(--like);
}

.tweet-stat.liked {
  color: var(--like);
}

.tweet-stat.retweeted {
  color: var(--retweet);
}

/* Comment Styles */
.comment-form {
  display: flex;
  margin-top: 10px;
  padding: 10px;
  background: var(--hover);
  border-radius: 10px;
}

.dark-mode .comment-form {
  background: #1e2a38;
}

.comment-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 15px;
  margin-right: 10px;
  font-size: 14px;
}

.dark-mode .comment-input {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

.comment-btn {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 0 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.comment-btn:hover {
  background-color: var(--primary-dark);
}

.comments-container {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.dark-mode .comments-container {
  border-color: var(--dark-border);
}

.comment {
  display: flex;
  padding: 10px 0;
}

.comment-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  margin-bottom: 3px;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 700;
  margin-right: 5px;
  font-size: 14px;
}

.comment-handle, .comment-time {
  color: var(--light-text);
  margin-right: 5px;
  font-size: 12px;
}

.comment-text {
  font-size: 14px;
  white-space: pre-wrap;
}

/* Right Sidebar Styles */
.right-sidebar {
  width: 350px;
  padding: 20px;
  position: fixed;
  right: 0;
  height: 100vh;
  overflow-y: auto;
}

.dark-mode .right-sidebar {
  color: var(--dark-text);
}

.search-container {
  background-color: var(--hover);
  border-radius: 30px;
  padding: 10px 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.dark-mode .search-container {
  background-color: #1e2a38;
}

.search-container i {
  color: var(--light-text);
  margin-right: 10px;
}

.search-container input {
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  width: 100%;
}

.dark-mode .search-container input {
  color: var(--dark-text);
}

.search-results {
  position: absolute;
  width: calc(100% - 30px);
  max-height: 300px;
  overflow-y: auto;
  background-color: var(--card-bg);
  border-radius: 15px;
  box-shadow: var(--shadow);
  margin-top: 5px;
  z-index: 100;
  display: none;
}

.dark-mode .search-results {
  background-color: var(--dark-card);
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-result-item:hover {
  background-color: var(--hover);
}

.dark-mode .search-result-item:hover {
  background-color: #1e2a38;
}

.trends-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.dark-mode .trends-card {
  background-color: var(--dark-card);
}

.trends-card h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.dark-mode .trends-card h2 {
  color: var(--dark-text);
}

.trend-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.3s;
  border-radius: 5px;
  padding: 10px;
}

.dark-mode .trend-item {
  border-color: var(--dark-border);
}

.trend-item:hover {
  background-color: var(--hover);
}

.dark-mode .trend-item:hover {
  background-color: #1e2a38;
}

.trend-item:last-child {
  border-bottom: none;
}

.trend-category {
  font-size: 13px;
  color: var(--light-text);
}

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

.dark-mode .trend-name {
  color: var(--dark-text);
}

.trend-count {
  font-size: 13px;
  color: var(--light-text);
}

.who-to-follow {
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 15px;
  box-shadow: var(--shadow);
}

.dark-mode .who-to-follow {
  background-color: var(--dark-card);
}

.who-to-follow h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.dark-mode .who-to-follow h2 {
  color: var(--dark-text);
}

.follow-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.dark-mode .follow-item {
  border-color: var(--dark-border);
}

.follow-item:last-child {
  border-bottom: none;
}

.follow-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.follow-info {
  flex: 1;
}

.follow-name {
  font-weight: 700;
}

.dark-mode .follow-name {
  color: var(--dark-text);
}

.follow-handle {
  color: var(--light-text);
}

.follow-btn {
  background-color: var(--text);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.dark-mode .follow-btn {
  background-color: var(--primary);
}

.follow-btn.following {
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.dark-mode .follow-btn.following {
  border-color: var(--dark-border);
  color: var(--dark-text);
}

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

.follow-btn.following:hover {
  background-color: rgba(224, 36, 94, 0.1);
  color: var(--like);
  border-color: var(--like);
}

/* Profile Page */
.profile-header {
  position: relative;
  height: 200px;
  background-color: var(--primary);
}

.profile-cover {
  height: 150px;
  background-color: var(--primary);
  position: relative;
}

.edit-cover-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-cover-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.profile-avatar-container {
  position: relative;
  margin-top: -40px;
  padding-left: 20px;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--primary);
  border: 4px solid var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 40px;
  font-weight: bold;
}

.dark-mode .profile-avatar {
  border-color: var(--dark-card);
}

.edit-avatar-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.edit-avatar-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

.profile-actions {
  text-align: right;
  padding: 10px 20px;
}

.edit-profile-btn {
  background-color: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
  padding: 8px 15px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.edit-profile-btn:hover {
  background-color: rgba(29, 161, 242, 0.1);
}

.dark-mode .edit-profile-btn {
  border-color: var(--primary);
  color: var(--primary);
}

.profile-info {
  padding: 20px;
}

.profile-name {
  font-size: 24px;
  font-weight: 700;
}

.profile-handle {
  color: var(--light-text);
  margin-bottom: 10px;
}

.profile-bio {
  margin-bottom: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.profile-stats {
  display: flex;
  margin-bottom: 20px;
}

.profile-stat {
  margin-right: 20px;
  cursor: pointer;
}

.profile-stat:hover {
  text-decoration: underline;
}

.profile-stat-value {
  font-weight: 700;
  margin-right: 5px;
}

.profile-stat-label {
  color: var(--light-text);
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.dark-mode .profile-tabs {
  border-color: var(--dark-border);
}

.profile-tab {
  padding: 15px;
  text-align: center;
  flex: 1;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s;
}

.profile-tab.active {
  border-bottom: 3px solid var(--primary);
  color: var(--primary);
}

.profile-tab:hover:not(.active) {
  background-color: var(--hover);
}

.dark-mode .profile-tab:hover:not(.active) {
  background-color: #1e2a38;
}

/* Messages Page */
.messages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid var(--border);
}

.dark-mode .messages-header {
  border-color: var(--dark-border);
}

.new-message-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.conversations-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.3s;
}

.dark-mode .conversation-item {
  border-color: var(--dark-border);
}

.conversation-item:hover {
  background-color: var(--hover);
}

.dark-mode .conversation-item:hover {
  background-color: #1e2a38;
}

.conversation-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  flex-shrink: 0;
}

.conversation-content {
  flex: 1;
  overflow: hidden;
}

.conversation-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.conversation-name {
  font-weight: 700;
  margin-right: 5px;
}

.conversation-time {
  color: var(--light-text);
  font-size: 12px;
}

.conversation-preview {
  color: var(--light-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-view {
  display: none;
  flex-direction: column;
  height: 100%;
}

.conversation-header {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.dark-mode .conversation-header {
  border-color: var(--dark-border);
}

.back-to-conversations {
  background: none;
  border: none;
  margin-right: 15px;
  color: var(--primary);
  cursor: pointer;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.message {
  max-width: 70%;
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 15px;
  position: relative;
}

.message.sent {
  background-color: var(--primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
}

.message.received {
  background-color: var(--hover);
  margin-right: auto;
  border-bottom-left-radius: 5px;
}

.dark-mode .message.received {
  background-color: #1e2a38;
}

.message-time {
  font-size: 11px;
  color: var(--light-text);
  margin-top: 5px;
  text-align: right;
}

.message.sent .message-time {
  color: rgba(255, 255, 255, 0.7);
}

.message-input-container {
  display: flex;
  padding: 15px;
  border-top: 1px solid var(--border);
}

.dark-mode .message-input-container {
  border-color: var(--dark-border);
}

#newMessageInput {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px 15px;
  margin-right: 10px;
}

.dark-mode #newMessageInput {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

#sendNewMessageBtn {
  background-color: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}

/* New Message Modal */
.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: 1000;
}

.modal-content {
  background-color: var(--card-bg);
  border-radius: 15px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dark-mode .modal-content {
  background-color: var(--dark-card);
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dark-mode .modal-header {
  border-color: var(--dark-border);
}

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
}

.modal-body {
  padding: 15px;
  flex: 1;
  overflow-y: auto;
}

#messageRecipient {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 15px;
}

.dark-mode #messageRecipient {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

.user-results {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.dark-mode .user-results {
  border-color: var(--dark-border);
}

.user-result {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

.dark-mode .user-result:hover {
  background-color: #1e2a38;
}

#messageContent {
  width: 100%;
  min-height: 100px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 15px;
  resize: none;
}

.dark-mode #messageContent {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

.send-message-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  float: right;
}

/* Edit Profile Modal */
#editName {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 15px;
}

.dark-mode #editName {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

#editBio {
  width: 100%;
  min-height: 100px;
  padding: 10px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 15px;
  resize: none;
}

.dark-mode #editBio {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
  color: var(--dark-text);
}

.save-profile-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  float: right;
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--card-bg);
  border-top: 1px solid var(--border);
  z-index: 1000;
}

.dark-mode .mobile-nav {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 15px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 12px;
}

.mobile-nav-item.active {
  color: var(--primary);
}

.mobile-nav-item i {
  font-size: 20px;
  margin-bottom: 5px;
}

.mobile-notification-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 10px;
  text-align: center;
  line-height: 18px;
  margin-left: 5px;
}

.mobile-tweet-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow);
  z-index: 1000;
  cursor: pointer;
  transition: transform 0.3s;
}

.mobile-tweet-btn:hover {
  transform: scale(1.1);
}

/* Notification */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 1000;
  transform: translateX(200%);
  transition: transform 0.3s ease;
}

.notification.show {
  transform: translateX(0);
}

.notification.error {
  background-color: var(--error-bg);
}

.notification.success {
  background-color: var(--success-bg);
}

/* Loading Spinner */
.loading-spinner {
  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: 1000;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@media (max-width: 1000px) {
  .sidebar {
    width: 80px;
  }
  .nav-item span {
    display: none;
  }
  .nav-item i {
    margin-right: 0;
    font-size: 24px;
  }
  .tweet-btn span {
    display: none;
  }
  .tweet-btn i {
    display: block;
    font-size: 24px;
  }
  .user-info {
    display: none;
  }
  .theme-toggle span {
    display: none;
  }
  .main-content {
    margin-left: 80px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    margin-left: 0;
    max-width: 100%;
    border-right: none;
  }
  
  .mobile-nav {
    display: block;
  }
  
  .mobile-tweet-btn {
    display: flex;
  }
  
  .tweet-form {
    padding: 10px;
  }
  
  .tweet-input {
    padding-bottom: 10px;
  }
  
  .tweet-actions {
    padding-left: 0;
    justify-content: space-between;
  }
  
  .tweet-icons {
    display: flex;
  }
  
  .tweet-btn {
    padding: 10px 15px;
    font-size: 16px;
  }
  
  .profile-header {
    height: auto;
  }
  
  .profile-cover {
    height: 120px;
  }
  
  .profile-avatar {
    width: 80px;
    height: 80px;
    bottom: -30px;
    font-size: 24px;
  }
  
  .profile-info {
    padding: 40px 15px 15px;
  }
  
  .profile-name {
    font-size: 20px;
  }
  
  .profile-tab {
    padding: 10px;
    font-size: 14px;
  }
  
  .modal-content {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .login-box {
    padding: 20px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .tweet-textarea {
    font-size: 18px;
    min-height: 50px;
  }
  
  .tweet-stat {
    padding: 5px;
  }
  
  .tweet-stat span {
    display: none;
  }
  
  .profile-stat {
    margin-right: 10px;
  }
  
  .profile-stat-value,
  .profile-stat-label {
    font-size: 14px;
  }
  
  .message {
    max-width: 85%;
  }
}
