/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0c;
    --bg-secondary: #121214;
    --bg-card: #16161a;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --success: #22c55e;
    --border: #27272a;
    --radius: 12px;
    --radius-lg: 16px;
}

[data-theme="light"] .executors-title {
    background: linear-gradient(135deg, #0f172a 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --accent-glow: rgba(168, 85, 247, 0.25);
}

[data-theme="light"] body {
    background-image: 
        linear-gradient(rgba(148, 163, 184, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Cursor light – wie kleine Highlights im Bild, lila, ohne schwarzen Punkt */
.cursor-light {
    position: fixed;
    width: 1px;
    height: 1px;
    border-radius: 50%;
    background: transparent;
    opacity: 0;
    left: 0;
    top: 0;
    box-shadow: 0 0 80px 45px rgba(168, 85, 247, 0.5), 0 0 140px 70px rgba(168, 85, 247, 0.3), 0 0 200px 100px rgba(168, 85, 247, 0.15);
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    will-change: left, top;
}

.cursor-light.cursor-light--behind {
    z-index: 0;
}

.btn, .script-card, .header, .app-frame, img, .executors-banner {
    position: relative;
    z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
    .cursor-light { display: none !important; }
}

/* Focus visible for keyboard nav */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Skip Link (Accessibility) ===== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: white;
    border-radius: var(--radius);
    font-size: 0.9rem;
    text-decoration: none;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 1rem;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    background-image: 
        linear-gradient(rgba(39, 39, 42, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(39, 39, 42, 0.3) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.75rem;
    max-width: 1200px;
    margin: 1rem auto 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
    animation: headerSlideDown 0.5s ease-out;
}

.header:hover {
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25), 0 0 40px rgba(168, 85, 247, 0.06);
}

.header .logo {
    flex-shrink: 0;
}

.header .header-actions {
    flex-shrink: 0;
}

@keyframes headerSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    letter-spacing: 0.05em;
    line-height: 1.8;
    padding: 0.3em 0;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 28px var(--accent-glow);
}

.logo-braces {
    opacity: 0.9;
}

.logo-v {
    font-weight: 600;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
}

.nav-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease, transform 0.25s ease;
}

.nav a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav a.nav-active {
    color: var(--accent);
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-discord {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-discord {
    transition: background 0.25s ease, transform 0.25s ease;
}

.btn-discord:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: #7c3aed;
    box-shadow: 0 0 20px var(--accent-glow);
}

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

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
}

.btn-auth:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-google:hover { border-color: #ea4335; }

/* Auth modal tabs & forms */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.auth-tab-btn {
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.auth-tab-btn:hover { color: var(--text-primary); }
.auth-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-tabs.hidden { display: none; }
.auth-form label { display: block; margin-top: 1rem; margin-bottom: 0.25rem; font-size: 0.9rem; }
.auth-form input[type="text"],
.auth-form input[type="password"] { width: 100%; padding: 0.6rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); }
.auth-form .btn { margin-top: 1rem; }
.auth-checkbox-wrap { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
.auth-checkbox-wrap input { margin: 0; }
.auth-hint { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 0.25rem; }
.auth-hint-ok { color: var(--success); }
.auth-hint-error { color: #a855f7; }

/* User settings profile preview */
.settings-profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.settings-preview-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
}
.settings-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.settings-preview-info { flex: 1; min-width: 0; }
.settings-preview-username { font-weight: 600; font-size: 1rem; margin-bottom: 0.15rem; }
.settings-preview-display,
.settings-preview-joined { font-size: 0.875rem; color: var(--text-secondary); margin: 0.15rem 0; }
.settings-preview-domain-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}
.settings-login-hint { color: var(--text-secondary); font-size: 0.9rem; margin-top: 1rem; }

.settings-main-tabs { display: flex; gap: 0; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.settings-main-tab { padding: 0.6rem 1rem; background: none; border: none; color: var(--text-secondary); cursor: pointer; font-family: inherit; font-size: 0.95rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.settings-main-tab:hover { color: var(--text-primary); }
.settings-main-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.settings-tab-content { display: none; }
.settings-tab-content.active { display: block; }

.auth-user-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.auth-avatar-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.auth-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-avatar-placeholder {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
}

.auth-guest-wrap .auth-guest-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
}

.auth-guest-wrap .auth-user-name {
    color: var(--text-muted);
}

.auth-user-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    color: #a855f7;
    border-color: #a855f7;
}

.discord-icon {
    flex-shrink: 0;
}

/* ===== Hero Section ===== */
.hero {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem 5rem;
    text-align: center;
    animation: heroFadeIn 0.6s ease-out;
}

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

.hero-brand {
    font-family: inherit;
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow);
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
    line-height: 1.8;
    padding: 0.4em 0.5em;
    display: inline-block;
    animation: brandPulse 3s ease-in-out infinite;
}

@keyframes brandPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 12px var(--accent-glow); }
    50% { opacity: 0.9; text-shadow: 0 0 20px var(--accent-glow); }
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-rotating {
    color: var(--accent);
    text-shadow: 0 0 16px var(--accent-glow);
}

.hero-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.hero-buttons .btn-hero-cta {
    min-width: 120px;
    text-align: center;
}

.btn-hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 16px var(--accent-glow);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    margin-right: 1.25rem;
    margin-bottom: 0.5rem;
}

.btn-hero-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-hero-cta:active {
    transform: translateY(-1px) scale(1);
}

.hero-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid var(--accent);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
}

.hero-showcase {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
    opacity: 0;
    animation: heroShowcaseFadeIn 0.9s ease 0.3s forwards;
}

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

.app-frame {
    flex-shrink: 0;
    max-width: 380px;
    min-height: 220px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.app-frame-red {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.4), 0 0 50px rgba(168, 85, 247, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease;
}

.app-frame-red:hover {
    box-shadow: 0 0 35px rgba(168, 85, 247, 0.55), 0 0 70px rgba(168, 85, 247, 0.3), 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-frame-placeholder {
    display: none;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.app-frame.no-img .app-frame-img { display: none !important; }
.app-frame.no-img .app-frame-placeholder { display: flex; align-items: center; justify-content: center; min-height: 200px; }

.hero-showcase-text {
    flex: 1;
    min-width: 240px;
}

.hero-showcase-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.hero-showcase-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.hero-showcase-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-showcase-stat {
    padding: 0.6rem 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
    line-height: 1.5;
}

.hero-showcase-stat strong {
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .hero-showcase { flex-direction: column; align-items: stretch; }
    .app-frame { max-width: none; }
}

.app-frame-img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: top;
}

.hero-enhanced {
    position: relative;
}
.index-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.trending-corner {
    flex-shrink: 0;
    width: 240px;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin: 0;
}

.trending-corner h2 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.trending-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.trending-card { display: block; padding: 0.6rem 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.2s; }
.trending-card:hover { border-color: var(--accent); transform: translateX(4px); }
.trending-title { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.15rem; }
.trending-meta { font-size: 0.75rem; color: var(--text-muted); }
.trending-empty { color: var(--text-muted); font-size: 0.9rem; }
.trending-empty a { color: var(--accent); }

.activity-feed-title { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
.activity-feed { display: flex; flex-direction: column; gap: 0.4rem; }
.activity-item { font-size: 0.8rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.activity-text { color: var(--text-secondary); }
.activity-time { color: var(--text-muted); font-size: 0.7rem; display: block; margin-top: 0.15rem; }
.activity-empty { font-size: 0.85rem; color: var(--text-muted); }

.script-trust { font-size: 0.85rem; padding: 0.2rem 0.5rem; border-radius: var(--radius); }
.script-trust.trust-high { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.script-trust.trust-medium { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.script-trust.trust-low { background: rgba(168, 85, 247, 0.2); color: #a855f7; }

.creator-dashboard-single > * + * { margin-top: 2rem; }
.creator-stats-overview { margin-bottom: 2rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.creator-stat-card { padding: 1.25rem; background: var(--bg-secondary); border-radius: var(--radius); text-align: center; border: 1px solid var(--border); }
.creator-stat-card > span:first-child { display: block; font-size: 1.75rem; font-weight: 700; color: var(--accent); }
.creator-stat-label { font-size: 0.85rem; color: var(--text-secondary); }
.creator-recent { margin-top: 1.5rem; }
.creator-recent h3, .creator-reports h3, .creator-users-section h3, .creator-banned-section h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.creator-recent-list { max-height: 280px; overflow-y: auto; }
.creator-recent-item { padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.creator-recent-item:last-child { border-bottom: none; }
.creator-quick-actions { margin-bottom: 1rem; }
.creator-quick-ban { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.creator-quick-input { padding: 0.5rem 0.75rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-secondary); color: var(--text-primary); font-size: 0.95rem; min-width: 180px; }
.creator-user-card, .creator-banned-card { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; background: var(--bg-secondary); border-radius: var(--radius); margin-bottom: 0.5rem; border: 1px solid var(--border); }
.creator-user-actions { display: flex; gap: 0.5rem; }
.creator-user-badge { font-size: 0.75rem; padding: 0.2rem 0.5rem; border-radius: var(--radius); }
.creator-badge-banned { background: rgba(168,85,247,0.2); color: #a855f7; }
.creator-badge-timeout { background: rgba(245,158,11,0.2); color: #f59e0b; }
.creator-badge-warn { background: rgba(245,158,11,0.2); color: #f59e0b; }
.creator-user-info { display: flex; flex-direction: column; gap: 0.15rem; }
.creator-user-name { font-weight: 500; }
.creator-user-username { font-size: 0.85rem; color: var(--text-secondary); }
.creator-banned-card .creator-banned-name { font-weight: 500; }
.creator-hint, .creator-empty-msg { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1rem; }
.creator-stats { margin-bottom: 2rem; margin-top: 1.5rem; }
.creator-stats h2, .creator-stats h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.creator-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 1rem; }
.creator-stat { padding: 1rem; background: var(--bg-secondary); border-radius: var(--radius); text-align: center; }
.creator-stat > span { display: block; font-size: 1.5rem; font-weight: 700; color: var(--accent); }

.index-main { flex: 1; min-width: 0; }

.hero-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(168, 85, 247, 0.08), transparent 60%);
    pointer-events: none;
}

.feature-glass {
    background: rgba(22, 22, 26, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.hero-buttons .btn-secondary {
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.hero-buttons .btn-secondary:hover {
    background: var(--border);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.typed-cursor {
    color: var(--accent);
    animation: blink 0.7s step-end infinite;
}

.typed-cursor.done {
    animation: none;
    opacity: 0;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.hero-credit {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hero-credit::before,
.hero-credit::after {
    content: '';
    flex: 1;
    max-width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border));
}

.hero-credit::after {
    background: linear-gradient(90deg, var(--border), transparent);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.hero-buttons .btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed, var(--accent));
    box-shadow: 0 6px 24px var(--accent-glow);
    transform: translateY(-2px);
}

/* ===== Feature Cards ===== */
.features {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: featuresFadeIn 0.6s ease-out 0.2s backwards;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    animation: cardFadeIn 0.5s ease-out backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(168, 85, 247, 0.3);
}

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

.feature-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-stats {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* ===== Creator Page ===== */
.creator-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

.creator-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.creator-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.creator-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.creator-reports h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.report-script-id {
    font-weight: 500;
    color: var(--accent);
}

.report-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.btn-report-action {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius);
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
}

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

.btn-report-ignore {
    border-color: var(--text-muted);
    color: var(--text-muted);
}

.btn-report-ignore:hover {
    background: rgba(161, 161, 170, 0.15);
}

.btn-report-delete:hover {
    border-color: var(--text-muted);
}

.btn-report-timeout {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-report-ban { color: #a855f7; border-color: #a855f7; }
.btn-report-ban:hover { background: rgba(168, 85, 247, 0.2); }
.btn-report-timeout:hover {
    background: rgba(168, 85, 247, 0.15);
}

.btn-report-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.btn-report-dismiss:hover {
    color: #a855f7;
}

.report-body p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.report-body p:last-child {
    margin-bottom: 0;
}

.reports-empty {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== Help Page ===== */
.help-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.help-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.help-hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(168, 85, 247, 0.08));
    border: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.help-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
}

.help-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

.help-steps-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.help-step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    animation: helpStepIn 0.5s ease both;
}

.help-step-card:nth-child(1) { animation-delay: 0.05s; }
.help-step-card:nth-child(2) { animation-delay: 0.1s; }
.help-step-card:nth-child(3) { animation-delay: 0.15s; }
.help-step-card:nth-child(4) { animation-delay: 0.2s; }

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

.help-step-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.15);
}

.help-step-num {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
}

.help-step-card h3 {
    font-size: 1.15rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.help-step-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.help-step-card a {
    color: var(--accent);
    text-decoration: none;
}

.help-step-card a:hover {
    text-decoration: underline;
}

.help-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.help-link-card {
    flex: 1;
    min-width: 160px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.help-link-card:hover {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
}

.help-link-icon {
    font-size: 1.5rem;
}

.logo {
    text-decoration: none;
}

/* ===== Executors Page ===== */
.executors-section {
    max-width: 720px;
}

.executors-hero {
    margin-bottom: 2rem;
}

.executors-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.executors-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 480px;
}

.executors-banner {
    margin-top: 0;
    margin-bottom: 2rem;
}

.executors-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 50%);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.executors-banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ef4444;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

.executors-banner-desc {
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.btn-executors-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white !important;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 4px 16px rgba(239, 68, 68, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-executors-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.5), 0 6px 20px rgba(239, 68, 68, 0.3);
}

@media (max-width: 600px) {
    .executors-banner-inner { flex-direction: column; text-align: center; }
}

.executors-list-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.executors-strips {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0;
    overflow: visible;
}

.executor-item {
    animation: executorItemIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.executor-item:nth-child(1) { animation-delay: 0.03s; }
.executor-item:nth-child(2) { animation-delay: 0.06s; }
.executor-item:nth-child(3) { animation-delay: 0.09s; }
.executor-item:nth-child(4) { animation-delay: 0.12s; }
.executor-item:nth-child(5) { animation-delay: 0.15s; }
.executor-item:nth-child(6) { animation-delay: 0.18s; }
.executor-item:nth-child(7) { animation-delay: 0.21s; }
.executor-item:nth-child(8) { animation-delay: 0.24s; }
.executor-item:nth-child(9) { animation-delay: 0.27s; }
.executor-item:nth-child(10) { animation-delay: 0.3s; }
.executor-item:nth-child(11) { animation-delay: 0.33s; }

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

.executor-strip {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80px;
    padding: 1.15rem 1.25rem 1.15rem 0.6rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.executor-strip::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #a78bfa, #7c3aed);
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: 0 0 25px 4px rgba(168, 85, 247, 0.9), 0 0 50px 12px rgba(168, 85, 247, 0.6), 0 0 80px 25px rgba(168, 85, 247, 0.35);
    transition: box-shadow 0.25s ease;
}

.executor-strip:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.executor-strip:hover::before {
    box-shadow: 0 0 35px 6px rgba(168, 85, 247, 1), 0 0 70px 20px rgba(168, 85, 247, 0.8), 0 0 110px 40px rgba(168, 85, 247, 0.5);
}

.executor-strip {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    cursor: pointer;
}

.executor-chevron {
    font-size: 0.75rem;
    opacity: 0.7;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.executor-strip[aria-expanded="true"] .executor-chevron {
    transform: rotate(180deg);
}

.executor-strip-left {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.executor-menu-wrap {
    position: relative;
}

.executor-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.05em;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.executor-menu-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

.executor-menu-btn:active {
    transform: scale(0.98);
}

.executor-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 140px;
    padding: 0.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 100;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.executor-item--dropdown-open {
    position: relative;
    z-index: 10;
}

.executor-dropdown:not([hidden]).is-open {
    opacity: 1;
    transform: translateY(0);
}

.executor-dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, padding-left 0.2s ease;
}

.executor-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    padding-left: 1rem;
}

.executor-item {
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.25s ease;
}

.executor-item:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(168, 85, 247, 0.15);
}

.executor-detail {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(22, 22, 26, 0.95) 100%);
    border: 1px solid transparent;
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.3s ease, border-color 0.25s ease;
}

.executor-detail.is-expanded {
    max-height: 120px;
    opacity: 1;
    padding: 1.1rem 1.5rem;
    border-color: var(--border);
}

.btn-executor-website {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.35rem;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 999px;
    color: #c4b5fd;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-executor-website:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}

/* ===== About Page ===== */
.about-section {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.about-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.about-hero-avatar {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(168, 85, 247, 0.1));
    border: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.4), 0 0 50px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.about-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
}

.about-tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0;
}

.about-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.about-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    animation: aboutCardIn 0.5s ease both;
}

.about-feature-card:nth-child(1) { animation-delay: 0.05s; }
.about-feature-card:nth-child(2) { animation-delay: 0.1s; }
.about-feature-card:nth-child(3) { animation-delay: 0.15s; }
.about-feature-card:nth-child(4) { animation-delay: 0.2s; }

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

.about-feature-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.15);
    transform: translateY(-2px);
}

.about-feature-icon {
    font-size: 1.75rem;
    display: block;
    margin-bottom: 0.75rem;
}

.about-feature-card h3 {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.about-feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.about-block {
    margin-bottom: 2rem;
}

.about-heading {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.about-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin: 0 0 1rem 0;
}

.about-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.about-cta-btn {
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.25);
}

.about-cta-btn:hover {
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
}

[data-theme="light"] .about-title,
[data-theme="light"] .help-title {
    background: linear-gradient(135deg, #0f172a 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ===== Scripts Page ===== */
.scripts-main {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
}

.scripts-header {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.scripts-profile-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.scripts-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(168, 85, 247, 0.1));
    border: 2px solid rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4), 0 0 40px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    transition: box-shadow 0.25s ease;
}

.scripts-profile-section:hover .scripts-profile-avatar {
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.6), 0 0 55px rgba(168, 85, 247, 0.3);
}

.scripts-profile-text {
    flex: 1;
}

.scripts-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.15rem 0;
}

.scripts-public {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.scripts-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.scripts-tab-wrapper {
    position: relative;
    z-index: 1;
}

.tab-btn {
    background: none;
    border: none;
    pointer-events: auto;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.6rem 1.25rem;
    position: relative;
    transition: color 0.25s ease, transform 0.2s ease;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--text-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.6);
    border-radius: 2px 2px 0 0;
    animation: tabUnderline 0.35s ease forwards;
}

@keyframes tabUnderline {
    from {
        opacity: 0;
        transform: scaleX(0.8);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

.scripts-actions {
    margin-top: 1rem;
}

.scripts-toolbar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.scripts-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.scripts-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.6;
    pointer-events: none;
}

.scripts-search {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.scripts-search:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

.scripts-sort {
    padding: 0.65rem 1.25rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.scripts-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.scripts-empty-hint {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.btn-theme {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-theme:hover {
    background: var(--border);
    transform: scale(1.05);
}

.btn-settings-gear {
    color: var(--text-primary);
}

.btn-settings-gear svg {
    display: block;
    stroke-width: 2.25;
}

/* Site Settings Modal */
.modal-content-wide {
    max-width: 480px;
}

.modal-content-narrow {
    max-width: 380px;
}

.modal-content-form {
    max-width: 480px;
}

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

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

.btn-danger:hover {
    background: #b91c1c;
}

.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section h3 {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
}

.setting-row label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.setting-row select {
    padding: 0.4rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 120px;
}

/* Font sizes */
.font-small { font-size: 14px; }
.font-medium { font-size: 16px; }
.font-large { font-size: 18px; }

.font-small .script-code,
.font-small .comment-text { font-size: 0.8rem; }
.font-large .script-code,
.font-large .comment-text { font-size: 0.95rem; }

/* Border radius */
.radius-small { --radius: 6px; --radius-lg: 8px; }
.radius-medium { --radius: 12px; --radius-lg: 16px; }
.radius-large { --radius: 18px; --radius-lg: 24px; }

/* No animations */
.no-animations *,
.no-animations *::before,
.no-animations *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* No grid background */
.no-grid body {
    background-image: none;
}

/* Compact cards */
.compact-cards .script-card {
    padding: 1rem;
}

.compact-cards .script-content,
.compact-cards .script-stats {
    margin-bottom: 0.75rem;
}

/* Hide stats */
.hide-stats .script-stats {
    display: none;
}

/* No accent glow */
.no-accent-glow .logo,
.no-accent-glow .hero-rotating,
.no-accent-glow .btn-hero-cta {
    text-shadow: none;
    box-shadow: none;
}

.no-accent-glow .nav-indicator {
    box-shadow: none;
}

/* Notification position bottom */
.site-notifications.site-notifications-bottom {
    top: auto;
    bottom: 1rem;
}

.btn-add-script {
    background: var(--accent);
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.35);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-add-script:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.5), 0 4px 20px rgba(168, 85, 247, 0.35);
}

.btn-add-script:active {
    transform: translateY(0);
}

.scripts-tab-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.45s, 
                max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.scripts-tab-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 5000px;
    overflow: visible;
}

.script-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2), 0 0 28px rgba(168, 85, 247, 0.18), 0 0 45px rgba(168, 85, 247, 0.08);
    opacity: 0;
    animation: cardFadeIn 0.5s ease forwards;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.script-card:nth-child(1) { animation-delay: 0.05s; }
.script-card:nth-child(2) { animation-delay: 0.1s; }
.script-card:nth-child(3) { animation-delay: 0.15s; }
.script-card:nth-child(4) { animation-delay: 0.2s; }
.script-card:nth-child(5) { animation-delay: 0.25s; }
.script-card:nth-child(n+6) { animation-delay: 0.3s; }

.script-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(168, 85, 247, 0.35), 0 0 45px rgba(168, 85, 247, 0.4), 0 0 70px rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.5);
}

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

.script-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.script-meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.script-author-block {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.script-author-block:hover {
    color: var(--accent);
}

.script-author-block:hover .script-author-avatar {
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), 0 0 28px rgba(168, 85, 247, 0.25);
}

.script-author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.script-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.script-author-initial {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.script-author-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.script-author-link {
    color: var(--accent);
    text-decoration: none;
}

.script-author-link:hover {
    text-decoration: underline;
}

.script-meta-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-edit-script {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-edit-script:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.btn-delete-script {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-delete-script:hover {
    color: #a855f7;
    border-color: #a855f7;
}

.btn-report-script {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-report-script:hover {
    color: #f59e0b;
    border-color: #f59e0b;
}


.script-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.script-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.script-content {
    margin-bottom: 1rem;
}

.script-code-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.btn-copy-script {
    padding: 0.3rem 0.65rem;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-copy-script:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-copy-script.copied {
    border-color: var(--success);
    color: var(--success);
}

.btn-fav-script {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s, transform 0.2s;
}

.btn-fav-script:hover {
    color: var(--accent);
}

.btn-fav-script.fav {
    color: #fbbf24;
}

.btn-fav-script:hover {
    transform: scale(1.15);
}

.script-label {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.script-code {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow-x: auto;
    margin: 0.5rem 0;
    white-space: pre-wrap;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.script-code:hover {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.03);
}

.script-credits {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.script-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.react-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease, transform 0.15s ease;
}

.react-btn:hover {
    color: var(--accent);
    transform: scale(1.08);
}

.react-btn.active {
    color: var(--accent);
}

.react-btn.react-dislike:hover,
.react-btn.react-dislike.active {
    color: #a855f7;
}

.script-reactions {
    display: flex;
    gap: 0.5rem;
}

.script-comments {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.comments-list {
    margin-bottom: 1rem;
}

.comment-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.comment-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .comment-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

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

.comment-rating-badge {
    font-size: 0.8rem;
    color: #fbbf24;
    padding: 0.1rem 0.4rem;
    background: rgba(251, 191, 36, 0.15);
    border-radius: 4px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 500;
    margin-right: 0.5rem;
}

.comment-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-delete-comment {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
    margin-left: auto;
}

.btn-delete-comment:hover {
    color: #a855f7;
}

.btn-report-comment {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem;
}

.btn-report-comment:hover {
    color: #f59e0b;
}

.btn-reply-comment {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.2rem 0.5rem;
    transition: color 0.2s;
}

.btn-reply-comment:hover {
    color: var(--accent);
}

.btn-react-comment {
    padding: 0.15rem 0.4rem;
    font-size: 0.8rem;
}

.btn-react-comment .comment-like-count,
.btn-react-comment .comment-dislike-count {
    margin-left: 0.1rem;
}

.comment-replies {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

.comment-reply {
    padding: 0.5rem 0.5rem 0.5rem 0;
    border-bottom: 1px solid var(--border);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.comment-reply:hover {
    background: rgba(255, 255, 255, 0.015);
}

[data-theme="light"] .comment-reply:hover {
    background: rgba(0, 0, 0, 0.02);
}

.comment-reply:last-child {
    border-bottom: none;
}

.comment-reply-to {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

.comment-reply-form {
    margin-top: 0.75rem;
    margin-left: 1.5rem;
}

.comment-reply-field {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.comment-reply-field:focus {
    outline: none;
    border-color: var(--accent);
}

.comment-reply-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-comment-reply-post {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
}

.btn-comment-reply-cancel {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem;
}

.btn-comment-reply-cancel:hover {
    color: var(--text-primary);
}

.comment-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.comment-input {
    display: flex;
    gap: 0.5rem;
}

.comment-field {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.comment-field:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-comment {
    padding: 0.6rem 1rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
#agentDeleteChatModal { z-index: 10001; }

.modal.open .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.delete-account-warn {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.modal-content #deleteAccountPassword {
    width: 100%;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
}
.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.modal-intro {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.warning-popup-body { padding: 0 0 1rem; }
.warning-popup-intro { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 0.5rem; }
.warning-popup-message {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

#timeoutForm label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

#timeoutForm select {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

#timeoutForm select:focus {
    outline: none;
    border-color: var(--accent);
}

.timeout-custom-wrap {
    margin: 1rem 0 0;
}

.timeout-custom-row {
    display: flex;
    gap: 0.5rem;
}

.timeout-custom-num {
    width: 80px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

.timeout-custom-num:focus {
    outline: none;
    border-color: var(--accent);
}

.timeout-custom-unit {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

#addScriptForm label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

#addScriptForm label:first-of-type {
    margin-top: 0;
}

#addScriptForm input,
#addScriptForm select,
#addScriptForm textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

#addScriptForm select {
    cursor: pointer;
}

#addScriptForm select:focus {
    outline: none;
    border-color: var(--accent);
}

#addScriptForm textarea {
    min-height: 80px;
    resize: vertical;
}

#addScriptForm input:focus,
#addScriptForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#reportForm label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

#reportForm label:first-of-type {
    margin-top: 0;
}

#reportForm select,
#reportForm textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

#reportForm select {
    cursor: pointer;
}

#reportForm select:focus,
#reportForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#reportForm textarea {
    min-height: 80px;
    resize: vertical;
}

#reportForm button[type="submit"] {
    margin-top: 1.5rem;
}

/* User Settings Modal */
#settingsForm label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

#settingsForm label:first-of-type {
    margin-top: 0;
}

.settings-avatar-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.settings-avatar-row input {
    flex: 1;
}

.btn-edit-avatar {
    white-space: nowrap;
}

/* Edit Image Modal (Discord-style) */
.edit-image-modal {
    max-width: 420px;
}

.edit-image-canvas-wrap {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin: 1rem 0;
    overflow: hidden;
}

.edit-image-canvas {
    aspect-ratio: 1;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-image-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border);
    user-select: none;
    -webkit-user-select: none;
}

.edit-image-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
}

.edit-image-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.edit-image-zoom {
    flex: 1;
    accent-color: var(--accent);
}

.edit-image-zoom-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
}

.edit-image-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.edit-image-actions-right {
    display: flex;
    gap: 0.5rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}

.btn-ghost:hover {
    color: var(--text-primary);
}

.settings-avatar-section {
    text-align: center;
    margin-bottom: 1rem;
}

.settings-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    margin-bottom: 1rem;
}

#settingsForm input,
#settingsForm select,
#settingsForm textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

#settingsForm select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

#settingsForm textarea {
    min-height: 80px;
    resize: vertical;
}

#settingsForm textarea::-webkit-scrollbar {
    width: 8px;
}

#settingsForm textarea::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

#settingsForm textarea::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

#settingsForm textarea::-webkit-scrollbar-thumb:hover {
    background: #7c3aed;
}

#settingsForm input::placeholder,
#settingsForm textarea::placeholder {
    color: var(--text-muted);
}

#settingsForm input:focus,
#settingsForm select:focus,
#settingsForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#settingsForm button[type="submit"] {
    margin-top: 1.5rem;
}

.settings-account-security .settings-change-password label,
.settings-account-security .settings-delete-account label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}
.settings-account-security .settings-change-password label:first-child { margin-top: 0; }
.settings-account-security input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}
.settings-account-security input:focus {
    outline: none;
    border-color: var(--accent);
}
.settings-account-security #settingsChangePasswordBtn { margin-top: 0.75rem; }
.settings-account-security .settings-delete-account { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.settings-account-security #settingsDeleteAccountBtn { margin-top: 0; }

#addScriptForm button[type="submit"] {
    margin-top: 1.5rem;
}

/* Edit Script Form - same as Add Script */
#editScriptForm label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    margin-top: 1rem;
}

#editScriptForm label:first-of-type {
    margin-top: 0;
}

#editScriptForm input,
#editScriptForm select,
#editScriptForm textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
}

#editScriptForm textarea {
    min-height: 80px;
    resize: vertical;
}

#editScriptForm select {
    cursor: pointer;
}

#editScriptForm input:focus,
#editScriptForm select:focus,
#editScriptForm textarea:focus {
    outline: none;
    border-color: var(--accent);
}

#editScriptForm button[type="submit"] {
    margin-top: 1.5rem;
}

/* Scripts Rules (About tab) */
.scripts-rules {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-top: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.scripts-rules:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: rgba(168, 85, 247, 0.3);
}

.scripts-rules h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: ruleFadeIn 0.4s ease forwards;
}

.scripts-rules .rules-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: ruleFadeIn 0.4s ease 0.05s forwards;
}

.rules-list {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.rules-list li {
    margin-bottom: 0.75rem;
    opacity: 0;
    animation: ruleFadeIn 0.5s ease forwards;
}

.rules-list li:nth-child(1) { animation-delay: 0.05s; }
.rules-list li:nth-child(2) { animation-delay: 0.1s; }
.rules-list li:nth-child(3) { animation-delay: 0.15s; }
.rules-list li:nth-child(4) { animation-delay: 0.2s; }
.rules-list li:nth-child(5) { animation-delay: 0.25s; }
.rules-list li:nth-child(6) { animation-delay: 0.3s; }
.rules-list li:nth-child(7) { animation-delay: 0.35s; }
.rules-list li:nth-child(n+8) { animation-delay: 0.4s; }

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

.rules-footer {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Profile Page (Sidebar + Content Layout) ===== */
.page-profile .profile-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.profile-layout {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
}

.profile-sidebar {
    flex: 0 0 280px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.profile-avatar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.25rem;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 700;
}

.profile-sidebar .profile-name {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.profile-role-badges {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.profile-role-badge.badge-admin {
    background: #52525b;
}

.profile-role-badge.badge-verified { background: #a855f7; }
.profile-role-badge.badge-topUploader { background: #e11d48; }
.profile-role-badge.badge-firstUpload { background: #ea580c; }
.profile-role-badge.badge-tenScripts { background: #ca8a04; }
.profile-role-badge.badge-hundredLikes { background: #7c3aed; }
.profile-role-badge.badge-oneKViews { background: #2563eb; }
.profile-role-badge:not([class*="badge-"]) { background: var(--accent); }

.profile-counts {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-count span {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.profile-follow-wrap {
    margin-bottom: 1.5rem;
}

.profile-follow-wrap .btn-edit-profile,
.profile-sidebar .btn-primary {
    width: 100%;
    padding: 0.6rem 1rem;
}

.profile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.profile-nav-link:hover,
.profile-nav-link.active {
    color: var(--text-primary);
}

.profile-nav-link.active {
    font-weight: 600;
}

.profile-content {
    flex: 1;
    min-width: 0;
}

.profile-content-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.profile-content-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-joined {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-about,
.profile-badges-section,
.profile-scripts {
    margin-bottom: 2rem;
}

.profile-about h3,
.profile-badges-section h3,
.profile-scripts h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.profile-about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.profile-badges-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.profile-badge-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-badge-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.profile-badge-dot.badge-verified { background: #a855f7; }
.profile-badge-dot.badge-topUploader { background: #e11d48; }
.profile-badge-dot.badge-firstUpload { background: #ea580c; }
.profile-badge-dot.badge-tenScripts { background: #ca8a04; }
.profile-badge-dot.badge-hundredLikes { background: #7c3aed; }
.profile-badge-dot.badge-oneKViews { background: #2563eb; }

.profile-badge-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.profile-scripts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.profile-scripts-grid .script-card-profile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.profile-scripts-grid .script-card-profile .script-meta {
    padding: 0.75rem 1rem;
}

.profile-scripts-grid .script-card-profile .script-title {
    padding: 0 1rem 0.5rem;
    font-size: 1rem;
}

.profile-scripts-grid .script-card-profile .script-stats {
    padding: 0.5rem 1rem 1rem;
}

.scripts-empty-hint a {
    color: var(--accent);
    text-decoration: none;
}

.scripts-empty-hint a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .profile-layout { flex-direction: column; }
    .profile-sidebar { flex: none; width: 100%; max-width: 400px; margin: 0 auto; }
}

.script-rating-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }
.script-rating-display { font-size: 0.95rem; color: var(--text-secondary); }
.script-rating-display .script-rating-count { color: var(--text-muted); font-size: 0.85rem; }
.comment-rating-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.comment-limit-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-limit-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.comment-rating-label { font-size: 0.9rem; color: var(--text-secondary); }
.comment-rating-stars { display: flex; gap: 0.1rem; }
.comment-star-btn { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 0; line-height: 1; transition: color 0.2s ease; }
.comment-star-btn:hover, .comment-star-btn.active { color: #fbbf24; }
.comment-input-row { display: flex; gap: 0.5rem; align-items: center; }
.script-scan-warning { margin-top: 0.5rem; padding: 0.5rem; background: rgba(245, 158, 11, 0.15); border-radius: var(--radius); font-size: 0.85rem; color: #f59e0b; }
.script-changelog { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-secondary); }
.script-changelog ul { margin: 0.25rem 0 0 1rem; padding: 0; }
.scripts-category { padding: 0.5rem 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-primary); font-family: inherit; }

.script-category-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid transparent;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.script-card:hover .script-category-badge {
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .index-layout { flex-direction: column; }
    .trending-corner { width: 100%; max-width: 320px; }
}

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

    .header-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-user-name {
        max-width: 80px;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .scripts-main {
        padding: 1rem;
    }

    .script-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .comment-input {
        flex-direction: column;
    }
}

/* ===== Site Notifications (in-page, styled like website) ===== */
.site-notifications {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.site-notifications > * {
    pointer-events: auto;
}

.site-notification {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    animation: notificationSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 420px;
}

.site-notification-warning {
    border-left: 4px solid #f59e0b;
}

.site-notification-info {
    border-left: 4px solid var(--accent);
}

.site-notification-success {
    border-left: 4px solid var(--success);
}

.site-notification-error {
    border-left: 4px solid #7c3aed;
}

.site-notification.fade-out {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s, transform 0.3s;
}

.site-notification-brand {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.site-notification-msg {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.site-notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}

.site-notification-close:hover {
    color: var(--text-primary);
}

.site-notification.fade-out {
    animation: notificationFadeOut 0.3s ease-out forwards;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notificationFadeOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* ===== Agent UI (AI Assistant) ===== */
.agent-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    height: 48px;
    padding: 0 1rem;
    border-radius: 24px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    z-index: 9998;
    transition: transform 0.2s, box-shadow 0.2s;
}
.agent-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(168, 85, 247, 0.5);
}
.agent-fab-icon {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
/* Agent overlay + ChatGPT-style sidebar */
.agent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.agent-overlay-inner {
    width: 100%;
    max-width: 960px;
    height: 100%;
    max-height: calc(100vh - 2rem);
    margin: 1rem 0 1rem 1rem;
    display: flex;
    min-width: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.agent-overlay.agent-overlay-open {
    opacity: 1;
    visibility: visible;
}
body.agent-overlay-active { overflow: hidden; }
.agent-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: width 0.2s, min-width 0.2s;
    flex-shrink: 0;
}
.agent-sidebar.agent-sidebar-collapsed {
    width: 56px;
    min-width: 56px;
}
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-logo,
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-label,
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-heading,
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-chats,
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-new-bottom { display: none; }
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-toggle { margin-left: 0; }
.agent-sidebar-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.875rem;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.agent-sidebar-logo {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.agent-sidebar-logo .agent-title-logo { color: var(--accent); }
.agent-sidebar-toggle {
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}
.agent-sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-card); }
.agent-sidebar-actions { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.agent-sidebar-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
}
.agent-sidebar-btn:hover { background: var(--bg-card); color: var(--text-primary); }
.agent-sidebar-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.agent-sidebar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-sidebar.agent-sidebar-collapsed .agent-sidebar-btn {
    justify-content: center;
    padding: 0.6rem;
}
.agent-sidebar-chats {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
}
.agent-sidebar-heading {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.5rem 0.25rem 0.5rem;
}
.agent-search-input {
    margin: 0 0.25rem 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
}
.agent-search-input:focus { outline: none; border-color: var(--accent); }
.agent-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem;
}
.agent-sidebar-new-bottom {
    margin: 0.5rem;
}
.agent-chat-main {
    flex: 1;
    min-width: 0;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    max-height: 100vh;
}
.agent-chat-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 0.5rem;
}
.agent-sidebar-toggle-inline {
    margin-right: 0.25rem;
}
.agent-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    cursor: pointer;
}
.agent-btn:hover { color: var(--text-primary); border-color: var(--text-muted); }
.agent-btn.active { color: var(--accent); border-color: var(--accent); }
.agent-panel-title { flex: 1; text-align: center; margin: 0; }
.agent-history-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}
.agent-history-dropdown .agent-btn-new {
    width: 100%;
    padding: 0.6rem 1rem;
    text-align: center;
    border: none;
    border-bottom: 1px solid var(--border);
}
.agent-history-list { padding: 0.5rem; }
.agent-history-item-wrap {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
}
.agent-history-item-wrap:last-child { margin-bottom: 0; }
.agent-history-delete {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  opacity: 0.6;
}
.agent-history-delete:hover {
  color: var(--danger, #e74c3c);
  opacity: 1;
  background: var(--bg-secondary);
}
.agent-history-item {
    flex: 1;
    display: block;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    text-align: left;
    background: none;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}
.agent-history-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.agent-history-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-history-date { font-size: 0.75rem; opacity: 0.8; }
.agent-history-empty { padding: 0.75rem; margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.agent-panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.agent-panel-title .agent-title-logo {
    color: var(--accent);
    text-shadow: 0 0 12px var(--accent-glow), 0 0 24px rgba(168, 85, 247, 0.5);
}
.agent-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}
.agent-panel-close:hover { color: var(--text-primary); }
.agent-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}
.agent-msg {
    max-width: 90%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.45;
    word-wrap: break-word;
}
.agent-msg-text { white-space: pre-wrap; }
.agent-msg-user {
    align-self: flex-end;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.4);
    color: var(--text-primary);
}
.agent-msg-bot {
    align-self: flex-start;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.agent-input-wrap {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid var(--border);
}
.agent-input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}
.agent-input:focus {
    outline: none;
    border-color: var(--accent);
}
.agent-send {
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.agent-send:hover { opacity: 0.9; }
.agent-send:disabled { opacity: 0.6; cursor: not-allowed; }
.agent-msg-loading .agent-msg-text {
    animation: agent-pulse 1s ease-in-out infinite;
}
@keyframes agent-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.settings-section h3 { margin-top: 0; }
.settings-section .setting-row input[type="password"] {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}
