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

body {
  font-family: "TwitterChirp", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

h1 {
  grid-column: 1 / -1;
  text-align: center;
  color: white;
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.editor-panel {
  background: rgba(21, 32, 43, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.preview-panel {
  background: rgba(21, 32, 43, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.editor-panel h2 {
  color: #ffffff;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.preview-panel h2 {
  color: #fff;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #aab8c2;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #38444d;
  border-radius: 12px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
  background-color: #15202b;
  color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1da1f2;
  box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.2);
}

.form-group textarea {
  resize: vertical;
}

.image-drop-zone {
  border: 2px dashed #38444d;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}

.image-drop-zone.dragover {
  border-color: #1da1f2;
  background-color: rgba(29, 161, 242, 0.1);
}

.image-drop-zone p {
  color: #aab8c2;
  margin: 0;
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #657786;
  margin-top: 5px;
}

.theme-selector {
  display: flex;
  align-items: center;
  gap: 15px;
}

.theme-selector label:first-child {
  margin-bottom: 0;
  margin-right: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 0 !important;
  cursor: pointer;
  color: #aab8c2;
}

.download-btn {
  width: 100%;
  background: linear-gradient(45deg, #1da1f2, #1991db);
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(29, 161, 242, 0.4);
}

/* Twitter Post Styling */
.twitter-post {
  max-width: 500px;
  margin: 0 auto;
  border-radius: 16px;
  padding: 20px;
  font-family: "TwitterChirp", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark-theme {
  background: #15202b;
  color: #ffffff;
}

.light-theme {
  background: #ffffff;
  color: #0f1419;
  border: 1px solid #ebeef0;
}

.post-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
}

.avatar-container {
  margin-right: 12px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(45deg, #1da1f2, #1991db);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.avatar-text {
  color: white;
  font-weight: bold;
  font-size: 18px;
}

.user-info {
  flex: 1;
}

.display-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
}

.verified-badge {
  color: #1991db;
  font-size: 16px;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.username-time {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.username,
.time,
.separator {
  color: #71767b;
  font-size: 15px;
}

.light-theme .username,
.light-theme .time,
.light-theme .separator {
  color: #536471;
}
#twitterPost {
  border: 1px solid #e1e8ed;
}
.post-content {
  margin-bottom: 16px;
}

.post-text {
  font-size: 15px;
  line-height: 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-image-container {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #2f3336;
}

.light-theme .post-image-container {
  border-color: #ebeef0;
}

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

.post-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #2f3336;
  max-width: 425px;
}

.light-theme .post-stats {
  border-top-color: #ebeef0;
}

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

.light-theme .stat-item {
  color: #536471;
}

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

.stat-icon {
  font-size: 16px;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  h1 {
    font-size: 2rem;
  }

  .editor-panel,
  .preview-panel {
    padding: 20px;
  }
}
