/* Typography in toplist sections */
#toplist-categories-wrap p {
  color: #cfcfcf;
}

.category-header .category-meta {
  color: #aaa;
}

.site-info .site-description {
  color: #d5d7dc;
}

/* ===== enhanced-admin.php ===== */
.admin-header {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 10px 15px;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.3s;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 40px;
}

.metric-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.3s;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-card.alert-card {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
}

.metric-icon {
  font-size: 2.5em;
  opacity: 0.8;
}

.metric-info h3 {
  margin: 0;
  font-size: 2em;
  color: #4a9eff;
}

.metric-info p {
  margin: 5px 0 0;
  color: #ccc;
  font-size: 14px;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 2px solid #4a9eff;
  padding-bottom: 10px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
}

.action-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  text-align: center;
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.action-icon {
  font-size: 3em;
  margin-bottom: 15px;
  opacity: 0.8;
}

.action-card h3 {
  margin: 0 0 10px;
  color: #fff;
}

.action-card p {
  margin: 0;
  color: #ccc;
  font-size: 14px;
}

.activity-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.activity-column h2 {
  margin-bottom: 20px;
  color: #fff;
}

.activity-list {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #333;
}

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

.activity-meta strong {
  color: #fff;
}

.activity-meta small {
  color: #999;
}

.activity-link {
  background: #4a9eff;
  color: white;
  padding: 6px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
}

.role-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.role-admin {
  background: #dc3545;
  color: white;
}

.role-editor {
  background: #ffc107;
  color: black;
}

.role-user {
  background: #6c757d;
  color: white;
}

.chart-container {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-nav {
    justify-content: center;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .activity-section {
    grid-template-columns: 1fr;
  }
}

.update-notification {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 2px solid #4a9eff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: white;
  box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
  animation: slideIn 0.5s ease-out;
}

.update-notification.security-update {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border-color: #ff4757;
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3);
}

.update-icon {
  font-size: 3em;
  opacity: 0.9;
  flex-shrink: 0;
}

.update-content {
  flex: 1;
}

.update-title {
  font-size: 1.2em;
  margin-bottom: 8px;
}

.update-details {
  margin-bottom: 10px;
  opacity: 0.9;
}

.update-changelog {
  background: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  margin-top: 10px;
}

.update-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.update-actions .btn {
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: opacity 0.3s;
}

.update-actions .btn-primary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid white;
}

.update-actions .btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.update-actions .btn:hover {
  opacity: 0.8;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .update-notification {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .update-actions {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 480px) {

  .metrics-grid,
  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== email-marketing.php ===== */
.access-denied {
  text-align: center;
  padding: 50px;
  color: #ccc;
}

.link-primary {
  color: #4a9eff;
}

.email-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-direction: column;
}

.email-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.sender-info-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  border-left: 4px solid #ffc107;
}

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

.form-help {
  color: #999;
  font-size: 12px;
  margin-top: 5px;
  display: block;
}

.email-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-icon {
  font-size: 2.5em;
  opacity: 0.8;
}

.stat-info h3 {
  margin: 0;
  font-size: 1.8em;
  color: #4a9eff;
}

.stat-info p {
  margin: 5px 0 0;
  color: #ccc;
  font-size: 14px;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  color: #fff;
  border-bottom: 2px solid #4a9eff;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.campaign-form {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

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

.form-group label {
  color: #ccc;
  margin-bottom: 8px;
  font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #444;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a9eff;
  background: rgba(255, 255, 255, 0.15);
}

.form-actions {
  display: flex;
  gap: 15px;
}

.templates-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
}

.templates-list {
  display: grid;
  gap: 15px;
}

.template-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
}

.template-card h3 {
  margin: 0 0 10px;
  color: #fff;
}

.template-card p {
  color: #ccc;
  margin-bottom: 15px;
  line-height: 1.4;
}

.template-actions {
  display: flex;
  gap: 10px;
}

.create-template {
  background: rgba(0, 0, 0, 0.3);
  padding: 25px;
  border-radius: 10px;
  height: fit-content;
}

.create-template h3 {
  margin: 0 0 20px;
  color: #fff;
}

.campaigns-table {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
}

.table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 2px solid #4a9eff;
  font-weight: bold;
  color: #4a9eff;
}

.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #333;
  align-items: center;
}

.campaign-subject {
  color: #fff;
  font-weight: bold;
}

.campaign-date,
.campaign-recipients {
  color: #ccc;
}

.campaign-opens,
.campaign-clicks {
  color: #ccc;
}

.campaign-opens small,
.campaign-clicks small {
  display: block;
  color: #999;
  font-size: 11px;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.status-completed {
  background: #28a745;
  color: white;
}

.status-sending {
  background: #ffc107;
  color: black;
}

.status-draft {
  background: #6c757d;
  color: white;
}

.subscriber-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
}

.tool-card h3 {
  margin: 0 0 15px;
  color: #fff;
}

.tool-card p {
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 20px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  transition: opacity 0.3s;
}

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

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-edit {
  background: #8fb0b5;
  color: white;
}

.btn:hover {
  opacity: 0.8;
}

.btn-loading {
  display: none;
}

#ranking-options {
  display: none;
}

#preview-modal {
  display: none;
}

.preview-logo img {
  max-width: 200px;
  max-height: 150px;
}

#emailPreview {
  display: none;
}

.email-preview-box {
  border: 1px solid #444;
  padding: 20px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
}

.modal-content {
  background: #2a2a2a;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  margin: 0;
  color: #fff;
}

.close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  color: #ccc;
}

@media (max-width: 768px) {
  .email-header {
    flex-direction: column;
    gap: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .templates-section {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .subscriber-tools {
    grid-template-columns: 1fr;
  }
}

/* ===== subscribers.php ===== */
#page-wrap h1 {
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.stat-card h3 {
  margin: 0;
  color: #4a9eff;
  font-size: 1.8em;
}

.stat-card p {
  margin: 6px 0 0;
  color: #ccc;
  font-size: 13px;
}

.table {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.thead,
.trow {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
  padding: 12px 15px;
}

.thead {
  font-weight: bold;
  border-bottom: 2px solid #4a9eff;
  color: #4a9eff;
}

.trow {
  border-bottom: 1px solid #333;
  color: #ddd;
}

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

/* ===== unsubscribes.php ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.list {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
}

.thead,
.row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  padding: 12px 15px;
}

.thead {
  font-weight: bold;
  border-bottom: 2px solid #4a9eff;
  color: #4a9eff;
}

.row {
  border-bottom: 1px solid #333;
  color: #ddd;
  align-items: center;
}

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

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

.btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.btn-primary {
  background: #007bff;
  color: #fff;
}

.btn-secondary {
  background: #6c757d;
  color: #fff;
}

.btn-sm {
  font-size: 12px;
}

.form-inline {
  display: inline;
}

/* ===== add-site.php ===== */
.toplist-form {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
}

.section-description {
  margin: 0 0 15px 0;
  color: #aaa;
  font-style: italic;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ddd;
}

.required {
  color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
  width: 100%;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
  background: rgba(0, 0, 0, 0.5);
}

.form-help {
  display: block;
  margin-top: 5px;
  color: #999;
  font-size: 12px;
}

.error-message {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid #dc3545;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.error-icon {
  font-size: 2em;
  flex-shrink: 0;
}

.error-content h3,
.error-content strong {
  color: #f5b5bb;
  margin: 0 0 10px 0;
}

.error-content p {
  color: #f1a1a8;
  margin: 5px 0;
}

.error-content .btn {
  margin-top: 10px;
}

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

.favicon-fetch-option {
  margin-top: 10px;
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-bottom: 15px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

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

.radio-custom {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #7aaeff;
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}

.radio-label input[type="radio"]:checked+.radio-custom {
  border-color: #4a9eff;
  background: rgba(74, 158, 255, 0.15);
}

.radio-label input[type="radio"]:checked+.radio-custom::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #4a9eff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.favicon-section {
  display: none;
  padding: 15px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  border: 1px solid #424242;
}

.favicon-section.active {
  display: block;
}

.fetch-info {
  margin: 0 0 10px 0;
  font-size: 13px;
  color: #aaa;
}

.fetch-btn {
  background: #4a9eff;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.fetch-btn:hover {
  background: #3c88da;
}

.fetch-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.favicon-preview {
  margin-top: 15px;
  text-align: center;
}

.favicon-preview img {
  width: 64px;
  height: 64px;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  object-fit: contain;
}

.favicon-preview .preview-info {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.favicon-preview .fetch-success {
  color: #28a745;
  font-weight: bold;
}

.favicon-preview .fetch-error {
  color: #dc3545;
}

.screenshot-fetch-option {
  margin-top: 10px;
}

.screenshot-section {
  padding: 15px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 4px;
  border: 1px solid #424242;
}

.screenshot-section.active {
  display: block;
}

.screenshot-preview {
  margin-top: 15px;
  text-align: center;
}

.screenshot-preview .generated-success {
  color: #28a745;
  font-weight: bold;
}

.screenshot-preview img {
  max-width: 200px;
  max-height: 200px;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  object-fit: contain;
}

.screenshot-preview .preview-info {
  margin-top: 10px;
  font-size: 12px;
  color: #666;
}

.category-option {
  position: relative;
  overflow: hidden;
}

.category-label {
  display: block;
  cursor: pointer;
  margin-bottom: 0;
  font-weight: normal;
  height: 100%;
  position: relative;
}

.category-checkbox {
  position: absolute;
  opacity: 0;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  z-index: 2;
}

.category-card {
  border: 1px solid #333;
  border-radius: 5px;
  padding: 15px;
  transition: all 0.2s;
  position: relative;
  box-sizing: border-box;
}

.category-checkbox:checked+.category-card {
  border-color: #830310;
  background: linear-gradient(135deg, #000000 0%, #451439 100%);
}

.category-card:hover {
  border-color: #667eea;
}

.category-name {
  font-weight: bold;
  margin-bottom: 5px;
  color: #fff;
}

.category-description {
  font-size: 12px;
  opacity: 0.8;
  color: #bbb;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  padding: 20px 0;
}

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(45deg, #5a67d8, #6b46c1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid #667eea;
  color: #667eea;
}

.btn-outline:hover {
  background: #667eea;
  color: white;
}

.error-message,
.success-message,
.warning-message {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.success-message {
  background-color: rgba(40, 167, 69, 0.15);
  border: 1px solid #28a745;
  color: #c5f7d0;
}

.warning-message {
  background-color: rgba(255, 193, 7, 0.15);
  border: 1px solid #ffc107;
  color: #ffdd8a;
}

.modal-content {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

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

.close-modal {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #ccc;
}

.modal-body {
  padding: 20px;
  color: #ddd;
}

@media (max-width: 768px) {

  .form-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===== categories-admin.php ===== */
.admin-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  margin-bottom: 30px;
}

.form-section,
.list-section {
  background: #121212;
  border: 1px solid #424242;
  border-radius: 5px;
  padding: 15px;
  margin-bottom: 15px;
}

.form-section h3,
.list-section h3 {
  margin: 0 -15px 20px;
  border-bottom: 1px solid #424242;
  padding: 0 15px 15px;
}

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

.category-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #ddd;
}

.category-form input[type="text"],
.category-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.category-form input:focus,
.category-form textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
  background: rgba(0, 0, 0, 0.5);
}

.form-help {
  display: block;
  margin-top: 5px;
  color: #999;
  font-size: 12px;
}

.categories-table {
  display: grid;
  gap: 1px;
  background: transparent;
  border-radius: 4px;
  overflow: hidden;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  padding: 15px;
  align-items: center;
}

.table-header {
  background: rgba(0, 0, 0, 0.3);
  font-weight: bold;
  color: #4a9eff;
}

.table-row {
  background: rgba(255, 255, 255, 0.03);
}

.table-row.editing {
  background: rgba(74, 158, 255, 0.08);
}

.category-info strong {
  display: block;
  color: #fff;
}

.category-slug {
  color: #bbb;
  font-family: monospace;
}

.category-description {
  margin-top: 5px;
  color: #bbb;
  font-size: 13px;
}

.site-count {
  font-weight: bold;
  color: #4a9eff;
  font-size: 18px;
}

.count-mismatch {
  color: #ff7675;
  display: block;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-outline {
  background: transparent;
  border: 1px solid #667eea;
  color: #667eea;
}

.btn-warning {
  background: #ffc107;
  color: #333;
}

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

.btn:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.quick-actions {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #424242;
  border-radius: 8px;
  padding: 20px;
}

.quick-actions h3 {
  margin: 0 0 15px 0;
  color: #fff;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .table-header,
  .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .col-actions {
    justify-content: flex-start;
  }

  .action-buttons {
    flex-direction: column;
  }
}

/* ===== review-management.php ===== */
.review-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.review-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 15px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.review-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.stat-card.alert-card {
  background: rgba(255, 193, 7, 0.2);
  border: 1px solid #ffc107;
}

.stat-icon {
  font-size: 2em;
  opacity: 0.8;
}

.stat-info h3 {
  margin: 0;
  font-size: 1.8em;
  color: #4a9eff;
}

.stat-info p {
  margin: 5px 0 0;
  color: #ccc;
  font-size: 13px;
}

.filters-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.filters-form {
  display: flex;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  color: #ccc;
  font-size: 14px;
}

.filter-group select {
  padding: 8px 12px;
  border: 1px solid #444;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.bulk-actions {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.bulk-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ccc;
  cursor: pointer;
}

.selected-count {
  color: #999;
  font-size: 14px;
}

.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 25px;
}

.review-card .review-header {
  margin-bottom: 20px;
}

.review-meta {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.checkbox-container {
  padding-top: 5px;
}

.review-checkbox {
  transform: scale(1.2);
}

.review-info {
  flex: 1;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.star {
  /* color: #444; */
  /* font-size: 20px; */
}

.star.filled {
  /* color: #ffd700; */
}

.rating-number {
  color: #999;
  font-size: 14px;
  margin-left: 5px;
}

.review-details {
  color: #ccc;
  line-height: 1.4;
  font-size: 14px;
}

.featured-badge {
  background: #ffc107;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 10px;
}

.review-status {
  text-align: right;
}

.status-badge {
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: bold;
}

.status-pending {
  background: #ffc107;
  color: black;
}

.status-approved {
  background: #28a745;
  color: white;
}

.status-rejected {
  background: #dc3545;
  color: white;
}

.review-content {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  border-left: 3px solid #4a9eff;
}

.review-content p {
  color: #ccc;
  line-height: 1.5;
  margin: 0;
}

.no-review-text {
  color: #999;
  font-style: italic;
}

.review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.btn-primary {
  background: #007bff;
  color: white;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-warning {
  background: #ffc107;
  color: black;
}

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

.btn:hover {
  opacity: 0.8;
}

.pagination {
  margin-top: 30px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.page-info {
  color: #ccc;
}

.no-reviews {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
}

.no-reviews-icon {
  font-size: 4em;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-reviews h2 {
  color: #fff;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .review-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .filters-form {
    flex-direction: column;
    align-items: stretch;
  }

  .review-meta {
    flex-direction: column;
    gap: 10px;
  }

  .review-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination {
    flex-direction: column;
    gap: 10px;
  }
}

/* ===== site-rating-widget.php ===== */
.site-rating-widget {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #424242;
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.rating-summary {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.average-rating {
  text-align: center;
  min-width: 100px;
}

.rating-number {
  font-size: 2.5em;
  font-weight: bold;
  color: #4a9eff;
  line-height: 1;
}

.rating-stars {
  margin: 8px 0;
}

.rating-stars .star {
  font-size: 60px;
  color: #444;
}

.rating-stars .star.filled {
  color: #ffc107;
}

.rating-count {
  color: #bbb;
  font-size: 13px;
}

.rating-breakdown {
  flex: 1;
  max-width: 250px;
}

.rating-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bar-label {
  color: #aaa;
  font-size: 12px;
  width: 25px;
}

.bar-container {
  flex: 1;
  height: 6px;
  background: #222;
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: #ffc107;
  transition: width 0.3s ease;
}

.bar-count {
  color: #999;
  font-size: 11px;
  width: 25px;
  text-align: right;
}

.user-rating-section {
  border-top: 1px solid #424242;
  padding-top: 20px;
  margin-bottom: 20px;
}

.user-rating-section h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.rating-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.star-rating {
  display: flex;
  gap: 3px;
}

.rating-star {
  font-size: 60px;
  color: #444;
  cursor: pointer;
  transition: color 0.2s ease;
}

.rating-star:hover,
.rating-star.hover,
.rating-star.selected {
  color: #ffc107;
}

.rating-form textarea {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #444;
  border-radius: 6px;
  padding: 10px;
  color: #fff;
  resize: vertical;
  font-family: inherit;
}

.rating-form textarea:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.25);
}

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

.login-prompt {
  border-top: 1px solid #424242;
  padding-top: 20px;
  text-align: center;
  color: #bbb;
}

.login-prompt a {
  color: #4a9eff;
  text-decoration: none;
}

.login-prompt a:hover {
  text-decoration: underline;
}

.reviews-section {
  border-top: 1px solid #424242;
  padding-top: 20px;
}

.reviews-section h3 {
  color: #fff;
  margin-bottom: 15px;
  font-size: 1.1em;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.review-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  border: 1px solid #424242;
}

/* removed duplicate .review-header here; using shared base rule above */
.reviewer-info strong {
  color: #fff;
}

.review-rating .star {
  font-size: 14px;
  color: #444;
}

.review-rating .star.filled {
  color: #ffc107;
}

.review-content {
  color: #ccc;
  line-height: 1.4;
  margin-bottom: 10px;
}

.review-date {
  color: #999;
  font-size: 11px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  transition: opacity 0.3s;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.btn-primary {
  background: #667eea;
  color: white;
}

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

@media (max-width: 768px) {
  .rating-summary {
    flex-direction: column;
    gap: 15px;
  }

  .rating-actions {
    flex-direction: column;
  }
}

/* ===== content-moderation.php ===== */
.moderation-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.moderation-nav {
  display: flex;
  gap: 10px;
}

.mod-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
}

.stat-card h3 {
  font-size: 2em;
  margin: 0;
  color: #4a9eff;
}

.stat-card p {
  margin: 10px 0 0;
  color: #ccc;
}

.section {
  margin-bottom: 40px;
}

.section h2 {
  color: #fff;
  border-bottom: 2px solid #4a9eff;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.review-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.review-info {
  flex: 1;
}

/* removed duplicate .review-header here; using shared base rule above */
.rating-display {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-display .star {
  color: #444;
  font-size: 18px;
}

.rating-display .star.filled {
  color: #ffd700;
}

.rating-number {
  color: #999;
  font-size: 14px;
  margin-left: 5px;
}

.review-meta {
  color: #999;
  font-size: 12px;
}

.review-content {
  color: #ccc;
  margin: 15px 0;
  line-height: 1.4;
}

.review-target {
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.review-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
  align-items: flex-end;
}

.activity-list {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #333;
}

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

.activity-info strong {
  color: #fff;
}

.activity-type {
  color: #999;
  font-size: 12px;
}

.activity-status {
  text-align: right;
}

.status-badge {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
}

.status-approved {
  background: #28a745;
  color: white;
}

.status-rejected {
  background: #dc3545;
  color: white;
}

.status-pending {
  background: #ffc107;
  color: black;
}

.no-pending {
  text-align: center;
  padding: 60px 20px;
  color: #ccc;
}

.no-pending-icon {
  font-size: 4em;
  margin-bottom: 20px;
}

.no-pending h2 {
  color: #fff;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .moderation-header {
    flex-direction: column;
    gap: 15px;
  }

  .review-card {
    flex-direction: column;
    gap: 15px;
  }

  .review-actions {
    flex-direction: row;
    justify-content: flex-start;
  }

  .activity-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}

/* ===== toplist frontpage empty states ===== */
#toplist-wrap .no-sites-message,
#toplist-categories-wrap .no-categories-message {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid #424242;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  color: #ccc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

#toplist-wrap .no-sites-message h2,
#toplist-categories-wrap .no-categories-message h2 {
  color: #fff;
  margin: 0 0 10px 0;
}

#toplist-categories-wrap .no-categories-message .empty-icon {
  font-size: 48px;
  margin-bottom: 10px;
  opacity: 0.8;
}

#toplist-wrap .no-sites-message p,
#toplist-categories-wrap .no-categories-message p {
  color: #bbb;
}

#toplist-categories-wrap .no-categories-message .admin-actions {
  margin-top: 15px;
  text-align: left;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 15px;
}

#toplist-categories-wrap .no-categories-message .admin-actions h3 {
  color: #fff;
  margin: 0 0 10px 0;
}

#toplist-categories-wrap .no-categories-message .setup-steps {
  margin: 0;
  padding-left: 18px;
  color: #ccc;
}

#toplist-categories-wrap .no-categories-message .setup-steps a.btn {
  margin-right: 10px;
}

/* Dark theme for toplist categories */

.toplist-header h1 {
  color: #fff;
}

.toplist-header .toplist-subtitle {
  color: #bbb;
}

.site-rank .rank-number {
  background: #333;
  color: #ddd;
  border-radius: 8px;
  padding: 4px 8px;
}

.site-favicon-link .site-favicon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #424242;
}

.site-info .site-description {
  color: #cfcfcf;
}

.site-meta .added-date {
  color: #9aa1ab;
  font-size: 12px;
}

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

.site-actions .visit-btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  text-decoration: none;
}

.stars .star {
  display: inline-block;
  font-family: BitcountPropSingle;
  position: relative;
  width: 24px;
  height: 24px;
  /* margin-right: 2px; */
}

.stars .star::before {
  /* content: "x"; */
  /* color: #555; */
}

.stars .star.filled::before {
  content: "x";
  color: #ffffff;
  font-size: 39px;
  line-height: 48px;
}

.broadcast-message {
  background: rgba(255, 255, 255, 0.1);
  /* border: 1px solid #dee2e6; */
  border-radius: 5px;
  margin: 15px 0;
  position: relative;
  /* box-shadow: 0 2px 4px rgba(0,0,0,0.1); */
}

.broadcast-content {
  padding: 15px;
}

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

.broadcast-icon {
  font-size: 1.2em;
  margin-right: 8px;
}

.broadcast-title {
  /* color: #333; */
  flex-grow: 1;
}

.broadcast-dismiss {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
}

.broadcast-dismiss:hover {
  background: #e9ecef;
  color: #666;
}

.broadcast-body {
  /* color: #666; */
}

.broadcast-body p {
  margin: 0;
  line-height: 1.4;
  color: #ccc;
}

.broadcast-message {
  margin: 25px auto;
  padding: 15px;
  color: #f0f0f0;
}

@media all and (max-width: 1080px) {
  .metrics-grid {
      grid-template-columns: 1fr 1fr 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media all and (max-width: 768px) {
  .metrics-grid {
      grid-template-columns: 1fr 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

@media all and (max-width: 500px) {
  .metrics-grid {
      grid-template-columns: 1fr;
  }
}