/* =========================================================
   AIoGalaxy Social Tools — Dedicated Master Stylesheet
   File: /socialtools/assets/css/socialtools.css
   ========================================================= */

/* App Shell Layout */
.app-shell {
  display: flex;
  min-height: calc(100vh - 72px);
  position: relative;
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 32px 24px 64px;
}

.page-content {
  max-width: 1040px;
  margin: 0 auto;
}

/* Sidebar Navigation */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(18, 20, 31, 0.4);
  z-index: 90;
  backdrop-filter: blur(2px);
}

.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 95;
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
}

.sidebar-search-box {
  padding: 10px 12px 4px;
  position: relative;
}

.sidebar-search-icon {
  position: absolute;
  left: 22px;
  top: 17px;
  font-size: 11px;
  color: var(--text-muted);
}

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

.sidebar-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 12px 12px 4px;
  margin: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.sidebar-link i {
  width: 16px;
  text-align: center;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: var(--bg-panel-hover);
  color: var(--text-primary);
  font-weight: 600;
}

.sidebar-link.is-active i {
  color: var(--accent-teal);
}

/* Breadcrumbs */
.st-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(18, 20, 31, 0.03);
}

.st-breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.15s ease;
}

.st-breadcrumb a:hover {
  color: var(--accent);
}

.st-breadcrumb i.fa-angle-right {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.5;
}

.st-breadcrumb .st-crumb-active {
  color: var(--accent-teal);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Panels & Cards */
.hero-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  margin-bottom: 32px;
}

.st-hero-desc {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 0;
}

.st-hero-search {
  margin-top: 24px;
  max-width: 520px;
  position: relative;
}

.st-hero-search .field-input {
  padding-left: 44px;
  height: 46px;
}

.st-hero-search-icon {
  position: absolute;
  left: 16px;
  top: 15px;
  font-size: 15px;
  color: var(--text-muted);
}

.st-search-no-res {
  margin-top: 12px;
  font-size: 14px;
  color: #d9534f;
  display: none;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.panel-padding-sm {
  padding: 20px;
}

/* Form Controls */
.st-form-group {
  margin-bottom: 16px;
}

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

.st-form-label {
  display: block;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.st-form-req {
  color: #d9534f;
}

.field-input,
.field-textarea,
.field-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  border-color: var(--accent-teal);
}

/* Grids & Layouts */
.st-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.st-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.st-mb-20 { margin-bottom: 20px; }
.st-mb-16 { margin-bottom: 16px; }
.st-mt-14 { margin-top: 14px; }
.st-mt-18 { margin-top: 18px; }
.st-mt-24 { margin-top: 24px; }
.st-mt-56 { margin-top: 56px; }
.st-mt-60 { margin-top: 60px; }
.st-pt-30 { padding-top: 30px; }
.st-border-top { border-top: 1px solid var(--border); }

.st-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Output Panel Styles */
.st-output-panel {
  min-height: 420px;
  display: flex;
  flex-direction: column;
}

.st-output-panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.st-output-container {
  flex: 1;
}

.st-output-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.st-output-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.st-output-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 110px;
  white-space: pre-wrap;
  word-break: break-word;
}

.st-output-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
}

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

.st-output-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Platform Brand Icon Colors */
.st-brand-yt { color: #FF0000; }
.st-brand-ig { color: #E4405F; }
.st-brand-tk { color: #000000; }
.st-brand-fb { color: #1877F2; }
.st-brand-li { color: #0A66C2; }
.st-brand-x  { color: #14171A; }
.st-brand-pin{ color: #BD081C; }
.st-brand-rd { color: #FF4500; }
.st-brand-dc { color: #5865F2; }
.st-brand-tg { color: #26A5E4; }
.st-brand-qr { color: #A82400; }
.st-brand-th { color: var(--text-primary); }

/* Badges & Buttons */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.badge-neutral {
  background: rgba(11, 13, 26, 0.06);
  color: var(--text-muted);
}

.badge-success {
  background: rgba(11, 124, 100, 0.12);
  color: var(--accent-teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: #c46f1a;
}

.btn-secondary {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-panel-hover);
}

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

.btn-block {
  width: 100%;
}

.btn.is-copied {
  background: var(--accent-teal) !important;
  color: #FFFFFF !important;
  border-color: var(--accent-teal) !important;
}

/* Steps Cards Grid */
.st-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.st-step-card-title {
  margin: 0 0 6px 0;
  font-size: 15px;
}

.st-step-card-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* SEO Article Section */
.st-article {
  margin-top: 56px;
  line-height: 1.8;
}

.st-article-h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.st-article-h3 {
  font-size: 18px;
  margin-top: 24px;
  color: var(--text-primary);
}

.st-article-p {
  font-size: 15px;
  color: var(--text-muted);
}

.st-article-list {
  color: var(--text-muted);
  font-size: 14.5px;
  padding-left: 20px;
}

/* FAQ Items */
.st-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-faq-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}

.st-faq-summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text-primary);
}

.st-faq-answer {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

/* Mobile Topbar */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 72px;
  z-index: 40;
}

.mobile-topbar-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
}

.mobile-menu-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-primary);
}

@media (max-width: 880px) {
  .app-shell {
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
  }
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    transition: left 0.25s ease;
  }
  .sidebar.is-open {
    left: 0;
  }
  .sidebar-backdrop.is-open {
    display: block;
  }
  .mobile-topbar {
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }
  .app-main {
    padding: 20px 16px 48px;
    width: 100%;
    box-sizing: border-box;
  }
  .page-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}