/* CSS Variables for consistency */
:root {
    --primary-red: #DC143C;
    --primary-purple: #9d4edd;
    --primary-green: #00ff88;
    --dark-bg: #1a0033;
    --darker-bg: #0a0014;
    --text-light: #fff;
    --text-muted: #999;
    --text-purple: #b8a6ff;
}

/* Base Styles */
body {
    font-family: 'Crimson Text', serif;
    background: #000;
    color: var(--text-light);
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Dark gradient background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 50%, #000 100%);
    z-index: -2;
    transition: background 0.8s ease;
}

/* Series-specific backgrounds */
.background.esmeralda-theme {
    background: linear-gradient(180deg, #000 0%, #330000 50%, #1a0000 100%);
}

.background.pirates-theme {
    background: linear-gradient(180deg, #000814 0%, #001d3d 50%, #000814 100%);
}

.background.kindred-theme {
    background: linear-gradient(180deg, #1a0000 0%, #330011 50%, #000 100%);
}

.series-effects {
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 1s ease;
    overflow: hidden;
}

/* Ensure clickable elements are above effects */
.book-card {
    position: relative;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.nav-btn {
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.tool-card {
    position: relative;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.series-effects.active {
    opacity: 1;
}

/* Base particle styles */
.particle {
    position: fixed;
    background: #ff4500;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1; /* Below header (z-index: 1000) and other content */
    box-shadow: 0 0 8px #ff4500;
    transition: all 0.3s ease;
}

#cosmic .particle {
    opacity: 0.6 !important;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0.3;
        bottom: -5%;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        opacity: 0.3;
        bottom: 105%;
    }
}

.cosmic-particle {
    animation: particleFloat 6s ease-in-out infinite !important;
    opacity: 0.7 !important;
}        
        .mouse-trail {
            display: none; /* Disabled mouse cursor follower */
            position: fixed;
            width: 20px;
            height: 20px;
            border: 2px solid rgba(220, 20, 60, 0.3);
            border-radius: 50%;
            pointer-events: none;
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.3s, transform 0.1s ease-out;        }

header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    background: rgba(0,0,0,1);  /* <-- Changed to 100% opaque (or use just 'background: #000;') */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(139, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1000;
}

        header::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
            animation: pulse 3s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { width: 100px; opacity: 0.5; }
            50% { width: 200px; opacity: 1; }
        }

        .author-name {
            font-family: 'Cinzel', serif;
            font-size: 2.5rem;
            font-weight: 600;
            color: var(--text-light);
            letter-spacing: 0.2em;
            margin-bottom: 0.5rem;
            text-transform: uppercase;
            text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
        }

        .tagline {
            font-size: 1.1rem;
            color: var(--text-muted);
            font-style: italic;
        }

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 1000;
}

        .nav-btn {
            padding: 0.75rem 1.5rem;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.2);
            color: var(--text-light);
            font-family: 'Crimson Text', serif;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            position: relative;
            overflow: hidden;
        }

        .nav-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: rgba(220, 20, 60, 0.3);
            border-radius: 50%;
            transform: translate(-50%, -50%);
            transition: width 0.5s, height 0.5s;
        }

        .nav-btn:hover::before {
            width: 300px;
            height: 300px;
        }

        .nav-btn:hover,
        .nav-btn.active {
            background: rgba(139, 0, 0, 0.3);
            border-color: rgba(139, 0, 0, 0.6);
            transform: translateY(-2px);
            position: relative;
            z-index: 1;
        }

        
        .nav-separator {
            width: 2px;
            height: 30px;
            background: linear-gradient(to bottom, transparent, var(--primary-purple), transparent);
            margin: 0 1rem;
            display: inline-block;
            vertical-align: middle;
        }

        
        .cosmic-nav {
  background: linear-gradient(90deg, #2d0036 0%, #3a1a5d 100%);
  color: #ffd700;
  border: 2px solid #b8a6ff;
  border-radius: 12px;
  padding: 0.85em 2.2em;
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  box-shadow: 0 0 18px 0 rgba(157, 78, 221, 0.13);
  text-shadow: 0 0 8px #b8a6ff, 0 0 2px #fff;
  transition: 
    background 0.4s cubic-bezier(.4,0,.2,1),
    box-shadow 0.3s,
    border-color 0.3s,
    color 0.3s;
  position: relative;
  overflow: hidden;
}

.cosmic-nav:hover, .cosmic-nav:focus {
  background: linear-gradient(90deg, #3a1a5d 0%, #9d4edd 100%);
  color: #fff;
  border-color: #ffd700;
  box-shadow: 0 0 32px 0 #9d4edd, 0 0 8px #ffd700;
  outline: none;
}

.cosmic-nav.active {
  background: linear-gradient(90deg, #9d4edd 0%, #ffd700 100%);
  color: #1a0033;
  border-color: #ffd700;
}

/* Missing Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes rise {
    0% {
        bottom: -100px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        bottom: 100vh;
        opacity: 0;
    }
}

/* Series-specific effect styles */
.flame-streak {
    position: absolute;
    background: linear-gradient(to top, #ff4500, #ff6347, transparent);
    height: 100px;
    animation: rise 2s ease-out infinite;
}

.water-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(65, 105, 225, 0.3);
    animation: waterFlow 3s ease-in-out infinite;
}

@keyframes waterFlow {
    0%, 100% { transform: translateX(-100px); }
    50% { transform: translateX(100px); }
}

.ripple {
    position: absolute;
    border: 2px solid rgba(65, 105, 225, 0.5);
    border-radius: 50%;
    animation: rippleExpand 4s ease-out;
}

@keyframes rippleExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

.blood-drop {
    position: absolute;
    width: 3px;
    height: 15px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(139, 0, 0, 0.8) 20%, 
        rgba(178, 0, 0, 0.9) 60%, 
        rgba(139, 0, 0, 0.7) 100%
    );
    border-radius: 0 0 50% 50% / 100% 100% 0 0;
    animation: bloodFall 6s linear infinite;
    filter: drop-shadow(0 0 3px rgba(178, 0, 0, 0.5));
}

@keyframes bloodFall {
    0% {
        transform: translateY(-30px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 50px));
        opacity: 0;
    }
}

.lightning-bolt {
    position: absolute;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #fff, transparent);
    animation: lightning 0.2s ease-out;
}

@keyframes lightning {
    0% {
        opacity: 0;
        height: 0;
    }
    50% {
        opacity: 1;
        height: 100vh;
    }
    100% {
        opacity: 0;
        height: 100vh;
    }
}

.inferno-base {
    position: absolute;
    bottom: 0; /* Align with viewport bottom */
    width: 100%;
    height: 200px; /* Original height */
    background: radial-gradient(ellipse at bottom, rgba(255, 69, 0, 0.4), transparent);
    animation: infernoGlow 2s ease-in-out infinite;
    overflow: hidden;
}

@keyframes infernoGlow {
    0%, 100% { opacity: 0.6; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.1); }
}
        
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 50;  /* Above effects but below header */
}

        .series-section {
            display: none;
            animation: fadeIn 0.5s ease;
            overflow: hidden;
            position: relative;
        }

        .series-section.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .series-header {
            text-align: center;
            margin-bottom: 3rem;
            position: relative;
        }

        .series-title {
            font-family: 'Cinzel', serif;
            font-size: 2rem;
            margin-bottom: 0.5rem;
            color: var(--text-light);
        }

        .series-tagline {
            font-size: 1.2rem;
            color: #ccc;
            font-style: italic;
        }

        .series-status {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-top: 0.5rem;
        }

        
        .series-decoration {
            position: absolute;
            width: 50px;
            height: 50px;
            opacity: 0.1;
            top: 50%;
            transform: translateY(-50%);
        }

        .series-decoration.left {
            left: 10%;
        }

        .series-decoration.right {
            right: 10%;
        }

        
        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 2rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        
        .books-grid.four-books {
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            max-width: 1200px;
        }

        .books-grid.two-books {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            max-width: 600px;
        }

.book-card {
    text-decoration: none;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 100;  /* Ensure books are above effects */
}

        .book-card:hover {
            transform: translateY(-10px);
        }

.book-cover-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
    background: #111;
    z-index: 101;  /* One level above book-card */
}

        .book-cover-wrapper::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
            transform: translateX(-100%);
            transition: transform 0.6s;
        }

        .book-card:hover .book-cover-wrapper::after {
            transform: translateX(100%);
        }

        .book-cover {
            width: 100%;
            height: auto;
            display: block;
            border-radius: 5px;
        }

        .book-card:hover .book-cover {
            filter: brightness(1.1);
        }

        .book-info {
            text-align: center;
            margin-top: 1rem;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .book-number {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.3;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            padding: 0.3rem 0;
        }

        .book-number::before {
            content: '•';
            opacity: 0;
            position: absolute;
            left: -15px;
            transition: all 0.3s ease;
        }

        .book-number::after {
            content: '•';
            opacity: 0;
            position: absolute;
            right: -15px;
            transition: all 0.3s ease;
        }

        .book-card:hover .book-number {
            color: var(--primary-red);
            transform: scale(1.05);
        }

        .book-card:hover .book-number::before,
        .book-card:hover .book-number::after {
            opacity: 1;
        }

        
        .coming-soon-book {
            position: relative;
        }

        .coming-soon-banner {
            position: absolute;
            top: 10px;
            right: -10px;
            background: var(--primary-red);
            color: var(--text-light);
            padding: 0.5rem 1rem;
            font-size: 0.9rem;
            font-weight: bold;
            transform: rotate(15deg);
            box-shadow: 0 3px 10px rgba(0,0,0,0.5);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            backdrop-filter: blur(5px);
            animation: fadeIn 0.3s ease;
            overflow-y: auto;
        }

        .modal-content {
            position: relative;
            background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
            margin: 3% auto;
            padding: 2rem;
            border: 1px solid rgba(220, 20, 60, 0.3);
            width: 90%;
            max-width: 600px;
            max-height: 85vh;
            overflow-y: auto;
            border-radius: 10px;
            box-shadow: 0 5px 30px rgba(0,0,0,0.7);
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
            transition: color 0.3s;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .close:hover {
            color: var(--primary-red);
        }

        .modal-title {
            font-family: 'Cinzel', serif;
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--text-light);
        }

        .modal-synopsis {
            line-height: 1.8;
            color: #ddd;
            white-space: pre-line;
            font-size: 1.05rem;
            margin-bottom: 2rem;
        }

        .modal-synopsis strong {
            color: var(--text-light);
            font-weight: 600;
        }

        .modal-synopsis em {
            color: var(--primary-red);
            font-style: italic;
        }

        
        .buy-section {
            border-top: 1px solid rgba(220, 20, 60, 0.3);
            padding-top: 1.5rem;
            margin-top: 2rem;
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
        }

        .amazon-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            background: var(--primary-red);
            color: var(--text-light);
            text-decoration: none;
            border-radius: 5px;
            transition: all 0.3s ease;
            font-weight: 600;
            font-size: 1.1rem;
        }

        .amazon-link:hover {
            background: #B91C1C;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(220, 20, 60, 0.4);
        }

        .amazon-link::before {
            content: '🛒';
            font-size: 1.2rem;
        }

        .close-btn {
            display: inline-block;
            padding: 0.75rem 1.5rem;
            background: transparent;
            color: var(--text-muted);
            text-decoration: none;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 5px;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .close-btn:hover {
            border-color: rgba(255,255,255,0.4);
            color: var(--text-light);
        }

        
        .temp-cover {
            width: 100%;
            height: 300px;
            background: linear-gradient(135deg, #2a0033 0%, #8B0000 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-light);
            font-size: 1.2rem;
            text-align: center;
            border-radius: 5px;
        }

.newsletter {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
}

        .newsletter-btn {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: rgba(139, 0, 0, 0.8);
            border: none;
            color: var(--text-light);
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(0,0,0,0.5);
            position: relative;
            overflow: hidden;
        }

        .newsletter-btn::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, var(--primary-red), #8B0000);
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: -1;
        }

        .newsletter-btn:hover {
            transform: scale(1.1);
            background: rgba(139, 0, 0, 1);
        }

        .newsletter-btn:hover::before {
            opacity: 1;
        }

        
        .cosmic-header {
            text-align: center;
            margin-bottom: 3rem;
            padding: 2rem;
        }

.cosmic-title {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px rgba(157, 78, 221, 0.5);
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: cosmic-glow 3s ease-in-out infinite;
}

        @keyframes cosmic-glow {
            0%, 100% { filter: brightness(1); }
            50% { filter: brightness(1.2); }
        }

        .cosmic-subtitle {
            color: var(--text-purple);
            font-size: 1.3rem;
            font-style: italic;
            margin-bottom: 1rem;
        }

        .workshop-badge {
            display: inline-block;
            padding: 0.5rem 1.5rem;
            background: rgba(0, 255, 136, 0.1);
            border: 1px solid var(--primary-green);
            border-radius: 20px;
            color: var(--primary-green);
            font-size: 0.9rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            animation: badge-pulse 2s ease-in-out infinite;
        }

        @keyframes badge-pulse {
            0%, 100% { opacity: 0.8; }
            50% { opacity: 1; }
        }

        .tools-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            max-width: 1000px;
            margin: 0 auto 3rem;
            padding: 0 1rem;
        }

        .tool-card {
            background: rgba(26, 0, 51, 0.8);
            border: 2px solid rgba(157, 78, 221, 0.3);
            border-radius: 15px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .tool-card::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, var(--primary-purple), var(--primary-green), var(--primary-purple));
            border-radius: 15px;
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: -1;
        }

        .tool-card:hover::before {
            opacity: 1;
        }

.tool-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-green);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.3);
    background: rgba(30, 5, 55, 0.7); /* Slightly lighter than original */
}

        .tool-icon {
            font-size: 3rem;
            display: block;
            margin-bottom: 1rem;
            animation: icon-float 3s ease-in-out infinite;
        }

        @keyframes icon-float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-5px); }
        }

        .tool-name {
            font-family: 'Cinzel', serif;
            font-size: 1.3rem;
            color: var(--primary-green);
            margin-bottom: 0.5rem;
        }

        .tool-description {
            color: var(--text-purple);
            font-size: 0.95rem;
            line-height: 1.5;
        }

        
        .tool-area {
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
            min-height: 400px;
            margin: 3rem 0;
        }

        .tool-area.active {
            opacity: 1;
            transform: translateY(0);
        }

        
        .coming-soon-cosmic {
            text-align: center;
            margin: 4rem 0;
        }

        
        .forge-newsletter {
            background: rgba(26, 0, 51, 0.6);
            border: 1px solid rgba(157, 78, 221, 0.3);
            border-radius: 20px;
            padding: 3rem;
            text-align: center;
            max-width: 600px;
            margin: 4rem auto;
        }

        .forge-newsletter h3 {
            font-family: 'Cinzel', serif;
            font-size: 1.8rem;
            color: var(--primary-purple);
            margin-bottom: 1rem;
        }

        .forge-newsletter p {
            color: var(--text-purple);
            margin-bottom: 2rem;
            font-size: 1.1rem;
        }

        .newsletter-form {
            display: flex;
            gap: 1rem;
            max-width: 400px;
            margin: 0 auto;
            flex-wrap: wrap;
            justify-content: center;
        }

        .newsletter-input {
            flex: 1;
            padding: 0.75rem 1rem;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(157, 78, 221, 0.3);
            border-radius: 5px;
            color: var(--text-light);
            font-size: 1rem;
            min-width: 250px;
        }

        .newsletter-input::placeholder {
            color: rgba(184, 166, 255, 0.5);
        }

        .newsletter-input:focus {
            outline: none;
            border-color: var(--primary-green);
            box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
        }

        .newsletter-submit {
            padding: 0.75rem 2rem;
            background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-green) 100%);
            border: none;
            border-radius: 5px;
            color: #000;
            font-weight: bold;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .newsletter-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(157, 78, 221, 0.4);
        }

        
        footer {
            text-align: center;
            padding: 3rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            margin-top: 4rem;
        }

        footer a {
            color: var(--primary-red);
            text-decoration: none;
        }

        footer a:hover {
            text-decoration: underline;
        }

        
        @media (max-width: 768px) {
            .nav-separator {
                display: none;
            }
            
            .author-name {
                font-size: 1.8rem;
                letter-spacing: 0.1em;
            }

            .tagline {
                font-size: 1rem;
            }
            
            nav {
                gap: 0.5rem;
                padding: 1rem;
            }
            
            .nav-btn {
                padding: 0.6rem 1rem;
                font-size: 0.85rem;
                letter-spacing: 0.05em;
            }

            .content {
                padding: 1rem;
            }

            .series-title {
                font-size: 1.5rem;
            }

            .series-tagline {
                font-size: 1rem;
            }
            
            .books-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 1rem;
                max-width: 100%;
            }

            .books-grid.four-books {
                grid-template-columns: repeat(2, 1fr);
                max-width: 100%;
            }

            .books-grid.two-books {
                grid-template-columns: repeat(2, 1fr);
                max-width: 100%;
            }

            .book-info {
                height: 25px;
            }

            .book-number {
                font-size: 0.8rem;
            }            .series-decoration {
                display: none;
            }

            
            .modal-content {
                margin: 2% auto;
                padding: 1.5rem;
                width: 95%;
                max-height: 90vh;
            }

            .modal-title {
                font-size: 1.3rem;
            }

            .modal-synopsis {
                font-size: 1rem;
                line-height: 1.6;
            }

            
            .newsletter {
                bottom: 1rem;
                right: 1rem;
            }

            .newsletter-btn {
                width: 50px;
                height: 50px;
                font-size: 1.2rem;
            }

            
            footer {
                padding: 2rem 1rem;
                font-size: 0.9rem;
            }

            
            .book-card {
                -webkit-tap-highlight-color: transparent;
            }

            .book-cover-wrapper {
                box-shadow: 0 5px 15px rgba(0,0,0,0.5);
            }

            
            body {
                overflow-x: hidden;
            }

            
            .coming-soon-banner {
                font-size: 0.7rem;
                padding: 0.3rem 0.6rem;
            }

            
            .tools-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }
            
            .cosmic-title {
                font-size: 2rem;
            }
            
            .tool-card {
                padding: 1.5rem;
            }
            
            .newsletter-form {
                flex-direction: column;
            }
            
            .newsletter-input {
                width: 100%;
            }
        }

        
        @media (max-width: 480px) {
            .author-name {
                font-size: 1.5rem;
            }

            header {
                padding: 2rem 1rem 1.5rem;
            }

            .nav-btn {
                padding: 0.5rem 0.8rem;
                font-size: 0.8rem;
            }

            .books-grid.four-books {
                grid-template-columns: 1fr;
                gap: 1.5rem;
                max-width: 280px;
                margin: 0 auto;
            }
        }

        
        @media (hover: none) and (pointer: coarse) {
            
            .book-card:hover {
                transform: none;
            }

            .nav-btn:hover::before {
                width: 0;
                height: 0;
            }

            
            .book-card:active {
                transform: scale(0.98);
            }

            .nav-btn:active {
                transform: scale(0.95);
            }

            
            .mouse-trail {
                display: none;
            }

            
            .particle {
                display: none;
            }
        }

/* Cosmic Grimoire Styles */
.grimoire-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.grimoire-header {
    text-align: center;
    margin-bottom: 3rem;
}

.grimoire-title {
    color: var(--primary-green);
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.grimoire-subtitle {
    color: #b8a6ff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.grimoire-badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(26, 0, 51, 0.6);
    border: 1px solid rgba(157, 78, 221, 0.4);
    color: #b8a6ff;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-btn:hover {
    background: rgba(157, 78, 221, 0.2);
    border-color: rgba(157, 78, 221, 0.8);
    color: #d4c3ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(157, 78, 221, 0.3);
}

.category-btn.active {
    background: linear-gradient(135deg, rgba(157, 78, 221, 0.4), rgba(0, 255, 136, 0.1));
    border-color: var(--primary-green);
    color: var(--primary-green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), inset 0 0 20px rgba(157, 78, 221, 0.2);
    transform: translateY(-1px);
}

.category-btn.active .category-icon {
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.category-btn.active .category-label {
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.category-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.category-description {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: lowercase;
}

.grimoire-search {
    max-width: 500px;
    margin: 0 auto 3rem auto;
}

.grimoire-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(26, 0, 51, 0.5);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 10px;
    color: #e8e8e8;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.grimoire-search-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.grimoire-search-input::placeholder {
    color: #7a6b93;
}

.grimoire-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.grimoire-post {
    background: rgba(26, 0, 51, 0.5);
    border: 1px solid rgba(157, 78, 221, 0.3);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.grimoire-post:hover {
    border-color: var(--primary-green);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.grimoire-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), #9d4edd);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grimoire-post:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.post-category {
    background: rgba(157, 78, 221, 0.2);
    color: #b8a6ff;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-date {
    color: #7a6b93;
    font-weight: 500;
}

.post-title {
    color: var(--primary-green);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-family: 'Cinzel', serif;
}

.post-subtitle {
    color: #b8a6ff;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.4;
}

.post-preview {
    color: #e8e8e8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(157, 78, 221, 0.2);
    font-size: 0.85rem;
}

.read-time {
    color: #7a6b93;
    font-weight: 500;
}

.post-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-tag {
    color: #9d4edd;
    font-size: 0.8rem;
    font-weight: 500;
}

.read-more {
    color: var(--primary-green);
    font-weight: 600;
    white-space: nowrap;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #b8a6ff;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem auto;
    border: 3px solid rgba(157, 78, 221, 0.3);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Category-specific styling */
.ai-alchemy .post-category { background: rgba(0, 255, 136, 0.2); color: var(--primary-green); }
.spirit-summoning .post-category { background: rgba(157, 78, 221, 0.2); color: #b8a6ff; }
.cosmic-economics .post-category { background: rgba(255, 215, 0, 0.2); color: #ffd700; }
.visual-sorcery .post-category { background: rgba(220, 20, 60, 0.2); color: #dc143c; }

/* Responsive design for grimoire */
@media (max-width: 768px) {
    .grimoire-posts {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-filter {
        flex-direction: column;
        align-items: center;
    }
    
    .category-btn {
        width: 200px;
        text-align: center;
    }
}

/* Enhanced Lightning Container */
.lightning-container {
    position: fixed;
    top: 0;
    left: 0;    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

/* Realistic lightning styles */
.realistic-lightning {
    position: absolute;
    width: 100px;
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(255, 120, 120, 0.3));
    z-index: 7;
    animation: flash-pulse 0.4s ease-out forwards;
    will-change: opacity;
}

@keyframes flash-pulse {
    0% { opacity: 0.3; }
    5% { opacity: 1; }
    20% { opacity: 0.7; }
    30% { opacity: 0.9; }
    50% { opacity: 0.4; }
    75% { opacity: 0.2; }
    100% { opacity: 0; }
}

/* Lightning SVG bolt parts */
.bolt-outer-glow {
    stroke: rgba(255, 200, 200, 0.4);
    stroke-width: 12;
    fill: none;
    filter: blur(8px);
}

.bolt-middle-glow {
    stroke: rgba(255, 160, 160, 0.7);
    stroke-width: 6;
    fill: none;
    filter: blur(4px);
}

.bolt-inner-stroke {
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 2;
    fill: none;
}

.bolt-core {
    stroke: rgb(255, 255, 255);
    stroke-width: 1;
    fill: none;
}

.bolt-branch {
    stroke: rgba(255, 180, 180, 0.7);
    stroke-width: 1;
    fill: none;
}

.bolt-branch-glow {
    stroke: rgba(255, 220, 220, 0.5);
    stroke-width: 4;
    fill: none;
    filter: blur(3px);
}

/* Rolling Mist Effects */
.rolling-mist-container {
    position: fixed;
    bottom: -5vh;
    left: 0;
    width: 100%;
    height: 30vh;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}

.mist-layer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.mist-layer-1 { z-index: 3; }
.mist-layer-2 { z-index: 2; }
.mist-layer-3 { z-index: 1; }

.mist-element {
    position: absolute;
    bottom: -5vh;
    background: radial-gradient(
        ellipse at center,
        rgba(150, 20, 20, 0.15) 0%,
        rgba(100, 10, 10, 0.1) 40%,
        rgba(60, 0, 0, 0.07) 70%,
        transparent 100%
    );
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    animation: mistRoll 120s linear infinite;
    transform: translateZ(0);
}

@keyframes mistRoll {
    0% {
        transform: translateX(-10%) scale(1.05);
    }
    50% {
        transform: translateX(110%) scale(0.95);
    }
    100% {
        transform: translateX(-10%) scale(1.05);
    }
}

/* Rain Effects */
.rain-container {
    position: fixed;
    top: -20px;
    left: 0;
    width: 100%;
    height: 120vh; /* Extra height to ensure full coverage */
    pointer-events: none;
    z-index: 10; /* Increased z-index to ensure visibility */
    overflow: hidden;
}

.rain {
    position: absolute;
    width: 1.5px;
    height: 25px;
    background: linear-gradient(to bottom, transparent, rgba(178, 0, 0, 0.8) 40%, rgba(178, 0, 0, 0.6) 80%, transparent);
    animation: rainFall 0.5s linear infinite;
    will-change: transform; /* Performance optimization */
    filter: drop-shadow(0 0 2px rgba(255, 0, 0, 0.3)); /* Slight glow for better visibility */
}

@keyframes rainFall {
    0% {
        transform: translateY(-30px) translateX(-40px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 50px)) translateX(160px); /* Much more diagonal movement */
        opacity: 0;
    }
}

/* Blood container */
.blood-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 11; /* Higher z-index to ensure visibility */
}

/* Lightning Flash Effect */
.lightning-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(200, 220, 255, 0.6) 20%,
        rgba(150, 180, 255, 0.4) 50%,
        rgba(100, 140, 255, 0.3) 80%,
        transparent 100%
    );    opacity: 0;
    transition: opacity 0.1s ease-out;
    pointer-events: none;
    z-index: 15;
    mix-blend-mode: screen;
}

/* Lightning Bolt Effects */
.lightning-bolt-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 14;
    overflow: hidden;
}

.lightning-bolt {
    position: absolute;
    opacity: 0;
    animation: lightningStrike 0.45s ease-out forwards; /* Even faster animation */
}

@keyframes lightningStrike {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top center;
    }
    10% {
        opacity: 1;
        transform: scaleY(0.2);
    }
    25% {
        opacity: 0.95;
        transform: scaleY(0.6);
    }
    40% {
        opacity: 1;
        transform: scaleY(1);
    }
    60% {
        opacity: 0.9;
        transform: scaleY(1);
    }
    100% {
        opacity: 0;
        transform: scaleY(1);    }
}

/* Cosmic/Forge Effects */
.starfield-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cosmic-star {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: starTwinkle 4s ease-in-out infinite;
}

.star-small {
    width: 1px;
    height: 1px;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.star-medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.7);
}

.star-large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.star-bright {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 1), 0 0 20px rgba(255, 255, 255, 0.5);
    animation: starTwinkleBright 3s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% {
        opacity: 0.1;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

@keyframes starTwinkleBright {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.7);
    }
    50% {
        opacity: 1;
        transform: scale(1.8);
    }
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: shootingStarMove 2s linear forwards;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.2) 60%, transparent 90%);
    transform: translate(-99%, -50%) rotate(-135deg);
    transform-origin: left center;
}

@keyframes shootingStarMove {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: translateX(300px) translateY(300px);
    }
}

/* Large shooting star variant - appears closer/brighter */
.shooting-star-large {
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 70%);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    animation: shootingStarLargeMove 3s linear forwards;
}

.shooting-star-large::after {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 70%, transparent 100%);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.6);
    transform: translate(-100%, -50%) rotate(-135deg);
    transform-origin: left center;
}

@keyframes shootingStarLargeMove {
    0% {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(0.5);
    }
    5% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1);
    }
    95% {
        opacity: 0.9;
        transform: translateX(400px) translateY(400px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(450px) translateY(450px) scale(1.5);
    }
}

/* Tentacle Effects */
.tentacle-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

@keyframes tentacleSway {
  0% { transform: translateY(0) scale(1) rotate(-2deg); }
  20% { transform: translateY(0) scale(1) rotate(2deg); }
  40% { transform: translateY(0) scale(1) rotate(-1.5deg); }
  60% { transform: translateY(0) scale(1) rotate(2deg); }
  80% { transform: translateY(0) scale(1) rotate(-2deg); }
  100% { transform: translateY(0) scale(1) rotate(-2deg); }
}

.lovecraft-tentacle {
  position: absolute;
  opacity: 0;
  animation: tentacleRise 3s ease-out forwards, tentacleSway 4s ease-in-out 3s infinite;
  transform-origin: bottom center;
}

.tentacle-1 { bottom: -50px; left: 5%; width: 80px; }
.tentacle-2 { bottom: -60px; left: 12%; width: 70px; }
.tentacle-3 { bottom: -40px; right: 8%; width: 85px; }
.tentacle-4 { bottom: -55px; right: 15%; width: 75px; }
.tentacle-5 { bottom: -45px; left: 25%; width: 65px; }
.tentacle-6 { bottom: -65px; right: 25%; width: 90px; }
.tentacle-7 { bottom: -35px; left: 40%; width: 70px; }
.tentacle-8 { bottom: -50px; right: 35%; width: 80px; }

.tentacle-svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.7));
}

@keyframes tentacleRise {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    50% {
        opacity: 0.7;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 0.9;
        transform: translateY(0) scale(1);
    }
}

/* Abyssal Eyes */
.abyssal-eyes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
    overflow: hidden;
}

.abyssal-eye {
    position: absolute;
    width: 24px;
    height: 16px;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 100, 0, 0.9) 0%,
        rgba(255, 150, 50, 0.8) 30%,
        rgba(180, 80, 20, 0.7) 60%,
        rgba(120, 40, 10, 0.6) 80%,
        rgba(60, 20, 5, 0.4) 100%
    );
    border-radius: 50%;
    box-shadow: 
        0 0 8px rgba(255, 100, 0, 0.6),
        inset 0 0 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    transform-origin: center;
}

.eye-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 10px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 1px;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

/* Blog Post Styles - Cosmic Grimoire Aesthetic */
.back-button-container {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    background: #000c;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: .5rem;
}

.back-btn {
    background: transparent;
    border: 1px solid rgba(157,78,221,.3);
    color: var(--primary-purple);
    padding: .5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    transition: all .3s ease;
    display: inline-block;
}

.back-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.blog-post-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 6rem 2rem 2rem;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.post-meta-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
    font-size: .9rem;
    color: #999;
}

.category-badge {
    background: #00ff881a;
    color: var(--primary-green);
    padding: .4rem 1rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid rgba(0,255,136,.3);
}

.article-header {
    text-align: center;
    margin-bottom: 4rem;
}

.article-title {
    font-family: Cinzel,serif;
    font-size: 3.5rem;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.article-subtitle {
    font-size: 1.4rem;
    color: #b8a6ff;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.article-tags {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.article-tag {
    color: #9d4edd;
    font-size: .9rem;
    opacity: .8;
}

.article-content {
    background: #1a0033;
    border: 1px solid rgba(157,78,221,.2);
    border-radius: 15px;
    padding: 3rem;
    margin-bottom: 3rem;
    line-height: 1.8;
    color: #e0e0e0;
    font-size: 1.15rem;
    font-family: Crimson Text,serif;
    position: relative;
    z-index: 1;
}

.article-content h1:first-child {
    display: none;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    font-family: Cinzel,serif;
    color: #9d4edd;
    margin: 2.5rem 0 1.5rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.article-content h1 {
    font-size: 2.2rem;
}

.article-content h2 {
    font-size: 1.8rem;
}

.article-content h3 {
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.8rem;
}

.article-content strong {
    color: #fff;
    font-weight: 600;
}

.article-content em {
    color: #b8a6ff;
}

.article-content code {
    background: #00000080;
    padding: .3rem .6rem;
    border-radius: 4px;
    font-family: Courier New,monospace;
    color: var(--primary-green);
    font-size: .95em;
}

.article-content pre {
    background: #000000b3;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(157,78,221,.2);
}

.article-content blockquote {
    border-left: 4px solid var(--primary-green);
    padding-left: 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #b8a6ff;
}

.share-section {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(157,78,221,.2);
    margin-top: 3rem;
}

.share-title {
    color: #b8a6ff;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.share-btn {
    padding: .75rem 1.5rem;
    background: #9d4edd33;
    border: 1px solid rgba(157,78,221,.3);
    color: var(--text-purple);
    border-radius: 5px;
    cursor: pointer;
    transition: all .3s ease;
}

.share-btn:hover {
    background: #9d4edd66;
    color: var(--text-light);
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-link {
    display: block;
    padding: 1.5rem;
    background: #1a003399;
    border: 1px solid rgba(157,78,221,.3);
    border-radius: 10px;
    text-decoration: none;
    transition: all .3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
    border-color: var(--primary-green);
    box-shadow: 0 5px 15px #9d4edd4d;
}

.nav-link.next {
    text-align: right;
}

.nav-direction {
    display: block;
    color: var(--primary-green);
    font-size: .9rem;
    margin-bottom: .5rem;
}

.nav-title {
    color: var(--text-light);
    font-weight: 600;
    font-size: 1.1rem;
}

.related-section {
    margin: 4rem 0;
}

.related-title {
    font-family: Cinzel,serif;
    font-size: 2rem;
    color: var(--primary-purple);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 2rem;
}

.related-card {
    background: #1a003399;
    border: 1px solid rgba(157,78,221,.3);
    border-radius: 15px;
    padding: 2rem;
    text-decoration: none;
    transition: all .3s ease;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: 0 10px 30px #9d4edd66;
}

.related-category {
    color: var(--primary-green);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .5rem;
}

.related-card-title {
    color: var(--text-light);
    font-size: 1.3rem;
    margin-bottom: .5rem;
    line-height: 1.3;
}

.related-preview {
    color: #ccc;
    font-size: .95rem;
    line-height: 1.5;
}

.blog-newsletter-section {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 4rem;
}

.cosmic-grimoire-box {
    background: #1a00334d;
    border: 1px solid rgba(157,78,221,.3);
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    margin: 0 auto;
}

.grimoire-cta-title {
    font-family: Cinzel,serif;
    font-size: 2rem;
    color: var(--primary-green);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.grimoire-cta-subtitle {
    color: #b8a6ff;
    font-size: 1.1rem;
}

.blog-footer {
    text-align: center;
    padding: 3rem;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 4rem;
}

.blog-footer a {
    color: var(--primary-red);
    text-decoration: none;
}

.blog-footer a:hover {
    text-decoration: underline;
}

.newsletter-final {
    background: linear-gradient(135deg,#dc143c1a,#8b000033);
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(220,20,60,.3);
    margin-top: 4rem;
}

.newsletter-final h2 {
    font-family: Cinzel,serif;
    color: #dc143c;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.newsletter-final p {
    color: #ccc;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.newsletter-final form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
    justify-content: center;
}

.newsletter-final input {
    flex: 1;
    padding: 1rem;
    background: #00000080;
    border: 1px solid rgba(220,20,60,.3);
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
}

.newsletter-final button {
    padding: 1rem 2rem;
    background: #dc143c;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .1em;
    transition: all .3s ease;
}

.newsletter-final button:hover {
    background: #b91c1c;
}

/* Blog Post Mobile Styles */
@media (max-width: 768px) {
    .back-button-container {
        top: 1rem;
        left: 1rem;
        right: 1rem;
    }

    .blog-post-article {
        padding: 4rem 1rem 2rem;
    }

    .article-title {
        font-size: 2.5rem;
    }

    .article-subtitle {
        font-size: 1.2rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .newsletter-final form {
        flex-direction: column;
    }

    .newsletter-final input {
        width: 100%;
    }
}