@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f6f3f2;
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== 登录页样式 ========== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: pulse 15s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  padding: 24px;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 0px;
  padding: 48px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 28px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.login-header p {
  font-size: 14px;
  color: #6b7280;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  font-family: inherit;
  color: #1a1a1a;
  transition: all 0.3s;
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #E63946;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.login-btn {
  width: 100%;
  padding: 14px 24px;
  background: #E63946;
  color: #ffffff;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.login-btn:hover:not(:disabled) {
  background: #db313f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

.login-btn:disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

.login-error {
  color: #E63946;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 4px;
}

/* ========== 管理后台容器样式 ========== */
.admin-container {
  display: flex;
  min-height: 100vh;
  background: #f6f3f2;
}

.sidebar {
  width: 280px;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
}

.sidebar-logo {
  padding: 32px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.sidebar-logo h1 {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.sidebar-logo p {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #6b7280;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 0px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  cursor: pointer;
}

.sidebar-link:hover {
  background: rgba(230, 57, 70, 0.08);
  color: #E63946;
}

.sidebar-link.active {
  background: rgba(230, 57, 70, 0.12);
  color: #E63946;
}

.sidebar-link .material-symbols-outlined {
  font-size: 20px;
}

.sidebar-footer {
  padding: 24px 12px;
  border-top: 1px solid #e5e7eb;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 0px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: rgba(230, 57, 70, 0.08);
  color: #E63946;
}

.main-content {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
}

.header {
  height: 80px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-left h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.header-divider {
  width: 1px;
  height: 24px;
  background: #e5e7eb;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.breadcrumb span.active {
  color: #1a1a1a;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.header-actions .material-symbols-outlined {
  font-size: 20px;
  color: #6b7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 0px;
  transition: all 0.3s;
}

.header-avatar {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.header-actions .material-symbols-outlined:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-details {
  text-align: right;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}

.user-role {
  font-size: 11px;
  color: #6b7280;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 0px;
  object-fit: cover;
}

.content-area {
  flex: 1;
  padding: 32px;
  width: 100%;
}

/* ========== 数据概览页样式 ========== */
.dashboard-page {
  width: 100%;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: #ffffff;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(230, 57, 70, 0.1);
  border-radius: 0px;
}

.stat-icon .material-symbols-outlined {
  font-size: 24px;
  color: #E63946;
}

.stat-change {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 0px;
}

.stat-change.positive {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.stat-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 4px;
  font-family: 'Manrope', sans-serif;
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.latest-news {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 24px;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 0px;
  transition: all 0.3s;
  cursor: pointer;
}

.news-item:hover {
  background: #f3f4f6;
}

.news-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 0px;
  background: #e5e7eb;
}

.news-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.news-summary {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  gap: 12px;
  align-items: center;
}

.news-date {
  color: #6b7280;
}

.news-views {
  color: #E63946;
  font-weight: 500;
}

.news-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: #ef4444;
}

/* ========== 信息管理页样式 ========== */
.news-page {
  width: 100%;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.page-header-left h1 {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.page-header-left p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.add-news-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #E63946;
  color: #ffffff;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.add-news-btn:hover {
  background: #db313f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

.search-bar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input-wrapper .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 20px;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 44px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  transition: all 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #E63946;
}

.news-table {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  overflow: hidden;
}

.table-header {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 150px 80px 80px 100px;
  gap: 16px;
  padding: 16px 24px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.table-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 150px 80px 80px 100px;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
  transition: all 0.3s;
}

.table-row:last-child {
  border-bottom: none;
}

.table-row:hover {
  background: #f9fafb;
}

.table-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 0px;
  background: #e5e7eb;
}

.table-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
}

.table-date {
  font-size: 13px;
  color: #6b7280;
}

.table-summary {
  font-size: 13px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-views {
  font-size: 13px;
  color: #6b7280;
}

.table-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 0px;
}

.table-status.published {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.table-status.draft {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
}

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

/* ========== 信息编辑页样式 ========== */
.news-edit-page {
  width: 100%;
}

.page-header {
  margin-bottom: 48px;
}

.page-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.page-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.edit-content {
  width: 100%;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #1a1a1a;
  transition: all 0.3s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #E63946;
  box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.1);
}

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

/* ========== 自定义编辑器样式 ========== */
.custom-editor-wrapper {
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  overflow: hidden;
  background: #ffffff;
}

.editor-toolbar {
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar-group {
  display: flex;
  gap: 4px;
  padding-right: 12px;
  border-right: 1px solid #e5e7eb;
}

.toolbar-group:last-child {
  border-right: none;
}

.toolbar-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar-btn:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.toolbar-btn.active {
  background: rgba(230, 57, 70, 0.1);
  border-color: #E63946;
  color: #E63946;
}

.toolbar-btn .material-symbols-outlined {
  font-size: 20px;
}

/* 工具栏按钮悬浮提示 */
.toolbar-btn,
.font-size-select,
.line-height-select {
  position: relative;
}

.toolbar-btn::before,
.font-size-select::before,
.line-height-select::before {
  content: attr(title);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 1000;
  pointer-events: none;
  margin-top: 6px;
}

.toolbar-btn:hover::before,
.font-size-select:hover::before,
.line-height-select:hover::before {
  opacity: 1;
  visibility: visible;
}

.font-size-select,
.line-height-select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #ffffff;
  font-size: 13px;
  color: #1a1a1a;
  cursor: pointer;
  outline: none;
}

.font-size-select:focus,
.line-height-select:focus {
  border-color: #E63946;
}

.editor-content {
  min-height: 400px;
  padding: 20px;
  outline: none;
  font-size: 16px;
  line-height: 1.5;
}

.editor-content:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}

.editor-content:focus {
  outline: none;
}

.editor-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 4px;
}

.editor-content video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 4px;
}

.editor-content hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 20px 0;
}

.cover-image-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.file-input {
  display: none;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fa;
  color: #1a1a1a;
  padding: 12px 24px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.upload-btn:hover {
  background: #e5e7eb;
}

.cover-preview {
  position: relative;
  width: 320px;
  height: 180px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  overflow: hidden;
}

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

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

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

.status-toggle {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-label {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: .4s;
  border-radius: 0px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 0px;
}

input:checked + .toggle-slider {
  background-color: #E63946;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.action-buttons {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  justify-content: flex-end;
}

.cancel-btn,
.save-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.cancel-btn {
  background: #f8f9fa;
  color: #1a1a1a;
  border: 1px solid #e5e7eb;
}

.cancel-btn:hover {
  background: #e5e7eb;
}

.save-btn {
  background: #E63946;
  color: #ffffff;
}

.save-btn:hover:not(:disabled) {
  background: #db313f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

.save-btn:disabled {
  background: #e5e7eb;
  color: #6b7280;
  cursor: not-allowed;
}

/* ========== 账号管理页样式 ========== */
.account-page {
  width: 100%;
}

.account-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.add-account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #E63946;
  color: #ffffff;
  border: none;
  border-radius: 0px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.add-account-btn:hover {
  background: #db313f;
}

.account-table {
  width: 100%;
}

.account-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px 100px;
  gap: 16px;
  padding: 12px 16px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.account-table-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 120px 100px;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  align-items: center;
}

.account-table-row:last-child {
  border-bottom: none;
}

.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 0px;
  background: #e5e7eb;
}

.account-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #E63946;
}

.account-avatar-placeholder .material-symbols-outlined {
  font-size: 24px;
}

.account-name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.account-email {
  font-size: 12px;
  color: #6b7280;
}

.account-role {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(230, 57, 70, 0.1);
  color: #E63946;
  border-radius: 0px;
}

.account-status {
  font-size: 12px;
  font-weight: 600;
}

.account-status.active {
  color: #22c55e;
}

.account-status.inactive {
  color: #6b7280;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 80px;
  }
  
  .sidebar-logo h1,
  .sidebar-logo p,
  .sidebar-link span {
    display: none;
  }
  
  .sidebar-link {
    justify-content: center;
    padding: 12px;
  }
  
  .logout-btn span {
    display: none;
  }
  
  .logout-btn {
    justify-content: center;
  }
  
  .main-content {
    margin-left: 80px;
  }
  
  .header-left h2 {
    font-size: 16px;
  }
  
  .user-details {
    display: none;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .table-header,
  .table-row {
    grid-template-columns: 60px 1fr 80px;
  }
  
  .table-date,
  .table-status {
    display: none;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .cancel-btn,
  .save-btn {
    width: 100%;
    justify-content: center;
  }
  
  .page-header {
    flex-direction: column;
    gap: 16px;
  }
  
  .add-news-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== 隐藏类 ========== */
.hidden {
  display: none !important;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ========== 模态框 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #ffffff;
  border-radius: 0px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1a1a1a;
}

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ========== 加载状态 ========== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #6b7280;
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid #e5e7eb;
  border-top-color: #E63946;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 12px;
}

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

/* ========== Toast 消息 ========== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: #1a1a1a;
  color: #ffffff;
  border-radius: 0px;
  font-size: 14px;
  z-index: 9999;
  animation: slideIn 0.3s ease;
}

.toast.success {
  background: #22c55e;
}

.toast.error {
  background: #ef4444;
}

/* ========== 图库样式 ========== */
.gallery-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #E63946;
  color: #ffffff;
  padding: 12px 24px;
  border: 1px solid #E63946;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-btn:hover {
  background: #db313f;
  border-color: #db313f;
}

.gallery-modal {
  max-width: 1000px !important;
  width: 95% !important;
  max-height: 90vh !important;
  display: flex;
  flex-direction: column;
}

.gallery-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-actions {
  display: flex;
  gap: 12px;
}

.gallery-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #E63946;
  color: #ffffff;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-upload-btn:hover {
  background: #db313f;
}

.gallery-upload-btn .material-symbols-outlined {
  font-size: 20px;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn:hover {
  background: #e5e7eb;
  color: #1a1a1a;
}

.filter-btn.active {
  background: rgba(230, 57, 70, 0.1);
  border-color: #E63946;
  color: #E63946;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 300px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 0px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item.selected {
  border-color: #E63946;
}

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-actions {
  display: flex;
  gap: 12px;
}

.gallery-action-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.3s;
}

.gallery-action-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.gallery-action-btn.favorite {
  color: #ef4444;
}

.gallery-item-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.gallery-icon-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.gallery-icon-btn:hover {
  background: #ffffff;
  transform: scale(1.1);
}

.gallery-icon-btn .material-symbols-outlined {
  font-size: 16px !important;
}

.gallery-icon-btn.is-favorite {
  color: #ef4444;
}

.gallery-icon-btn.is-favorite .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.gallery-icon-btn.gallery-delete-btn:hover {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
}

.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: #9ca3af;
  grid-column: 1 / -1;
}

.gallery-empty .material-symbols-outlined {
  font-size: 48px;
  margin-bottom: 16px;
  color: #d1d5db;
}

/* ========== 图片库页面样式 ========== */
.gallery-page {
  width: 100%;
}

.gallery-upload-area {
  display: flex;
  gap: 12px;
}

.gallery-upload-area .file-input {
  display: none;
}

.gallery-page .gallery-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.gallery-page .gallery-grid {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  padding: 24px;
}

/* ========== 发布选项样式 ========== */
.publish-options {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.publish-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: all 0.2s;
}

.publish-option:hover {
  color: #E63946;
}

.publish-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #E63946;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background: #ffffff;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
}

.publish-option input[type="radio"]:checked {
  accent-color: #E63946;
  border-color: #E63946;
  background: #ffffff;
}

.publish-option input[type="radio"]:checked::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  background: #E63946;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ========== 账号表单样式 ========== */
.account-form {
  padding: 20px 0;
}

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

.account-form .form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.account-form .form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 0px;
  font-size: 14px;
  color: #1a1a1a;
  background: #ffffff;
}

.account-form .form-input:focus {
  outline: none;
  border-color: #E63946;
}

.password-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.password-toggle-btn {
  min-width: 56px;
  height: 40px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-size: 13px;
  padding: 0 10px;
  transition: all 0.2s;
}

.password-toggle-btn:hover {
  background: #f3f4f6;
}

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

/* ========== 预览按钮 ========== */
.preview-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #f3f4f6;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.3s;
}

.preview-btn:hover {
  background: #e5e7eb;
}

/* ========== 预览页面 ========== */
.preview-page {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.preview-content {
  background: #ffffff;
  min-height: 600px;
}

.preview-header {
  margin-bottom: 32px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #f3f4f6;
  border: none;
  border-radius: 0px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.3s;
}

.back-btn:hover {
  background: #e5e7eb;
}

.preview-article {
  width: 100%;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.preview-cover {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: none;
}

.preview-body {
  padding: 2rem;
}

.preview-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.preview-meta {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  display: flex;
  gap: 16px;
  align-items: center;
}

.preview-date {
  font-size: 0.9rem;
  color: #999;
}

.preview-status {
  font-size: 0.9rem;
  padding: 4px 12px;
  background: #fef3c7;
  color: #d97706;
  border-radius: 4px;
}

.preview-status.published {
  background: #dcfce7;
  color: #16a34a;
}

.preview-status.draft {
  background: #fef3c7;
  color: #d97706;
}

.preview-summary {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.preview-text {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
}

.preview-text p {
  margin-bottom: 1rem;
}

.preview-text img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.preview-text h1,
.preview-text h2,
.preview-text h3,
.preview-text h4 {
  margin: 1.5rem 0 1rem;
  font-weight: 700;
  color: #333;
}

.preview-text ul,
.preview-text ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.preview-text li {
  margin: 0.5rem 0;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  min-height: 350px;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.news-card .news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.news-card .news-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-content p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-card .news-meta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-card .news-meta span {
  font-size: 0.9rem;
  color: #999;
}

.news-card .news-meta a {
  font-size: 0.9rem;
  color: #E63946;
  text-decoration: none;
  transition: color 0.3s;
}

.news-card .news-meta a:hover {
  color: #c1121f;
}