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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

body {
  display: flex;
  flex-direction: column;
}

#app {
  flex: 1;
  overflow: auto;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 16px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header h1 {
  font-size: 24px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

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

/* Navigation */
.nav-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.nav-tab {
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: #333;
}

.nav-tab.active {
  color: #1890ff;
  border-bottom-color: #1890ff;
}

/* Sections */
.section {
  display: none;
}

.section.active {
  display: block;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* Buttons */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #1890ff;
  color: white;
}

.btn-primary:hover {
  background-color: #0050b3;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: #333;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-danger {
  background-color: #ff4d4f;
  color: white;
}

.btn-danger:hover {
  background-color: #d9363e;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

/* Cards */
.card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

/* Login section */
.login-container {
  max-width: 400px;
  margin: 40px auto;
  padding: 32px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.login-subtitle {
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
}

/* Editor preview */
.editor-preview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .editor-preview-container {
    grid-template-columns: 1fr;
  }
}

.editor-panel,
.preview-panel {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.editor-panel textarea {
  width: 100%;
  height: 400px;
  border: none;
  padding: 12px;
  font-family: "Monaco", "Menlo", monospace;
  font-size: 13px;
}

.preview-panel {
  padding: 12px;
  overflow-y: auto;
  max-height: 400px;
}

.preview-content {
  font-size: 14px;
  line-height: 1.6;
}

.preview-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 12px 0 8px 0;
}

.preview-content p {
  margin-bottom: 8px;
}

.preview-content ul {
  margin-left: 20px;
  margin-bottom: 8px;
}

.preview-content li {
  margin-bottom: 4px;
}

.preview-content strong {
  font-weight: 600;
}

.preview-content em {
  font-style: italic;
}

/* List items */
.list-item {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.list-item-content {
  flex: 1;
}

.list-item-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.list-item-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.list-item-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}

.list-item-status.scheduled {
  background-color: #e6f4ff;
  color: #0050b3;
}

.list-item-status.published {
  background-color: #f6ffed;
  color: #274e0a;
}

.list-item-status.failed {
  background-color: #fff1f0;
  color: #820000;
}

.list-item-actions {
  display: flex;
  gap: 8px;
}

/* Messages */
.message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.message.success {
  background-color: #f6ffed;
  color: #274e0a;
  border: 1px solid #b7eb8f;
}

.message.error {
  background-color: #fff1f0;
  color: #820000;
  border: 1px solid #ffccc7;
}

.message.info {
  background-color: #e6f4ff;
  color: #0050b3;
  border: 1px solid #91caff;
}

/* Loading */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f0f0f0;
  border-top-color: #1890ff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  .header h1 {
    font-size: 18px;
  }

  .nav-tabs {
    flex-wrap: wrap;
  }

  .list-item {
    flex-direction: column;
  }

  .list-item-actions {
    margin-top: 12px;
    width: 100%;
  }

  .list-item-actions button {
    flex: 1;
  }
}
