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

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

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  text-align: center;
  padding: 40px;
}

.loading-spinner {
  font-size: 64px;
  color: #4c6ef5;
  animation: spin 1s linear infinite;
  display: block;
  margin-bottom: 20px;
}

/* Lottie loading animation */
.loading-content lottie-player {
  display: block;
}

.loading-content h2 {
  color: #374151;
  margin-bottom: 20px;
  font-weight: 500;
}

.loading-progress-bar {
  width: 300px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 16px;
}

.loading-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4c6ef5, #7c3aed);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.loading-content p {
  color: #6b7280;
  font-size: 14px;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu",
    "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f3f4f6;
}

.material-icons,
.material-icons-outlined {
  font-size: 20px;
  vertical-align: middle;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px;
}

header {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 0;
}

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

h1 {
  font-size: 28px;
  font-weight: bold;
  color: #111;
}

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

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

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

button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

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

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

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

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  min-width: 400px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111;
}

.modal-close-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  border-radius: 4px;
  color: #6b7280;
}

.modal-close-btn:hover {
  background: #f3f4f6;
  color: #111;
}

.modal-body {
  padding: 24px;
}

.modal-body label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
}

.modal-body input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.modal-body input[type="text"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #fafbfc;
  border-radius: 0 0 12px 12px;
}

/* Category options in modal */
.category-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.category-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}

.category-option:hover {
  background: #f3f4f6;
}

.category-option.selected {
  background: #e8f0fe;
  border-color: #2563eb;
}

.category-option input[type="radio"] {
  display: none;
}

.category-option .material-icons {
  color: #9ca3af;
  font-size: 20px;
}

.category-option.selected .material-icons {
  color: #2563eb;
}

.category-option span:last-child {
  font-size: 14px;
  color: #374151;
}

.btn-logout {
  background-color: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.btn-logout:hover {
  background-color: #e5e7eb;
}

.grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  height: calc(100vh - 68px);
}

.sidebar {
  background: white;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-section {
  padding: 8px;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.sidebar-item {
  padding: 8px 12px;
  margin-bottom: 2px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #4b5563;
  font-size: 14px;
  transition: all 0.2s;
}

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

.sidebar-item.active {
  background: #e8f0fe;
  color: #2563eb;
  font-weight: 500;
}

.sidebar-item-count {
  font-size: 12px;
  color: #999;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
}

.sidebar-item-count.has-unread {
  background: #2563eb;
  color: white;
  font-weight: 600;
}

.sidebar-item.active .sidebar-item-count {
  background: #2563eb;
  color: white;
}

.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.main-header h2 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #111;
}

.main-header p {
  font-size: 14px;
  color: #666;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.feed-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.feed-controls input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.feed-controls button {
  padding: 8px 16px;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
  font-family: inherit;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.feed-item {
  padding: 12px 0;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-item-content {
  flex: 1;
  min-width: 0;
}

.feed-item-title {
  font-weight: 500;
  color: #111;
  margin-bottom: 4px;
  word-break: break-word;
}

.feed-item-url {
  font-size: 12px;
  color: #999;
  word-break: break-all;
}

.feed-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

.feed-viewer {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  overflow: hidden;
}

.feed-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbfc;
}

.feed-header:hover {
  background: #f3f4f6;
}

.feed-header h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: #111;
}

.feed-header p {
  font-size: 12px;
  color: #999;
}

.feed-items {
  max-height: 400px;
  overflow-y: auto;
}

.article {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.article:last-child {
  border-bottom: none;
}

.article a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-bottom: 8px;
}

.article a:hover {
  text-decoration: underline;
}

.article-desc {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  font-size: 12px;
  color: #999;
  display: flex;
  justify-content: space-between;
}

/* Article card styles */
.article-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  align-items: flex-start;
  transition: background-color 0.2s;
}

.article-card:hover {
  background-color: #f9fafb;
}

.article-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 4px;
}

.article-image {
  flex-shrink: 0;
  width: 120px;
  height: 80px;
  background: #e5e7eb;
  border-radius: 4px;
  object-fit: cover;
}

.article-body {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-weight: 400;
  font-size: 15px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.4;
}

.article-title.unread {
  font-weight: 700;
  color: #111;
}

.article-title a {
  color: #111;
  text-decoration: none;
}

.article-title a:hover {
  color: #2563eb;
}

.article-summary {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #999;
  align-items: center;
}

.article-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.article-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #ccc;
  padding: 4px;
  transition: color 0.2s;
}

.article-actions button:hover {
  color: #999;
}

/* Feed item menu */
.feed-menu {
  position: relative;
}

.feed-menu-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #999;
  padding: 0;
}

.feed-menu-button:hover {
  color: #4b5563;
}

.feed-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 150px;
  margin-top: 4px;
}

.feed-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  color: #4b5563;
  transition: background-color 0.2s;
}

.feed-menu-dropdown button:hover {
  background-color: #f3f4f6;
}

.feed-menu-dropdown button:first-child {
  border-radius: 5px 5px 0 0;
}

.feed-menu-dropdown button:last-child {
  border-radius: 0 0 5px 5px;
}

.error {
  padding: 12px;
  background-color: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #991b1b;
  margin-bottom: 16px;
  font-size: 14px;
}

.success {
  padding: 12px;
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  color: #166534;
  margin-bottom: 16px;
  font-size: 14px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #999;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(to bottom right, #3b82f6, #1d4ed8);
}

.login-box {
  background: white;
  padding: 32px;
  border-radius: 8px;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15);
  max-width: 450px;
  width: 100%;
  margin: 20px;
}

.login-box h1 {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
  color: #111;
}

.login-box p {
  text-align: center;
  color: #666;
  margin-bottom: 32px;
}

.google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  background: white;
  border: 2px solid #d1d5db;
  color: #374151;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.google-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.features {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
}

.features h2 {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  margin-bottom: 16px;
}

.features ul {
  list-style: none;
}

.features li {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
}

.features li::before {
  content: "✓";
  color: #2563eb;
  font-weight: bold;
  flex-shrink: 0;
}

.import-opml {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 2px dashed #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  color: #666;
  transition: all 0.2s;
}

.file-input-label:hover {
  border-color: #9ca3af;
  background: #fafbfc;
}

input[type="file"] {
  display: none;
}

.hidden {
  display: none;
}

/* Inline Article Expansion Styles */
.article-card.article-expanded {
  display: block;
  background: white;
  border-left: 3px solid #2563eb;
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
  clear: both;
}

.article-card.article-expanded::after {
  content: "";
  display: block;
  clear: both;
}

.article-card.article-expanded:hover {
  background: white;
}

.article-expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.article-expanded-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.article-expanded-source {
  color: #2563eb;
  font-weight: 500;
}

.article-expanded-date {
  color: #9ca3af;
}

.article-expanded-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-open-original {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.article-open-original:hover {
  background: #1d4ed8;
}

.article-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  margin-left: 8px;
}

.article-close-btn:hover {
  background: #e5e7eb;
}

.article-close-btn .material-icons {
  font-size: 22px;
  color: #666;
}

.article-expanded-actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.article-expanded-actions button:hover {
  background: #e5e7eb;
}

.article-expanded-actions a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.2s;
}

.article-expanded-actions a:hover {
  background: #1d4ed8;
}

.article-expanded-actions a .material-icons {
  font-size: 16px;
}

.article-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  margin-left: 8px;
}

.article-close:hover {
  background: #e5e7eb;
}

.article-close .material-icons {
  font-size: 20px;
  color: #666;
}

.article-expanded-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  padding: 20px 24px 16px;
}

.article-expanded-content {
  padding: 0 24px 24px;
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
  overflow: hidden;
  clear: both;
}

.article-expanded-content::after {
  content: "";
  display: block;
  clear: both;
}

.article-expanded-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
  float: none !important;
  display: block;
}

.article-expanded-content figure {
  margin: 24px 0;
}

.article-expanded-content figcaption {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-top: 8px;
}

.article-expanded-content p {
  margin-bottom: 16px;
}

.article-expanded-content a {
  color: #2563eb;
  text-decoration: none;
}

.article-expanded-content a:hover {
  text-decoration: underline;
}

.article-expanded-content h2,
.article-expanded-content h3,
.article-expanded-content h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  color: #111;
}

.article-expanded-content ul,
.article-expanded-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-expanded-content li {
  margin-bottom: 8px;
}

.article-expanded-content blockquote {
  border-left: 4px solid #e5e7eb;
  padding-left: 16px;
  margin: 16px 0;
  color: #6b7280;
  font-style: italic;
}

/* Article Panel - Feedly-style sliding panel */
.article-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.article-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 700px;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  animation: slideIn 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-panel-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

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

.panel-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid #d1d5db;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  color: #374151;
  transition: all 0.15s ease;
  text-decoration: none;
}

.panel-action-btn svg {
  width: 24px;
  height: 24px;
}

.panel-action-btn .material-icons {
  font-size: 24px;
}

.panel-action-btn:hover {
  background: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}

.panel-action-btn.active {
  color: #4c6ef5;
  background: #eef2ff;
  border-color: #4c6ef5;
}

.panel-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.15s ease;
}

.panel-close-btn svg {
  width: 24px;
  height: 24px;
}

.panel-close-btn .material-icons,
.panel-close-btn .material-icons-outlined {
  font-size: 24px;
}

.panel-close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.article-panel-content {
  flex: 1;
  padding: 24px 32px 48px;
}

.article-panel-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 14px;
}

.article-panel-source {
  font-weight: 600;
  color: #4c6ef5;
}

.article-panel-author {
  color: #6b7280;
}

.article-panel-date {
  color: #9ca3af;
}

.article-panel-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
  margin-bottom: 24px;
}

.article-panel-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 24px;
}

.article-panel-body {
  font-size: 17px;
  line-height: 1.8;
  color: #374151;
}

.article-panel-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}

.article-panel-body p {
  margin-bottom: 16px;
}

.article-panel-body a {
  color: #4c6ef5;
  text-decoration: none;
  word-break: break-word;
}

.article-panel-body a::after {
  content: " ↗";
  font-size: 0.8em;
  margin-left: 2px;
}

.article-panel-body a:hover {
  text-decoration: underline;
}

.article-panel-body h1,
.article-panel-body h2,
.article-panel-body h3,
.article-panel-body h4 {
  margin-top: 28px;
  margin-bottom: 14px;
  color: #111;
  font-weight: 600;
}

.article-panel-body ul,
.article-panel-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.article-panel-body li {
  margin-bottom: 8px;
}

.article-panel-body blockquote {
  border-left: 4px solid #4c6ef5;
  padding-left: 16px;
  margin: 16px 0;
  color: #6b7280;
  font-style: italic;
}

.article-panel-body figure {
  margin: 16px 0;
}

.article-panel-body figcaption {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-top: 8px;
}

.loading-article {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

/* Hamburger button - hidden on desktop */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 6px;
  color: #374151;
}

.hamburger-btn:hover {
  background: #f3f4f6;
}

/* Mobile sidebar backdrop */
.sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  header .content {
    flex-direction: row;
    gap: 12px;
    padding: 12px 16px;
  }

  header .content h1 {
    flex: 1;
    font-size: 22px;
    text-align: left;
  }

  .user-info {
    gap: 8px;
  }

  .user-info .user-name {
    display: none;
  }

  .user-info img {
    width: 32px;
    height: 32px;
  }

  .btn-logout {
    padding: 6px 12px;
    font-size: 12px;
  }

  .container {
    padding: 0;
  }

  .grid {
    grid-template-columns: 1fr;
    height: calc(100vh - 60px);
  }

  /* Mobile sidebar as overlay */
  .sidebar {
    position: fixed;
    top: 76px;
    left: 0;
    width: 280px;
    height: calc(100vh - 76px);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
  }

  .sidebar-item {
    padding: 10px 12px;
  }

  .sidebar-item span {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .sidebar-item .material-icons {
    font-size: 20px !important;
    color: inherit;
  }

  .sidebar-section {
    padding-top: 16px;
  }

  .sidebar-section:first-child {
    padding-top: 16px;
  }

  .main {
    width: 100%;
    padding-top: 8px;
  }

  .main-header {
    padding: 12px 16px;
  }

  .main-header h2 {
    font-size: 18px;
  }

  .main-header p {
    font-size: 12px;
  }

  .main-content {
    padding: 8px;
  }

  .article-card {
    padding: 12px;
  }

  .article-panel {
    max-width: 100%;
  }

  .article-panel-content {
    padding: 16px;
  }

  .article-panel-title {
    font-size: 22px;
  }

  .article-panel-body {
    font-size: 16px;
  }

  /* Modal adjustments for mobile */
  .modal-content {
    min-width: auto;
    width: calc(100% - 32px);
    margin: 16px;
  }
}
