/*
 * Twitter-like styling for personal microblog
 */

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

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

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

.container-full {
  max-width: 100%;
}

/* Navigation */
.navbar {
  border-bottom: 1px solid #2f3336;
  background-color: #000;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background-color 0.2s;
}

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

.button-link {
  background-color: #1d9bf0;
  color: #fff;
  border: none;
  cursor: pointer;
}

.button-link:hover {
  background-color: #1a8cd8;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin: 1rem 2rem;
  border-radius: 8px;
}

.alert-notice {
  background-color: #1d9bf0;
  color: #fff;
}

.alert-alert {
  background-color: #f4212e;
  color: #fff;
}

/* Main Content */
.main-content {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  gap: 2rem;
}

.main-content-full {
  max-width: 100%;
  padding: 2rem;
}

.timeline {
  flex: 0 1 600px;
  max-width: 600px;
  width: 100%;
}

.sidebar {
  width: 300px;
}

/* Post Form */
.post-form {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.post-form textarea {
  width: 100%;
  background-color: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  resize: none;
  min-height: 100px;
  font-family: inherit;
}

.post-form textarea:focus {
  outline: none;
}

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

.post-form-actions label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.post-form-actions label svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.post-form-actions input[type="file"] {
  color: #1d9bf0;
  cursor: pointer;
}

.post-form-actions button {
  background-color: #1d9bf0;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.post-form-actions button:hover {
  background-color: #1a8cd8;
}

.post-form-actions button:disabled {
  background-color: #1d9bf0;
  opacity: 0.5;
  cursor: not-allowed;
}

.image-preview {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.image-preview-item {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  background-color: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Post Card */
.post-card {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 0.75rem 1rem 0.5rem;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.post-card:hover {
  background-color: #1a1a1a;
}

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author {
  display: flex;
  flex-direction: column;
}

.post-author-name {
  font-weight: bold;
  color: #fff;
}

.post-author-handle {
  color: #71767b;
  font-size: 0.9rem;
}

.post-time {
  color: #71767b;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.post-content {
  color: #fff;
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.25;
}

.post-content p {
  margin: 0;
  padding: 0;
}

.post-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0;
  border-radius: 16px;
  overflow: hidden;
}

.post-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-actions {
  display: flex;
  gap: 2rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2f3336;
}

.post-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #71767b;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.post-action svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.post-action:hover {
  color: #1d9bf0;
}

.post-action:hover svg {
  stroke: #1d9bf0;
}

/* Quote Tweet */
.quote-tweet {
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1rem;
  margin: 1rem 0;
  background-color: #000;
}

/* Inline Replies */
.post-replies {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #2f3336;
}

.inline-reply {
  margin-top: 0.75rem;
  margin-left: 3rem;
  padding-left: 1rem;
  border-left: 2px solid #2f3336;
  position: relative;
}

.inline-reply .post-card {
  margin: 0;
  border: none;
  background-color: transparent;
  padding: 0.5rem 0;
}

.inline-reply .post-header {
  margin-bottom: 0.25rem;
}

.inline-reply .post-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.75rem;
}

.inline-reply .post-author-name {
  font-size: 0.9rem;
}

.inline-reply .post-author-handle {
  font-size: 0.85rem;
}

.inline-reply .post-content {
  font-size: 0.95rem;
  margin: 0.25rem 0;
}

.inline-reply .post-actions {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  gap: 1.5rem;
}

.inline-reply .post-action {
  font-size: 0.9rem;
}

.inline-reply .post-action svg {
  width: 16px;
  height: 16px;
}

/* Thread Indicator */
.thread-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem 3rem;
  padding-left: 1rem;
  color: #71767b;
  font-size: 0.9rem;
  position: relative;
}

.thread-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #2f3336;
}

.thread-text {
  padding-left: 0.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.thread-text:hover {
  color: #1d9bf0;
  text-decoration: underline;
}

/* Profile */
.profile-header {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.profile-banner {
  width: 100%;
  height: 200px;
  background-color: #333;
  object-fit: cover;
}

.profile-info {
  padding: 1rem 2rem 2rem;
  position: relative;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid #000;
  object-fit: cover;
  margin-top: -60px;
  background-color: #000;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 1rem;
}

.profile-handle {
  color: #71767b;
  margin-bottom: 1rem;
}

.profile-bio {
  color: #fff;
  margin: 1rem 0;
  white-space: pre-wrap;
}

.profile-meta {
  display: flex;
  gap: 1rem;
  color: #71767b;
  margin-top: 1rem;
}

/* Reply Thread */
.reply-thread {
  margin-left: 2rem;
  padding-left: 1rem;
  border-left: 2px solid #2f3336;
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    width: 100%;
  }

  .nav-content {
    flex-direction: column;
    gap: 1rem;
  }

  .post-images {
    grid-template-columns: 1fr;
  }
}

/* Admin Panel */
.admin-container {
  width: 100%;
  max-width: 100%;
}

.admin-header {
  margin-bottom: 2rem;
}

.admin-users {
  background-color: #16181c;
  border: 1px solid #2f3336;
  border-radius: 16px;
  padding: 1.5rem;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}

.admin-table thead {
  border-bottom: 2px solid #2f3336;
}

.admin-table th {
  text-align: left;
  padding: 1rem;
  font-weight: bold;
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 1rem;
  border-bottom: 1px solid #2f3336;
}

.admin-table tbody tr:hover {
  background-color: #1a1d21;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.admin-button-primary {
  background-color: #1d9bf0;
  color: #fff;
}

.admin-button-primary:hover {
  background-color: #1a8cd8;
}

.admin-button-danger {
  background-color: #f4212e;
  color: #fff;
}

.admin-button-danger:hover {
  background-color: #d91e2a;
}
