/* AIGC 子页 — 配色与主页 styles.css 变量一致 */

.ag-subpage {
  min-height: 100vh;
  background: var(--bg);
}

.ag-top {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  background: var(--bg);
  backdrop-filter: none;
  border-bottom: 1px solid var(--border);
}

.ag-top-inner {
  width: min(1280px, 100% - 32px);
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: nowrap;
  padding: 0.35rem 0;
}

.ag-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.ag-logo:hover {
  text-decoration: none;
}

.ag-logo-mark {
  width: 10px;
  height: 28px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: none;
}

.ag-logo-text {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ag-nav-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.ag-nav {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.35rem;
  max-width: min(820px, 100%);
  margin-inline: auto;
}

.ag-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.ag-nav-ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.85;
}

.ag-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  box-shadow: none;
}

.ag-nav a.is-active {
  color: #061426;
  background: #ffffff;
  border-color: #ffffff;
  text-decoration: none;
  box-shadow: none;
}

.ag-login {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}

.ag-login:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
}

.ag-login:focus-visible,
.ag-nav a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.ag-shell {
  position: relative;
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
  isolation: isolate;
}

.ag-shell::before,
.ag-shell::after {
  content: none;
}

.ag-hero {
  text-align: center;
  padding: 0.5rem 0 1.75rem;
}

.ag-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.ag-hero > p {
  margin: 0 auto 1.25rem;
  max-width: 36rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.ag-modes {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.ag-modes button {
  padding: 0.45rem 1.2rem;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ag-modes button.is-on {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: none;
}

.ag-modes button:not(.is-on) {
  border: 1px solid var(--border);
  background: var(--surface);
}

.ag-modes button:not(.is-on):hover {
  border-color: var(--accent-border-35);
  color: var(--text);
}

.ag-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-width: 920px;
  margin: 0 auto;
}

.ag-card-pad {
  padding: 1.35rem 1.5rem 1.5rem;
}

.ag-card-head {
  margin-bottom: 1.1rem;
}

.ag-card-head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.ag-card-head .ag-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.ag-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

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

.ag-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.ag-field label .ag-req {
  color: var(--warning);
  margin-left: 0.15rem;
}

.ag-input,
.ag-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-elevated);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ag-input::placeholder,
.ag-textarea::placeholder {
  color: #64748b;
}

.ag-input:focus,
.ag-textarea:focus {
  outline: none;
  border-color: var(--accent-border-35);
  box-shadow: 0 0 0 3px var(--accent-fill-12);
}

.ag-content-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.ag-content-bar .ag-lab label {
  margin-bottom: 0.15rem;
  color: var(--text-muted);
}

.ag-content-bar .ag-sub {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.9;
}

.ag-count {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-bright);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-fill-10);
  border: 1px solid var(--accent-border-28);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.12);
}

.ag-textarea {
  min-height: 240px;
  padding: 0.85rem 1rem;
  font-size: 0.92rem;
  line-height: 1.65;
  resize: vertical;
}

.ag-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.ag-notes-block {
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px dashed rgba(56, 189, 248, 0.2);
}

.ag-notes-block h3 {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.ag-notes-block ul {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.ag-notes-block li {
  margin-bottom: 0.4rem;
}

.ag-notes-block li:last-child {
  margin-bottom: 0;
}

.ag-banner {
  max-width: 920px;
  margin: 1.25rem auto 0;
  padding: 0.65rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  background: var(--accent-fill-08);
  border: 1px dashed var(--accent-border-28);
  border-radius: var(--radius-sm);
}

.ag-banner strong {
  color: var(--accent-bright);
}

.ag-float {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
}

.ag-float-inner {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.55rem 0.45rem 0.55rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}

.ag-float-inner button {
  min-width: 3rem;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
}

.ag-float-inner button:hover {
  border-color: var(--accent-border-35);
  color: var(--accent-bright);
  background: var(--accent-fill-10);
}

#toast[hidden] {
  display: none !important;
}

.ag-toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.65rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 200;
  max-width: 90%;
  text-align: center;
}

@media (max-width: 900px) {
  .ag-top-inner {
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    padding: 0.5rem 0;
  }

  .ag-nav-wrap {
    order: 3;
    flex: 1 1 100%;
  }
}
.ag-channel-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.ag-channel-head {
  margin-bottom: 1.5rem;
}

.ag-channel-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
}

.ag-channel-head p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.7;
}

.ag-channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ag-channel-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 280px;
  padding: 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
}

.ag-channel-card h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.ag-channel-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.74);
}

.ag-channel-note {
  padding: 0.72rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.6;
}

.ag-channel-note strong {
  color: #ffffff;
}

.ag-channel-url {
  margin-top: auto;
  padding: 0.62rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ag-channel-btn {
  display: block;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: #ffffff;
  color: #061426;
  text-align: center;
  font-weight: 800;
  text-decoration: none;
}

.ag-channel-btn:hover {
  background: #e8eef7;
  text-decoration: none;
}

@media (max-width: 1100px) {
  .ag-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.ag-logo-img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}