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

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

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.login-card h1 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #1da1f2;
}

.login-description {
  color: #657786;
  margin-bottom: 32px;
  font-size: 16px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.username-input {
  padding: 16px;
  font-size: 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  transition: border-color 0.2s;
}

.username-input:focus {
  outline: none;
  border-color: #1da1f2;
}

.login-button {
  padding: 16px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: #1da1f2;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.login-button:hover {
  background-color: #1a91da;
}

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.loading-card {
  background: white;
  border-radius: 16px;
  padding: 48px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

.loading-card h2 {
  font-size: 28px;
  margin-bottom: 32px;
  color: #1da1f2;
}

.progress-bar-container {
  width: 100%;
  height: 12px;
  background-color: #e1e8ed;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  background-color: #1da1f2;
  transition: width 0.3s ease;
  width: 0%;
}

.loading-text {
  color: #657786;
  font-size: 16px;
}

.posts-screen {
  min-height: 100vh;
  padding-bottom: 40px;
}

.header {
  background: white;
  padding: 10px 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 20px;
  color: #1da1f2;
  margin: 0;
}

.user-info {
  color: #657786;
  font-size: 14px;
}

.user-info strong {
  color: #14171a;
}

.posts-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1400px) {
  .posts-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1000px) {
  .posts-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .posts-container {
    grid-template-columns: 1fr;
  }
}

.post-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.post-id-label {
  font-size: 12px;
  color: #657786;
  font-weight: 600;
  margin-bottom: 8px;
  padding: 4px 8px;
  background-color: #f7f9fa;
  border-radius: 4px;
  display: inline-block;
  align-self: flex-start;
}

.embed-container {
  flex: 1;
  margin-bottom: 12px;
  margin-top: 4px;
  overflow: hidden;
}

.embed-container iframe {
  max-width: 100%;
}

.flag-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #e1e8ed;
}

.flag-button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #657786;
  background-color: white;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.flag-button:hover {
  border-color: #1da1f2;
  color: #1da1f2;
}

.flag-button.flagged {
  background-color: #ff6b6b;
  color: white;
  border-color: #ff6b6b;
}

.flag-button.flagged:hover {
  background-color: #e85959;
  border-color: #e85959;
}

.flags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  align-items: center;
  padding: 4px 0;
}

.flag-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.flag-dot:hover {
  transform: scale(1.2);
}
