/* ==========================================================================
   AI Automation Theme - Main Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables / Design Tokens
   ========================================================================== */

:root {
    /* Backgrounds */
    --color-bg: #000000;
    --color-bg-secondary: rgba(255, 255, 255, 0.02);
    --color-bg-card: rgba(255, 255, 255, 0.02);

    /* Borders */
    --color-border: #222222;
    --color-border-light: rgba(255, 255, 255, 0.1);

    /* Primary (Light Blue) */
    --color-primary: #5E9ED0;
    --color-primary-light: #70BEFA;
    --color-primary-dark: #4E81A9;

    /* Text */
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.7);
    --color-text-subtle: rgba(255, 255, 255, 0.5);

    /* States */
    --color-error: #ef4444;
    --color-success: #22c55e;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #5E9ED0, #70BEFA);
    --gradient-border: linear-gradient(90deg, transparent 0%, #70BEFA 50%, transparent 100%);

    /* Typography */
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 42px;
    --font-size-5xl: 56px;
    --line-height: 1.7;
    --line-height-tight: 1.3;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 80px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-main {
    flex: 1;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.section-container-narrow {
    max-width: 800px;
}

.section {
    padding: var(--space-3xl) 0;
}

/* ==========================================================================
   4. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-subtle {
    color: var(--color-text-subtle);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow:
        inset 1px 1px 4px rgba(94, 158, 208, 0.15),
        inset -1px -1px 4px rgba(78, 129, 169, 0.08);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-border);
}

.btn:hover {
    color: var(--color-text);
    box-shadow: inset -2px -2px 8px rgba(94, 158, 208, 0.15);
    transform: translateY(-2px);
}

.btn-primary {
    background: rgba(94, 158, 208, 0.1);
    border-color: rgba(94, 158, 208, 0.3);
}

.btn-primary:hover {
    background: rgba(94, 158, 208, 0.2);
}

.btn-ghost {
    background: transparent;
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-full {
    width: 100%;
}

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

.btn-lg {
    padding: 12px 24px;
    font-size: var(--font-size-base);
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   6. Cards
   ========================================================================== */

.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-border);
    z-index: 1;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(94, 158, 208, 0.1);
}

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: var(--space-lg);
}

.card-tag {
    display: inline-block;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
    line-height: var(--line-height-tight);
}

.card-excerpt {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

.card-cta {
    margin-top: var(--space-md);
}

/* Video Card */
.video-card .card-image {
    position: relative;
}

.play-icon,
.download-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text);
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card:hover .play-icon,
.card:hover .download-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Article Grid */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   7. Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.form-group input,
.newsletter-input {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.newsletter-input:focus {
    border-color: var(--color-primary);
}

.form-group input::placeholder,
.newsletter-input::placeholder {
    color: var(--color-text-subtle);
}

/* Newsletter Form */
.newsletter-form .form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

@media (min-width: 480px) {
    .newsletter-form .form-row {
        flex-direction: row;
    }

    .newsletter-form .newsletter-input {
        flex: 1;
    }

    .newsletter-form .newsletter-btn {
        flex-shrink: 0;
    }
}

/* Größere Buttons für Newsletter und Content-Gate */
.newsletter-form .btn,
.content-gate-form .btn,
.auth-form .btn,
.cta-box .btn {
    padding: 12px 24px;
    font-size: var(--font-size-base);
}

.form-message {
    margin-top: var(--space-md);
}

.form-message p {
    display: none;
    font-size: var(--font-size-sm);
}

.message-success {
    color: var(--color-success);
}

.message-error {
    color: var(--color-error);
}

.newsletter-form.success .message-success,
.auth-form.success .message-success,
.content-gate-form.success .message-success {
    display: block;
}

.newsletter-form.error .message-error,
.auth-form.error .message-error,
.content-gate-form.error .message-error {
    display: block;
}

/* ==========================================================================
   8. Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md);
    gap: var(--space-lg);
}

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

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo .site-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.header-nav {
    display: none;
    flex: 1;
    justify-content: center;
}

.header-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
}

.header-nav a {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--color-text);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header-right .btn {
    display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger {
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    padding: var(--space-lg);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.mobile-menu.active {
    display: block;
}

.mobile-nav ul {
    list-style: none;
    margin-bottom: var(--space-lg);
}

.mobile-nav li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav a {
    display: block;
    padding: var(--space-md) 0;
    color: var(--color-text);
    font-size: var(--font-size-lg);
}

.mobile-auth {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* Desktop Header */
@media (min-width: 1024px) {
    .header-nav {
        display: flex;
    }

    .header-right .btn {
        display: inline-flex;
    }

    .mobile-menu-toggle {
        display: none;
    }
}

/* ==========================================================================
   9. Footer
   ========================================================================== */

.site-footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3xl) 0 var(--space-lg);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
    .footer-top {
        grid-template-columns: 2fr 2fr 1fr;
    }
}

.footer-logo {
    display: inline-flex;
    margin-bottom: var(--space-md);
}

.footer-logo img {
    height: 32px;
    width: auto;
}

.footer-logo .gradient-text {
    font-size: var(--font-size-xl);
    font-weight: 700;
}

.footer-description {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.footer-newsletter h4,
.footer-links h4 {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.footer-newsletter .text-muted {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-sm);
}

.footer-nav ul {
    list-style: none;
}

.footer-nav li {
    margin-bottom: var(--space-sm);
}

.footer-nav a {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.footer-nav a:hover {
    color: var(--color-text);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.copyright {
    color: var(--color-text-subtle);
    font-size: var(--font-size-sm);
}

.footer-legal ul {
    display: flex;
    gap: var(--space-md);
    list-style: none;
}

.footer-legal a {
    color: var(--color-text-subtle);
    font-size: var(--font-size-sm);
}

.footer-legal a:hover {
    color: var(--color-text);
}

/* ==========================================================================
   10. Hero Section
   ========================================================================== */

.hero {
    padding: var(--space-4xl) 0;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2xl);
}

.hero-form {
    max-width: 500px;
    margin: 0 auto var(--space-lg);
}

.hero-stats {
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

/* ==========================================================================
   11. Section Styles
   ========================================================================== */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--font-size-2xl);
}

.section-link {
    color: var(--color-primary);
    font-size: var(--font-size-base);
}

/* CTA Section */
.section-cta {
    background: var(--color-bg-secondary);
}

.cta-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-md);
}

.cta-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.cta-form {
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================================================
   12. Post / Article Styles
   ========================================================================== */

.post-header {
    padding: var(--space-3xl) 0 var(--space-xl);
}

.post-tag {
    display: inline-block;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
    line-height: 1.15;
    color: var(--color-text);
}

@media (min-width: 768px) {
    .post-title {
        font-size: var(--font-size-5xl);
    }
}

.post-excerpt {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
    line-height: var(--line-height);
}

/* Post Meta Bar - Author + Actions */
.post-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.post-author-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-subtle);
}

.post-author-avatar-placeholder svg {
    width: 24px;
    height: 24px;
}

.post-author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-author-name {
    font-weight: 500;
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.post-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

/* Post Actions - Like & Share */
.post-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.post-share-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.post-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-subtle);
    cursor: pointer;
    transition: all 0.2s ease;
}

.post-action-btn:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.05);
}

.post-like-btn:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.post-like-btn.liked {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

.post-like-btn.liked svg {
    fill: #ff6b6b;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

.post-separator {
    color: var(--color-text-subtle);
}

.post-feature-image {
    margin-bottom: var(--space-2xl);
}

.post-feature-image img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.post-content-wrapper {
    padding-bottom: var(--space-3xl);
}

.post-content {
    font-size: var(--font-size-lg);
    line-height: var(--line-height);
}

.post-content > * + * {
    margin-top: var(--space-lg);
}

.post-content h2 {
    font-size: var(--font-size-3xl);
    margin-top: var(--space-2xl);
}

.post-content h3 {
    font-size: var(--font-size-2xl);
    margin-top: var(--space-xl);
}

.post-content p {
    color: var(--color-text-muted);
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(94, 158, 208, 0.3);
    text-underline-offset: 2px;
}

.post-content a:hover {
    text-decoration-color: var(--color-primary);
}

.post-content ul,
.post-content ol {
    padding-left: var(--space-xl);
    color: var(--color-text-muted);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

.post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding-left: var(--space-lg);
    font-style: italic;
    color: var(--color-text-muted);
}

.post-content pre {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
}

.post-content code {
    font-family: 'SF Mono', Monaco, 'Andale Mono', monospace;
    font-size: var(--font-size-sm);
}

.post-content img {
    border-radius: var(--radius-md);
}

.post-content figure {
    margin: var(--space-xl) 0;
}

.post-content figcaption {
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
    text-align: center;
}

/* ==========================================================================
   13. Content Gate
   ========================================================================== */

/* Hide Ghost's default Portal subscription box */
.gh-post-upgrade-cta,
.gh-post-upgrade-cta-content,
[data-gh-memberful-upgrade-cta],
.kg-signup-card {
    display: none !important;
}

/* Gated content - cut off and fade */
.post-content-gated {
    position: relative;
    max-height: 500px;
    overflow: hidden;
}

/* Fade overlay on gated content - softer fade like reference */
.post-content-gated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(10, 10, 10, 0.3) 30%,
        rgba(10, 10, 10, 0.7) 60%,
        var(--color-bg) 100%
    );
    pointer-events: none;
    z-index: 5;
}

.post-content-wrapper {
    position: relative;
}

/* Content Gate Overlay Container - Full Width */
.content-gate-inline {
    position: relative;
    margin-top: -80px;
    padding-bottom: var(--space-3xl);
    z-index: 10;
    /* Break out of container to go full width */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

/* The floating box - full width style */
.content-gate-inline-box {
    background: var(--color-bg);
    border: none;
    border-radius: 0;
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    position: relative;
    width: 100%;
    max-width: none;
}

/* Blue gradient border on top - full width highlight stripe */
.content-gate-inline-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-border);
}

.content-gate-inline-box h3 {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.content-gate-inline-box > p {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    margin-bottom: var(--space-xl);
    line-height: var(--line-height);
}

.content-gate-inline-form {
    margin-bottom: var(--space-lg);
}

.content-gate-inline-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

@media (min-width: 520px) {
    .content-gate-inline-row {
        flex-direction: row;
        border-radius: var(--radius-md);
        overflow: hidden;
        border: 1px solid var(--color-border);
        background: rgba(255, 255, 255, 0.03);
    }

    .content-gate-input-wrapper {
        border: none;
        border-radius: 0;
    }

    .content-gate-inline-input {
        border: none;
        border-radius: 0;
    }

    .content-gate-inline-btn {
        border-radius: 0 !important;
        border: none !important;
        border-left: 1px solid var(--color-border) !important;
    }
}

/* Input wrapper with icon */
.content-gate-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
}

@media (min-width: 520px) {
    .content-gate-input-wrapper {
        margin-bottom: 0;
    }
}

.content-gate-input-icon {
    position: absolute;
    left: 16px;
    color: var(--color-text-subtle);
    pointer-events: none;
}

.content-gate-inline-input {
    flex: 1;
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: transparent;
    border: none;
    outline: none;
}

.content-gate-inline-input::placeholder {
    color: var(--color-text-subtle);
}

.content-gate-input-wrapper:focus-within {
    border-color: var(--color-primary);
}

.content-gate-inline-btn {
    padding: 14px 24px !important;
    font-size: var(--font-size-sm) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.content-gate-inline-btn .btn-arrow {
    transition: transform 0.2s ease;
}

.content-gate-inline-btn:hover .btn-arrow {
    transform: translateX(3px);
}

.content-gate-inline-signin {
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
    margin-top: var(--space-md);
}

.content-gate-inline-signin a {
    color: var(--color-primary);
    text-decoration: underline;
}

.content-gate-inline .form-message {
    margin-top: var(--space-md);
}

/* ==========================================================================
   14. Archive Pages
   ========================================================================== */

.archive-header {
    padding: var(--space-3xl) 0;
    text-align: center;
}

.archive-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
}

.archive-description {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.archive-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

.no-posts {
    text-align: center;
    color: var(--color-text-muted);
    padding: var(--space-2xl);
}

/* Author Archive */
.author-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-lg);
    border: 2px solid var(--color-border);
}

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

.author-meta {
    display: flex;
    gap: var(--space-md);
    color: var(--color-text-subtle);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   15. Pagination
   ========================================================================== */

.pagination {
    padding: var(--space-2xl) 0;
}

.pagination-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
}

.pagination-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    transition: color 0.3s ease;
}

.pagination-link:hover:not(.disabled) {
    color: var(--color-text);
}

.pagination-link.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination-info {
    color: var(--color-text-subtle);
    font-size: var(--font-size-sm);
}

/* ==========================================================================
   16. Auth Pages
   ========================================================================== */

.auth-page {
    padding: var(--space-4xl) 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-box {
    max-width: 450px;
    margin: 0 auto;
    padding: var(--space-2xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    position: relative;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-border);
}

.auth-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    text-align: center;
}

.auth-description {
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: var(--space-xl);
}

.auth-form {
    margin-bottom: var(--space-lg);
}

.auth-switch {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

.auth-switch a {
    color: var(--color-primary);
}

/* Account Page */
.account-box {
    max-width: 500px;
}

.account-info {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    overflow: hidden;
    flex-shrink: 0;
}

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

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--color-text);
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-transform: uppercase;
}

.account-name {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-xs);
}

.account-email {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.account-section {
    margin-bottom: var(--space-xl);
}

.account-section-title {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-sm);
}

.account-section-description {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

/* ==========================================================================
   17. Error Page
   ========================================================================== */

.error-page {
    padding: var(--space-4xl) 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.error-content {
    text-align: center;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .error-code {
        font-size: 180px;
    }
}

.error-message {
    font-size: var(--font-size-xl);
    color: var(--color-text-muted);
    margin-bottom: var(--space-2xl);
}

/* ==========================================================================
   18. Page Content
   ========================================================================== */

.page-header {
    padding: var(--space-3xl) 0 var(--space-xl);
    text-align: center;
}

.page-title {
    font-size: var(--font-size-4xl);
}

.page-content-wrapper {
    padding-bottom: var(--space-3xl);
}

.page-content {
    font-size: var(--font-size-lg);
    line-height: var(--line-height);
}

.page-content > * + * {
    margin-top: var(--space-lg);
}

.page-content h2 {
    font-size: var(--font-size-3xl);
    margin-top: var(--space-2xl);
}

.page-content h3 {
    font-size: var(--font-size-2xl);
    margin-top: var(--space-xl);
}

.page-content p {
    color: var(--color-text-muted);
}

.page-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: rgba(94, 158, 208, 0.3);
    text-underline-offset: 2px;
}

.page-content a:hover {
    text-decoration-color: var(--color-primary);
}

.page-content ul,
.page-content ol {
    padding-left: var(--space-xl);
    color: var(--color-text-muted);
}

.page-content li {
    margin-bottom: var(--space-sm);
}

/* ==========================================================================
   19. Ghost-specific / Koenig Editor Styles
   ========================================================================== */

.kg-card {
    margin: var(--space-xl) 0;
}

.kg-image-card img {
    width: 100%;
}

.kg-width-wide {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    max-width: none;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.kg-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.kg-gallery-row {
    display: flex;
    gap: var(--space-md);
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-bookmark-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.kg-bookmark-container {
    display: flex;
    text-decoration: none;
    color: inherit;
}

.kg-bookmark-content {
    flex: 1;
    padding: var(--space-lg);
}

.kg-bookmark-title {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.kg-bookmark-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

.kg-bookmark-metadata {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

.kg-bookmark-icon {
    width: 20px;
    height: 20px;
}

.kg-bookmark-thumbnail {
    width: 200px;
    flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kg-callout-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.kg-callout-emoji {
    font-size: var(--font-size-2xl);
}

.kg-callout-text {
    color: var(--color-text-muted);
}

.kg-button-card {
    display: flex;
    justify-content: center;
}

.kg-button-card a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    color: var(--color-text);
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.kg-button-card a:hover {
    opacity: 0.9;
}

.kg-toggle-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.kg-toggle-heading {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    cursor: pointer;
}

.kg-toggle-heading h4 {
    flex: 1;
    margin: 0;
}

.kg-toggle-content {
    padding: 0 var(--space-lg) var(--space-lg);
    color: var(--color-text-muted);
}

/* Video embeds */
.kg-video-card {
    position: relative;
}

.kg-video-container {
    position: relative;
    padding-bottom: 56.25%;
}

.kg-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

/* Audio embeds */
.kg-audio-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

/* File embeds */
.kg-file-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.kg-file-card-contents {
    flex: 1;
}

.kg-file-card-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.kg-file-card-metadata {
    font-size: var(--font-size-sm);
    color: var(--color-text-subtle);
}

/* ==========================================================================
   20. Utility Classes
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
