.outblog-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 16px;
  background: #f1f1f1;
  border-left: 4px solid #2271b1;
  border-radius: 4px;
  font-size: 14px;
}

.outblog-loading .spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #2271b1;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 1s linear infinite;
}

.hidden {
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.outblog-settings-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  min-height: 100vh;
  box-sizing: border-box;
}

.outblog-settings-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.outblog-settings-header {
  padding: 2.5rem;
  background: #882aff;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.outblog-settings-header::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: float 20s infinite linear;
}

@keyframes float {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.settings-title {
  margin: 0 0 2rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  color: white;
  z-index: 1;
}

.settings-subtitle {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
}

.outblog-success-notice {
  margin: 2rem 2.5rem 0;
  padding: 0;
  background: none;
  border: none;
}

.notice-content {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 16px;
  position: fixed;
  top: 3rem;
  right: 2rem;
  z-index: 1000;
  align-items: flex-start;
  gap: 1rem;
  font-weight: 500;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
  animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notice-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: white;
}

.notice-subtitle {
  font-size: 0.9rem;
  opacity: 0.9;
}

.settings-form-container {
  padding: 2.5rem;
  background: white;
  border-radius: 0 0 24px 24px;
}

.settings-form {
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.field-group {
  margin-bottom: 2rem;
}

.field-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
  position: relative;
}

.field-label::before {
  content: "";
  margin-right: 0.5rem;
  font-size: 1rem;
}

.field-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.field-input:focus {
  outline: none;
  border-color: #882aff;
  box-shadow: 0 0 0 3px rgba(136, 42, 255, 0.1);
  transform: translateY(-1px);
}

.field-description {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.field-description a {
  color: #882aff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.field-description a:hover {
  color: #7c3aed;
  text-decoration: underline;
}

.save-button {
  background: white;
  border: 2px solid #882aff;
  color: #882aff;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(136, 42, 255, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.save-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(136, 42, 255, 0.1),
    transparent
  );
  transition: left 0.5s;
}

.save-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(136, 42, 255, 0.2);
}

.save-button:hover::before {
  left: 100%;
}

.save-button:active {
  transform: translateY(0);
}

/* Loading state for Save button */
.save-button.is-loading {
  cursor: default;
  opacity: 0.8;
  pointer-events: none;
}

.save-button.is-loading::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(136, 42, 255, 0.25);
  border-top-color: #882aff;
  animation: spin 0.6s linear infinite;
}

.delete-button {
  background: white;
  border: 2px solid #d63638;
  color: #d63638;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.delete-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(214, 54, 56, 0.2), transparent);
  transition: left 0.5s;
}

.delete-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(214, 54, 56, 0.2);
}

.delete-button:hover::before {
  left: 100%;
}

.delete-button:active {
  transform: translateY(0);
}

.sync-button {
  background: linear-gradient(135deg, #882aff 0%, #6b21a8 100%);
  border: none;
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(136, 42, 255, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sync-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.sync-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(136, 42, 255, 0.4);
}

.sync-button:hover::before {
  left: 100%;
}

.sync-button:active {
  transform: translateY(0);
}

.outblog-fetch-btn svg {
  display: inline-block;
  vertical-align: middle;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
  margin: 2rem 0;
  border: none;
}

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

.sync-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #882aff;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sync-title::before {
  content: "";
  font-size: 1.8rem;
}

.sync-description {
  color: #882aff;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.feature-text {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

/* Danger Zone / Reset & Cleanup */
.outblog-danger-zone {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid #e5e7eb;
}

.danger-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #b91c1c;
  margin: 0 0 0.5rem 0;
}

.danger-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0 0 1.75rem 0;
  max-width: 640px;
}

.danger-form {
  margin-top: 0.5rem;
}

.danger-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 14px;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.danger-tab {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.danger-tab:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.danger-tab.is-active {
  background: #ffffff;
  color: #882aff;
  box-shadow: 0 10px 20px rgba(136, 42, 255, 0.12);
}

.danger-tab:focus {
  outline: none;
}

.danger-tab:focus-visible {
  outline: 3px solid rgba(136, 42, 255, 0.25);
  outline-offset: 2px;
}

.danger-options {
  margin-top: 1rem;
}

.danger-option-panel {
  display: none;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  padding: 1.25rem;
}

.danger-option-panel.is-active {
  display: block;
}

.danger-option-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.25rem;
  align-items: start;
}

.danger-option-left {
  padding: 0.75rem 0.5rem 0.5rem 0.5rem;
}

.danger-option-left .danger-card-title {
  color: #111827;
}

.danger-option-right {
  display: flex;
  justify-content: flex-end;
}

.danger-action-card {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.danger-action-header {
  padding: 1rem 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ef4444;
  text-align: center;
  letter-spacing: 0.01em;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom: 1px solid #d1d5db;
}

.danger-action-card.is-soft .danger-action-header {
  background: #ffffff;
}

.danger-action-card.is-warning .danger-action-header {
  background: #ffffff;
}

.danger-action-card.is-destructive .danger-action-header {
  background: #ffffff;
}

.danger-action-body {
  padding: 1rem 1rem 1.1rem 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-top: none;
}

.danger-implications-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ef4444;
  margin: 0 0 0.5rem 0;
}

.danger-implications {
  margin: 0 0 1rem 1.2rem;
  padding: 0;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.55;
}

.danger-implications li {
  margin: 0.3rem 0;
}

.danger-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #7f1d1d;
  margin: 0;
}

.danger-card-description {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 0.75rem 0;
}

.danger-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: #fee2e2;
  color: #b91c1c;
}

.danger-badge.recommended {
  background: #eef2ff;
  color: #4f46e5;
}

.danger-badge.danger {
  background: #fef2f2;
  color: #b91c1c;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.danger-button-soft {
  background: #ffffff;
  color: #ef4444;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.danger-button-soft:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.danger-button-warning {
  background: #ffffff;
  color: #ef4444;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.danger-button-warning:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.danger-button-destructive {
  background: #ffffff;
  color: #ef4444;
  border: 2px solid #e5e7eb;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.danger-button-destructive:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Custom Confirmation Dialog */
.cleanup-confirm-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: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cleanup-confirm-overlay.is-visible {
  opacity: 1;
}

.cleanup-confirm-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 480px;
  width: 90%;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.cleanup-confirm-overlay.is-visible .cleanup-confirm-dialog {
  transform: scale(1);
}

.cleanup-confirm-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-bottom: 1px solid #fecaca;
}

.cleanup-confirm-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.cleanup-confirm-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #991b1b;
}

.cleanup-confirm-body {
  padding: 1.5rem;
}

.cleanup-confirm-message {
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
  color: #374151;
  font-size: 0.95rem;
}

.cleanup-confirm-message strong {
  color: #991b1b;
}

.cleanup-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.cleanup-confirm-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  min-width: 100px;
}

.cleanup-confirm-cancel {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.cleanup-confirm-cancel:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.cleanup-confirm-proceed {
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.cleanup-confirm-proceed:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.cleanup-confirm-warning {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.cleanup-confirm-destructive {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.cleanup-confirm-destructive:hover {
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.5);
}

@media (max-width: 640px) {
  .cleanup-confirm-dialog {
    width: 95%;
    margin: 1rem;
  }
  
  .cleanup-confirm-header {
    padding: 1rem;
  }
  
  .cleanup-confirm-body {
    padding: 1rem;
  }
  
  .cleanup-confirm-actions {
    flex-direction: column;
  }
  
  .cleanup-confirm-btn {
    width: 100%;
  }
}

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

  .danger-option-right {
    justify-content: stretch;
  }
}

@media (max-width: 768px) {
  .outblog-settings-container {
    padding: 1rem;
  }

  .outblog-settings-header {
    padding: 2rem 1.5rem;
  }

  .settings-title {
    font-size: 2rem;
  }

  .settings-form-container {
    padding: 2rem 1.5rem;
  }

  .settings-form,
  .sync-info-section {
    padding: 1.5rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}
