/* Path of Exile 2 Regex - Custom Design System & CSS */

:root {
  --bg-dark: #0b0e14;
  --bg-card: #141a24;
  --bg-card-hover: #1c2432;
  --bg-panel: #18202d;
  --border-color: #273447;
  --border-focus: #3b82f6;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --accent-poe: #e5a93b;
  --accent-poe-hover: #f5b94c;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #60a5fa;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  
  --sidebar-width: 240px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Thai", sans-serif;
  --font-code: "JetBrains Mono", Fira Code, Consolas, Monaco, monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Layout */
#app {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: #0d1118;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  flex-shrink: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding-left: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent-poe);
  line-height: 1.2;
}

.brand-domain {
  font-size: 11px;
  color: #3b82f6;
  font-family: var(--font-code);
  font-weight: 600;
}

.brand svg {
  width: 26px;
  height: 26px;
  fill: var(--accent-poe);
}

.nav-badge {
  font-size: 10px;
  font-weight: 700;
  background-color: rgba(229, 169, 59, 0.2);
  color: var(--accent-poe);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 8px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-item a:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active a {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border-left: 3px solid var(--accent-blue);
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-dark);
  padding: 24px 32px;
}

/* Header & Controls */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.profile-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.profile-last-saved {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.8;
  margin-left: 6px;
}

.btn-icon-only {
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

select.form-select {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
}
select.form-select:focus {
  border-color: var(--accent-blue);
}

/* Language Toggle Switch */
.lang-toggle-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lang-btn:hover:not(.active) {
  color: var(--text-main);
  background-color: var(--bg-card-hover);
}

/* Action Buttons */
.action-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: #10b981;
  color: #fff;
}
.btn-primary:hover {
  background-color: #059669;
}

.btn-purple {
  background-color: #8b5cf6;
  color: #fff;
}
.btn-purple:hover {
  background-color: #7c3aed;
}

.btn-teal {
  background-color: #0d9488;
  color: #fff;
}
.btn-teal:hover {
  background-color: #0f766e;
}

.btn-secondary {
  background-color: #ef4444;
  color: #fff;
}
.btn-secondary:hover {
  background-color: #dc2626;
}

.btn-accent {
  background-color: var(--accent-blue);
  color: #fff;
}
.btn-accent:hover {
  background-color: var(--accent-blue-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}
.btn-outline:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

/* Code Output Box */
.output-box-container {
  background-color: #080b10;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.regex-output {
  font-family: var(--font-code);
  font-size: 16px;
  color: var(--accent-poe);
  word-break: break-all;
  min-height: 48px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.output-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.length-meter {
  font-weight: 600;
}

.length-meter.warning {
  color: var(--accent-red);
}

/* Options Collapsible & Settings */
.options-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px 8px 0 0;
}

.options-title {
  font-weight: 600;
  color: var(--text-main);
}

.options-toggles {
  display: flex;
  gap: 20px;
  align-items: center;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox input[type="checkbox"],
.custom-radio input[type="radio"] {
  accent-color: var(--accent-blue);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.options-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 20px;
  margin-bottom: 24px;
}

/* Grid Layouts for Controls */
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.group-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
}

.input-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.input-label {
  font-size: 13px;
  color: var(--text-muted);
}

.num-input {
  width: 70px;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
  outline: none;
}
.num-input:focus {
  border-color: var(--accent-blue);
}

/* Checkbox Grid */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Custom Text Inputs */
.custom-text-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.text-input {
  flex: 1;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 6px;
  outline: none;
}
.text-input:focus {
  border-color: var(--accent-blue);
}

/* Dual Column Mod Selector */
.mod-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.mod-box {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.mod-box-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-poe);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  background-color: var(--bg-card);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.mod-scroll-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 6px;
}

.mod-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background-color: var(--bg-card);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.mod-item:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-color);
}

.mod-item.selected {
  background-color: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.4);
}

.mod-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
}

.mod-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--accent-green);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  z-index: 1000;
  display: none;
  animation: slideUp 0.3s ease;
}

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

/* Notice Box */
.notice-box {
  background-color: rgba(229, 169, 59, 0.1);
  border-left: 3px solid var(--accent-poe);
  color: #fcd34d;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 12px;
  margin-top: 14px;
}

/* Global Top Language Switcher Bar */
.top-bar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.domain-pill {
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-poe);
  background-color: rgba(229, 169, 59, 0.15);
  border: 1px solid rgba(229, 169, 59, 0.4);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

/* Page Views */
.page-view {
  animation: fadeIn 0.25s ease-in-out;
}

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

/* Home Hero Section */
.home-hero {
  text-align: center;
  padding: 40px 20px;
  background: radial-gradient(circle at center, rgba(59, 130, 246, 0.08) 0%, rgba(13, 17, 24, 0) 70%);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 36px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.logo-wrapper {
  display: inline-block;
  margin-bottom: 16px;
}

.glowing-logo {
  filter: drop-shadow(0 0 20px rgba(245, 185, 76, 0.4));
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
  0% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(245, 185, 76, 0.3)); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 30px rgba(0, 243, 255, 0.6)); }
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-poe) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 28px auto;
  line-height: 1.6;
}

/* Discord CTA Button */
.btn-discord {
  background-color: #5865F2;
  color: #ffffff;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(88, 101, 242, 0.4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.btn-discord:hover {
  background-color: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(88, 101, 242, 0.6);
}

.discord-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 14px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.feature-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--accent-blue);
  transform: translateY(-3px);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-poe);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.launch-cat-btn {
  margin-top: auto;
  width: 100%;
}

/* Mod Search Wrapper & Clear Button */
.mod-search-wrapper {
  position: relative;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.mod-search-wrapper .search-icon {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  fill: var(--text-dim);
  pointer-events: none;
}

.mod-search-input {
  width: 100%;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 32px 8px 32px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: all 0.15s ease;
}

.mod-search-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.clear-search-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
  transition: color 0.15s ease;
}
.clear-search-btn:hover {
  color: var(--text-main);
}

/* Search Highlight (Yellow Overlay) */
mark.search-highlight {
  background-color: #facc15;
  color: #0d1118;
  font-weight: 700;
  padding: 0 3px;
  border-radius: 3px;
  box-shadow: 0 0 4px rgba(250, 204, 21, 0.4);
}

/* Inline Numeric Mod Input */
.mod-num-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  background-color: rgba(0, 0, 0, 0.25);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.mod-num-label {
  font-size: 11px;
  color: var(--accent-poe);
  font-weight: 600;
}

.mod-num-input {
  width: 55px;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  outline: none;
}

.mod-num-input:focus {
  border-color: var(--accent-blue);
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-panel);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-poe);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.import-textarea {
  width: 100%;
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--accent-poe);
  font-family: var(--font-code);
  font-size: 13px;
  padding: 12px;
  border-radius: 8px;
  outline: none;
  resize: vertical;
  line-height: 1.6;
}
.import-textarea:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  background-color: var(--bg-panel);
  border-top: 1px solid var(--border-color);
}

/* Coming Soon View */
.coming-soon-container {
  text-align: center;
  padding: 60px 24px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 620px;
  margin: 40px auto;
  box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.coming-soon-icon {
  font-size: 56px;
  margin-bottom: 20px;
  animation: pulseIcon 2s infinite ease-in-out;
}

@keyframes pulseIcon {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.coming-soon-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent-poe);
  margin-bottom: 14px;
}

.coming-soon-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

/* CMS & Guides Layout */
.guides-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.cms-admin-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-badge {
  background-color: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.post-status-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.post-status-tag.published {
  background-color: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.post-status-tag.draft {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.article-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-poe);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  background-color: var(--bg-dark);
}

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

.card-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

.article-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.card-admin-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

/* Article Detail View */
.article-detail-container {
  max-width: 850px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
}

.article-detail-header {
  margin-bottom: 24px;
}

.article-detail-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-poe);
  margin-bottom: 12px;
  line-height: 1.3;
}

.article-detail-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.article-detail-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 28px;
}

.article-content-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-main);
}

.article-content-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-poe);
  margin: 28px 0 14px;
}

.article-content-body p {
  margin-bottom: 18px;
}

.article-content-body figure {
  margin: 24px 0;
  text-align: center;
}

.article-content-body figure img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.article-content-body figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}

/* AI CMS Generator Panel & Block Editor */
.ai-generator-card {
  background-color: var(--bg-card);
  border: 1px dashed var(--accent-blue);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.ai-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-blue);
  margin-bottom: 16px;
}

.model-info-card {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 13px;
}

.model-info-header {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}

.model-rating-badge {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.model-type-badge {
  background-color: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}

.model-desc {
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

.image-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background-color: var(--bg-dark);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  margin-top: 14px;
}

.image-dropzone:hover, .image-dropzone.dragover {
  border-color: var(--accent-blue);
  background-color: rgba(59, 130, 246, 0.08);
}

.thumbnails-preview-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.thumb-item {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

.thumb-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
}

/* Editor Blocks Container */
.editor-blocks-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.block-item {
  background-color: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  transition: border-color 0.2s ease;
}

.block-item:hover {
  border-color: var(--accent-blue);
}

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

.block-type-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-poe);
}

.block-controls {
  display: flex;
  gap: 6px;
}

.block-ctrl-btn {
  background-color: var(--bg-panel);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.block-ctrl-btn:hover {
  background-color: var(--border-color);
}

.block-ctrl-btn.delete:hover {
  background-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.block-input {
  width: 100%;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.block-input:focus {
  border-color: var(--accent-blue);
}

.heading-input {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-poe);
}

.editor-block-img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 10px;
  display: block;
}

.empty-blocks-notice {
  text-align: center;
  padding: 40px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s infinite linear;
}

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

/* ==========================================================================
   CYBERNETIC 3D NEURAL CANVAS & BRAIN HUB STYLES
   ========================================================================== */

.neural-canvas-wrapper {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.9) 0%, rgba(2, 6, 23, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.15);
}

.neural-overlay-badge {
  position: absolute;
  top: 14px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 6px 14px;
  border-radius: 20px;
  font-family: var(--font-code);
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.live-ping-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pingPulse 1.5s infinite ease-in-out;
}

@keyframes pingPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.stat-card.cyber-stat {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-card.cyber-stat:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent-poe);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.25);
}





