/* Crimson Protocol */
/* main.css */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');
:root {
    --backgroundColor: #050505;
    --text-light: #f8f9fa;
    --color-crimson: rgb(138, 0, 28);
    --color-darkgray: #343a40;
    --color-nearblack: #1b1b1b;
    --nav-height: 100px;
    --flag-depth: 14px;
    --notch-width: 100%; 
}
html, body {
    min-height: 100vh;
    min-width: 100vw;
    padding: 0;
    margin: 0;
    background-color: var(--backgroundColor);
    overflow-x: hidden;
    font-family: 'Merriweather', serif;
}
.crpr-flex {
    display: flex;
}
.crpr-flex-col {
    flex: 1 1 auto;
}
/* General Styles */
.crpr-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    overflow-y: auto;
}
/* Layout Constraints */
.crpr-constrain {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}
@supports (height: 100svh) {
    .crpr-body { 
        min-height: 100svh;
    }
}
.crpr-main {
    flex: 1 1 auto;
    width: 100%;

}
    /* Top Nav */
    .crpr-nav-top-container {
        position: fixed;
        top: 0; left: 0; right: 0;
        height: var(--nav-height);
        display: flex;
        z-index: 100;
    } 
    .crpr-nav-top-contents {
        max-width: 1200px;
        width: 100%;
        margin: auto;
        height: var(--nav-height);
        background-color: var(--backgroundColor);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }
    
    .crpr-nav-links-row {
        display: contents; /* Default: allows children to participate in parent flex */
    }
    
    .crpr-nav-top-left, .crpr-nav-top-right {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .crpr-nav-top-center {
        font-family: 'Cinzel', serif;
        font-size: 24px;
        text-align: center;
        position: relative;
        flex: 0 0 200px;
        background-color: var(--color-crimson);
        color: var(--text-light);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 2;
        margin: 0 20px;
    }

    .crpr-nav-top-center::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: calc(-1 * var(--flag-depth));
        width: var(--notch-width);
        height: var(--flag-depth);
        background-color: var(--color-crimson);
        clip-path: polygon(0 0, 50% 100%, 100% 0);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1;
    }

    .crpr-nav-btn {
        font-family: 'Cinzel', serif;
        font-size: 14px;
        text-decoration: none;
        color: var(--text-light);
        padding: 8px 16px;
        position: relative;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .crpr-nav-btn::before, .crpr-nav-btn::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(to right, 
            transparent 0%, 
            var(--color-crimson) 20%, 
            var(--color-crimson) 80%, 
            transparent 100%);
        transform: scaleX(0);
        transition: transform 0.3s ease;
    }

    .crpr-nav-btn::before {
        top: 0;
    }

    .crpr-nav-btn::after {
        bottom: 0;
    }

    .crpr-nav-btn:hover {
        color: var(--color-crimson);
        text-shadow: 0 0 8px rgba(138, 0, 28, 0.3);
    }

    .crpr-nav-btn:hover::before, .crpr-nav-btn:hover::after {
        transform: scaleX(1);
    }
    /* Footer */
    .crpr-footer-container {
        flex: 0 0 auto;
        background-color: var(--color-nearblack);
        width: 100%;
        position: relative;
        border-top: 1px solid rgba(138, 0, 28, 0.3);
        z-index: 10;
    }

    .crpr-footer-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        opacity: 0.05;
        pointer-events: none;
    }

    .crpr-footer-columns {
        flex-direction: row;
        padding: 40px 20px;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        position: relative;
        gap: 30px;
    }

    .crpr-footer-top-row {
        display: contents; /* Default: allows children to participate in parent flex */
    }

    .crpr-footer-column-left, 
    .crpr-footer-column-center, 
    .crpr-footer-column-right {
        flex: 1;
        padding: 0 20px;
    }

    .crpr-footer-columns ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .crpr-footer-section-title {
        color: var(--color-crimson);
        font-family: 'Cinzel', serif;
        font-size: 18px;
        margin-bottom: 15px;
        text-shadow: 0 0 10px rgba(138, 0, 28, 0.3);
        position: relative;
        padding-bottom: 10px;
    }

    .crpr-footer-section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 40px;
        height: 2px;
        background: linear-gradient(90deg, var(--color-crimson), transparent);
    }

    .crpr-footer-section-desc {
        color: var(--text-light);
        font-size: 13px;
        margin-bottom: 20px;
        opacity: 0.8;
        line-height: 1.6;
    }

    .crpr-footer-columns ul li {
        margin-bottom: 15px;
        color: var(--text-light);
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        padding-left: 30px;
        display: flex;
        align-items: center;
    }

    .crpr-footer-columns ul li i {
        position: absolute;
        left: 0;
        color: var(--color-crimson);
        font-size: 16px;
        transition: all 0.3s ease;
    }

    .crpr-footer-columns ul li:hover {
        color: var(--color-crimson);
        transform: translateX(5px);
    }

    .crpr-footer-columns ul li:hover i {
        color: var(--text-light);
        transform: scale(1.2);
    }

    .crpr-footer-columns ul li a {
        color: inherit;
        text-decoration: none;
        transition: color 0.3s ease;
    }

    .crpr-footer-columns ul li a:hover {
        color: inherit;
    }

    .crpr-footer-newsletter-title {
        color: var(--text-light);
        font-family: 'Cinzel', serif;
        font-size: 20px;
        margin-bottom: 15px;
        text-shadow: 0 0 10px rgba(138, 0, 28, 0.3);
    }

    .crpr-footer-newsletter-body {
        color: var(--text-light);
        font-size: 14px;
        margin-bottom: 20px;
        line-height: 1.6;
    }

    .crpr-footer-newsletter-form {
        display: flex;
        gap: 10px;
    }

    .crpr-footer-newsletter-form input {
        flex: 1;
        padding: 12px;
        background-color: rgba(0, 0, 0, 0.6);
        border: 1px solid var(--color-darkgray);
        color: var(--text-light);
        border-radius: 2px;
        font-family: 'Merriweather', serif;
        transition: all 0.3s ease;
    }

    .crpr-footer-newsletter-form input:focus {
        outline: none;
        border-color: var(--color-crimson);
        box-shadow: 0 0 5px rgba(138, 0, 28, 0.3);
    }

    .crpr-footer-newsletter-form .crpr-btn {
        background: linear-gradient(45deg, var(--color-crimson), #b30017);
        border: none;
        padding: 12px 20px;
        font-family: 'Cinzel', serif;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .crpr-footer-newsletter-form .crpr-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(138, 0, 28, 0.4);
    }

    .crpr-footer-bottom-strip {
        height: 40px;
        background-color: var(--backgroundColor);
        line-height: 40px;
        width: 100%;
        color: var(--text-light);
        font-size: 12px;
        text-align: center;
        position: relative;
        border-top: 1px solid rgba(138, 0, 28, 0.2);
    }

    .crpr-footer-bottom-strip::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent,
            var(--color-crimson),
            transparent
        );
    }
    /* Buttons */
    .crpr-btn {
        border: 2px solid var(--text-light);
        background-color: var(--color-darkgray);
        color: var(--text-light);
        padding: 10px 15px;
        border-radius: 2px;
        position: relative;
        cursor: pointer;
    }
    .crpr-btn-shink {
        width: max-content;
        margin: auto;
    }
    /* Modal */
    .crpr-modal-backsplash {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(5px);
    }

    .crpr-modal-backsplash.active {
        display: flex;
        opacity: 1;
        align-items: center;
        justify-content: center;
        padding: 20px;
        box-sizing: border-box;
    }

    .crpr-modal-container {
        background-color: var(--color-darkgray);
        width: 90%;
        max-width: 600px;
        max-height: 90vh;
        border: 1px solid var(--color-crimson);
        box-shadow: 0 0 30px rgba(138, 0, 28, 0.3);
        border-radius: 8px;
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .crpr-modal-backsplash.active .crpr-modal-container {
        transform: translateY(0);
        opacity: 1;
    }

    .crpr-modal-header {
        padding: 20px;
        border-bottom: 1px solid rgba(138, 0, 28, 0.3);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        background-color: var(--color-nearblack);
    }

    .crpr-modal-title {
        color: var(--text-light);
        font-family: 'Cinzel', serif;
        font-size: 24px;
        text-shadow: 0 0 10px rgba(138, 0, 28, 0.3);
        margin: 0;
    }

    .crpr-modal-close {
        cursor: pointer;
        color: var(--text-light);
        transition: all 0.3s ease;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 24px;
        background: none;
        border: none;
    }

    .crpr-modal-close:hover {
        color: var(--color-crimson);
        transform: rotate(90deg);
        background-color: rgba(138, 0, 28, 0.1);
    }

    .crpr-modal-content {
        padding: 30px;
        color: var(--text-light);
        overflow-y: auto;
        line-height: 1.6;
        flex: 1;
        min-height: 0;
    }

    .crpr-modal-content h2 {
        color: var(--color-crimson);
        font-family: 'Cinzel', serif;
        font-size: 20px;
        margin: 20px 0 10px;
    }

    .crpr-modal-content p {
        margin-bottom: 15px;
    }

    .crpr-modal-content::-webkit-scrollbar {
        width: 8px;
    }

    .crpr-modal-content::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
    }

    .crpr-modal-content::-webkit-scrollbar-thumb {
        background: var(--color-crimson);
        border-radius: 4px;
    }

    .crpr-modal-footer {
        padding: 20px;
        border-top: 1px solid rgba(138, 0, 28, 0.3);
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        flex-shrink: 0;
        background-color: var(--color-darkgray);
    }

    /* Modal Form Styles */
    .crpr-modal-form .crpr-form-group {
        margin-bottom: 20px;
    }

    .crpr-modal-form .crpr-form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: var(--text-light);
        font-family: 'Cinzel', serif;
    }

    .crpr-modal-form .crpr-form-group input,
    .crpr-modal-form .crpr-form-group select,
    .crpr-modal-form .crpr-form-group textarea {
        width: 100%;
        padding: 12px;
        border: 1px solid var(--color-darkgray);
        background: rgba(0, 0, 0, 0.3);
        color: var(--text-light);
        border-radius: 4px;
        font-family: 'Merriweather', serif;
        transition: border-color 0.3s ease;
        box-sizing: border-box;
    }

    .crpr-modal-form .crpr-form-group input:focus,
    .crpr-modal-form .crpr-form-group select:focus,
    .crpr-modal-form .crpr-form-group textarea:focus {
        outline: none;
        border-color: var(--color-crimson);
        box-shadow: 0 0 5px rgba(138, 0, 28, 0.3);
    }

    .crpr-modal-form .crpr-form-group textarea {
        resize: vertical;
        min-height: 120px;
    }

    /* Modal Responsive Design moved to bottom */

    /* Ensure body visibility when modal is active */
    body.modal-open {
        overflow: hidden !important;
        opacity: 1 !important;
    }

    /* Ensure modal content is fully visible and properly styled */
    .crpr-modal-backsplash.active .crpr-modal-content {
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--text-light) !important;
    }

    /* Fix any potential text selection issues */
    .crpr-modal-content * {
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
    }

    .crpr-form-message {
        margin-top: 15px;
        padding: 12px;
        border-radius: 4px;
        text-align: center;
        font-weight: bold;
        font-family: 'Merriweather', serif;
    }

    .crpr-message-success {
        background-color: rgba(40, 167, 69, 0.2);
        color: #28a745;
        border: 1px solid rgba(40, 167, 69, 0.3);
    }

    .crpr-message-error {
        background-color: rgba(220, 53, 69, 0.2);
        color: #dc3545;
        border: 1px solid rgba(220, 53, 69, 0.3);
    }

    /* Guidelines styling */
    .crpr-modal-content .crpr-guidelines-content {
        line-height: 1.6;
        font-family: 'Merriweather', serif;
    }

    .crpr-modal-content .crpr-guidelines-content h3 {
        color: var(--color-crimson) !important;
        font-family: 'Cinzel', serif !important;
        margin-top: 30px !important;
        margin-bottom: 15px !important;
        font-size: 1.4em !important;
    }

    .crpr-modal-content .crpr-guidelines-content h4 {
        color: var(--text-light) !important;
        font-family: 'Cinzel', serif !important;
        margin-top: 25px !important;
        margin-bottom: 10px !important;
        font-size: 1.2em !important;
    }

    .crpr-modal-content .crpr-guidelines-content p {
        color: var(--text-light) !important;
        margin-bottom: 15px !important;
        line-height: 1.6 !important;
    }

    .crpr-modal-content .crpr-guidelines-content ul {
        margin: 10px 0 !important;
        padding-left: 20px !important;
        color: var(--text-light) !important;
    }

    .crpr-modal-content .crpr-guidelines-content li {
        margin-bottom: 8px !important;
        color: var(--text-light) !important;
    }

    .crpr-modal-content .crpr-guidelines-content strong {
        color: var(--color-crimson) !important;
        font-weight: bold !important;
    }

    .crpr-modal-content .crpr-guidelines-note {
        background: rgba(138, 0, 28, 0.1) !important;
        border: 1px solid var(--color-crimson) !important;
        border-radius: 6px !important;
        padding: 20px !important;
        margin-top: 30px !important;
    }

    .crpr-modal-content .crpr-guidelines-note h4 {
        color: var(--color-crimson) !important;
        margin-top: 0 !important;
    }

/* Home Styles */
.crpr-view-all-btn {
    display: block;
    width: fit-content;
    margin: 3rem auto 0;
    padding: 1.2rem 3rem;
    background: var(--color-crimson);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crpr-view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 0, 28, 0.4);
}

.crpr-view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}
.crpr-hero {
    height: 100vh;
    background-image: url(/public/images/bg-wide-landscape.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.chapter-countdown {
    width: 100%;
    background: rgba(138, 0, 28, 0.9);
    color: var(--text-light);
    text-align: center;
    padding: 1rem;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.chapter-countdown-time {
    font-weight: bold;
    font-size: 1.2em;
    margin-left: 10px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.crpr-hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.crpr-hero-scroll-text {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.crpr-hero-scroll-arrows {
    position: relative;
    animation: bounce 2s infinite;
}

.crpr-hero-scroll-arrows i {
    display: block;
    font-size: 20px;
    line-height: 12px;
    color: var(--color-crimson);
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.3);
}

.crpr-hero-scroll-arrows i:first-child {
    opacity: 0.5;
    animation: fadeInOut 2s infinite;
}

.crpr-hero-scroll:hover {
    transform: translateX(-50%) scale(1.1);
}

/* .crpr-hero-scroll:hover .crpr-hero-scroll-text {
    color: var(--color-crimson);
} */
.crpr-hero-content-sm {
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    max-width: 1200px;
    width: 100%;
}
.crpr-hero-content {
    margin: auto;
    max-width: 1200px;
    width: 100%;
    margin-top: 50px;
}
.crpr-hero-content-left {
    width: 60%;
}
.crpr-hero-content-left-content {
    padding: 60px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--text-light);
    line-height: 35px;
    font-size: 20px;
    position: relative;
    z-index: 5;
}

.crpr-hero-content-left-socialtabs {
    position: relative;
    z-index: 10;
}

.crpr-hero-content-left-socialtabs > div {
    position: relative;
    height: 75px;
    width: 75px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.4);
    border-right: none;
}

/* Create the extending background for hover effect */
.crpr-hero-content-left-socialtabs > div::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 100%;
    height: calc(100% + 4px);
    width: 0;
    background-color: inherit;
    transition: width 0.3s ease;
    z-index: -1;
}

.crpr-hero-content-left-socialtabs > div::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    bottom: 5px;
    width: calc(100% - 12px);
    background: 
        linear-gradient(90deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 50%) top left/8px 1px repeat-x,
        linear-gradient(90deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 50%) bottom left/8px 1px repeat-x,
        linear-gradient(0deg, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 50%) top left/1px 8px repeat-y;
    pointer-events: none;
    opacity: 0.8;
}

/* Add an inset shadow and extension effect */
.crpr-hero-content-left-socialtabs > div::after {
    content: '';
    position: absolute;
    inset: -2px;
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.3), 
                inset -2px -2px 4px rgba(255, 255, 255, 0.1);
    pointer-events: none;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.3s ease;
}

.socialtab-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.socialtab-text {
    position: absolute;
    left: 85px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-darkgray);
    color: var(--text-light);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.socialtab-text::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--color-darkgray);
}

.crpr-hero-content-left-socialtabs > div:hover .socialtab-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(5px);
}

.crpr-hero-content-left-socialtabs > div:hover {
    transform: translateX(-5px);
}

.crpr-hero-content-left-socialtabs > div:hover::after {
    clip-path: inset(0 -10px 0 0);
}

.crpr-hero-content-left-socialtabs-discord {
    background-color: #5865F2;
    color: white;
    font-size: 24px;
}

.crpr-hero-content-left-socialtabs-patreon {
    background-color: #FF424D;
    color: white;
    font-size: 24px;
}

.crpr-hero-content-left-socialtabs-royalroad {
    background-color: #0063AA;
    color: white;
    font-size: 24px;
}
.crpr-hero-content-right {
    width: 40%;
    text-align: center;
}
.crpr-hero-content-book {
    perspective: 1500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.crpr-hero-content-book img {
    max-width: 300px;
    transform: rotateY(-25deg) rotateX(5deg) rotateZ(-2deg);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-style: preserve-3d;
    box-shadow: 
        20px 20px 30px rgba(0, 0, 0, 0.4),
        -15px 0 30px rgba(0, 0, 0, 0.2),
        2px 2px 2px rgba(255, 255, 255, 0.1) inset,
        -2px -2px 2px rgba(0, 0, 0, 0.2) inset,
        12px 0 15px rgba(0, 0, 0, 0.5);
    position: relative;
}

.crpr-hero-content-book img::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 100%;
    transform: rotateY(90deg);
    transform-origin: right;
    background: linear-gradient(to left, rgba(0,0,0,0.2), rgba(0,0,0,0.1));
}

.crpr-hero-content-book:hover img {
    transform: rotateY(0deg) rotateX(0deg) rotateZ(0deg);
    box-shadow: 
        0 20px 30px rgba(0, 0, 0, 0.4),
        2px 2px 2px rgba(255, 255, 255, 0.1) inset,
        -2px -2px 2px rgba(0, 0, 0, 0.2) inset,
        8px 0 10px rgba(0, 0, 0, 0.3);
}

.crpr-hero-read-btn {
    position: relative;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--color-crimson), #b30017);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 18px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.crpr-hero-read-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s ease;
}

.crpr-hero-read-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 0, 28, 0.4);
}

.crpr-hero-read-btn:hover::before {
    left: 100%;
}
.crpr-cta {
    padding: 100px 40px;
    background-color: var(--color-nearblack);
    position: relative;
    overflow: hidden;
}

.crpr-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url(/public/images/leather2_sm.jpg);
    opacity: 0.1;
    pointer-events: none;
}

.crpr-cta-content {
    position: relative;
    margin: auto;
    max-width: 800px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 40px;
    border: 1px solid var(--color-crimson);
    box-shadow: 0 0 20px rgba(138, 0, 28, 0.2);
}

.crpr-cta-title {
    text-align: center;
    color: var(--color-crimson);
    font-family: 'Cinzel', serif;
    font-size: 28px;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.3);
}

.crpr-cta-body {
    color: var(--text-light);
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.crpr-cta-field {
    justify-content: center;
    gap: 15px;
}

.crpr-cta-field input {
    width: 300px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--color-darkgray);
    color: var(--text-light);
    border-radius: 2px;
    font-family: 'Merriweather', serif;
    transition: border-color 0.3s ease;
}

.crpr-cta-field input:focus {
    outline: none;
    border-color: var(--color-crimson);
    box-shadow: 0 0 5px rgba(138, 0, 28, 0.3);
}

.crpr-cta-field .crpr-btn {
    background-color: var(--color-crimson);
    transition: all 0.3s ease;
    min-width: 150px;
}

.crpr-cta-field .crpr-btn:hover {
    background-color: rgba(138, 0, 28, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.crpr-features {
    min-height: 100vh;
    padding: 100px 0px;
    background-image: url(/public/images/BGRunicSpiral.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}

.crpr-book-title {
    text-align: center;
    color: var(--text-light);
    font-size: 28px;
    font-family: 'Cinzel', serif;
    margin-bottom: 40px;
    padding-top: 40px;
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.5);
}
.crpr-book-content {
    margin: auto;
    max-width: 1200px;
    width: 100%;
    justify-content: space-between;
}
.crpr-book-carousel {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    perspective: 1000px;
}

.crpr-book-carousel-item {
    width: 350px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(138, 0, 28, 0.3);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.crpr-book-carousel-book {
    width: 200px;
    height: 280px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    /* transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); */
}

.crpr-book-carousel-item:nth-child(1) .crpr-book-carousel-book {
    background: url(/public/images/cover1RC.png) center/cover;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(138, 0, 28, 0.3);
}

.crpr-book-carousel-item:nth-child(2) .crpr-book-carousel-book {
    background: linear-gradient(135deg, var(--color-darkgray) 0%, #1a1e21 100%);
    position: relative;
    overflow: hidden;
}

.crpr-book-carousel-item:nth-child(2) .crpr-book-carousel-book::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--color-crimson) 0%, transparent 100%);
    animation: fillUp 3s ease-out infinite;
}

.crpr-book-carousel-item:nth-child(2) .crpr-book-carousel-book {
    background: linear-gradient(135deg, var(--color-darkgray) 0%, #1a1e21 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Cinzel', serif;
    font-size: 24px;
    text-transform: uppercase;
}

.crpr-book-carousel-item:nth-child(3) .crpr-book-carousel-book {
    background: linear-gradient(135deg, var(--color-darkgray) 0%, #1a1e21 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Cinzel', serif;
    font-size: 24px;
    text-transform: uppercase;
}

.crpr-book-carousel-title {
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px 20px;
    /* background: rgba(0, 0, 0, 0.5); */
    width: 100%;
}

.crpr-book-carousel-blurb {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.crpr-book-carousel-button {
    margin-top: auto;
}

.crpr-book-carousel-button div {
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--color-crimson), #b30017);
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.crpr-book-carousel-button div::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s ease;
}

.crpr-book-carousel-button div:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 0, 28, 0.4);
}

.crpr-book-carousel-button div:hover::before {
    left: 100%;
}

.crpr-book-carousel-item:hover {
    transform: translateY(-5px);
}

/* .crpr-book-carousel-item:hover .crpr-book-carousel-book {
    transform: rotateY(-15deg) rotateX(5deg);
} */

@keyframes fillUp {
    0% {
        height: 0;
        opacity: 0.6;
    }
    50% {
        height: 60%;
        opacity: 0.8;
    }
    100% {
        height: 0;
        opacity: 0.6;
    }
}
.crpr-codex {
    padding: 100px 0;
    position: relative;
}

.crpr-codex::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    pointer-events: none;
}

.crpr-codex-title {
    text-align: center;
    color: var(--text-light);
    font-size: 28px;
    font-family: 'Cinzel', serif;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.5);
}

.crpr-codex-content {
    margin: auto;
    max-width: 1200px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.crpr-codex-carousel {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
}

.crpr-codex-carousel-item {
    height: 550px;
    width: 300px;
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid rgba(138, 0, 28, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.crpr-codex-carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0.9) 100%
    );
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.crpr-codex-carousel-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(138, 0, 28, 0.4);
}

.crpr-codex-carousel-item:hover::before {
    opacity: 0.7;
}

.crpr-codex-carousel-title {
    padding-top: 150px;
    z-index: 2;
    position: relative;
    text-align: center;
}

.crpr-codex-carousel-title hr {
    border: 0;
    height: 1px;
    width: 60%;
    margin: 15px auto;
    background-image: linear-gradient(
        to right,
        rgba(138, 0, 28, 0),
        rgba(138, 0, 28, 0.75),
        rgba(138, 0, 28, 0)
    );
}

.crpr-codex-carousel-title-text {
    text-align: center;
    color: var(--text-light);
    font-size: 24px;
    font-family: 'Cinzel', serif;
    padding: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.crpr-codex-carousel-character-icon {
    width: 80px;
    height: 80px;
    text-align: center;
    border: 3px solid var(--color-crimson);
    border-radius: 50%;
    margin: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 0 0 5px rgba(138, 0, 28, 0.2),
        0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.crpr-codex-carousel-item:hover .crpr-codex-carousel-character-icon {
    transform: scale(1.1);
}

.crpr-codex-carousel-character-icon img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.crpr-codex-carousel-blurb {
    position: relative;
    z-index: 2;
    margin: 20px;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-left: 3px solid var(--color-crimson);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.crpr-codex-carousel-button {
    position: relative;
    z-index: 2;
    margin-top: 20px;
    text-align: center;
}

.crpr-codex-carousel-button .crpr-btn {
    background: linear-gradient(45deg, var(--color-crimson), #b30017);
    border: none;
    padding: 12px 25px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.crpr-codex-carousel-button .crpr-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s ease;
}

.crpr-codex-carousel-button .crpr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(138, 0, 28, 0.4);
}

.crpr-codex-carousel-button .crpr-btn:hover::before {
    left: 100%;
}

.crpr-codex-carousel-item-character {
    background-image: url(/public/images/bg-hero-wide.jpg);
    background-size: cover;
    background-position: center;
}

.crpr-codex-carousel-item-location {
    background-image: url(/public/images/BGRoughSeas.png);
    background-size: cover;
    background-position: center;
}

.crpr-codex-carousel-item-lore {
    background-image: url(/public/images/BGRunicGate.png);
    background-size: cover;
    background-position: center;
}
.crpr-gallery {
    padding: 100px 20px;
    /* background-color: var(--backgroundColor); */
}

.crpr-gallery-title {
    text-align: center;
    color: var(--text-light);
    font-size: 28px;
    font-family: 'Cinzel', serif;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.5);
}

.crpr-gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.crpr-gallery-item {
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(138, 0, 28, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.crpr-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.crpr-gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.9) 0%, 
        rgba(138, 0, 28, 0.6) 50%, 
        rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    text-align: center;
}

.crpr-gallery-item-title {
    color: var(--text-light);
    font-family: 'Cinzel', serif;
    font-size: 20px;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.crpr-gallery-item-desc {
    color: var(--text-light);
    font-size: 14px;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.crpr-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(138, 0, 28, 0.4);
}

.crpr-gallery-item:hover img {
    transform: scale(1.1);
}

.crpr-gallery-item:hover .crpr-gallery-item-overlay {
    opacity: 1;
}

.crpr-gallery-item:hover .crpr-gallery-item-title,
.crpr-gallery-item:hover .crpr-gallery-item-desc {
    transform: translateY(0);
}

/* Lightbox */
.crpr-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.crpr-lightbox.active {
    display: flex;
    opacity: 1;
}

.crpr-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.crpr-lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.crpr-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.crpr-lightbox-close:hover {
    color: var(--color-crimson);
}

.crpr-contactus {
    background-image: url(/public/images/BGDarkSpires.png);
    background-size: cover;
    background-position: center;
    padding: 100px 20px;
    position: relative;
}

.crpr-contactus::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
}

.crpr-contactus-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(52, 58, 64, 0.9);
    border: 1px solid var(--color-crimson);
    box-shadow: 0 0 20px rgba(138, 0, 28, 0.2);
}

.crpr-contactus-title {
    text-align: center;
    color: var(--text-light);
    font-size: 28px;
    font-family: 'Cinzel', serif;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(138, 0, 28, 0.5);
}

.crpr-contactus-form-group {
    margin-bottom: 20px;
}

.crpr-contactus-input {
    width: 100%;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--color-darkgray);
    color: var(--text-light);
    border-radius: 2px;
    font-family: 'Merriweather', serif;
    transition: border-color 0.3s ease;
}

.crpr-contactus-input:focus {
    outline: none;
    border-color: var(--color-crimson);
    box-shadow: 0 0 5px rgba(138, 0, 28, 0.3);
}

.crpr-contactus-textarea {
    min-height: 150px;
    resize: vertical;
}

.crpr-contactus-form .crpr-btn {
    width: 100%;
    background-color: var(--color-crimson);
    transition: all 0.3s ease;
}

.crpr-contactus-form .crpr-btn:hover {
    background-color: rgba(138, 0, 28, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Read Styles */

/* Codex Styles */

/* Gallery Styles */

/* To Top Button */
.crpr-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-crimson);
    color: var(--text-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.crpr-to-top.visible {
    transform: translateY(0);
    opacity: 1;
}

.crpr-to-top:hover {
    background: #b30017;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 0, 28, 0.4);
}

/* Cookie Notice */
.crpr-cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    border-top: 1px solid var(--color-darkgray);
}

.crpr-cookie-notice.visible {
    transform: translateY(0);
}

.crpr-cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.crpr-cookie-text {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-light);
}

.crpr-cookie-text i {
    font-size: 24px;
    color: var(--color-crimson);
}

.crpr-cookie-text p {
    margin: 0;
    font-size: 14px;
}

.crpr-cookie-actions {
    display: flex;
    gap: 10px;
}

.crpr-btn-secondary {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--color-darkgray);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.crpr-btn-secondary:hover {
    border-color: var(--color-crimson);
    color: var(--color-crimson);
}

/* Cookie Settings Styles */
.cookie-settings-group {
    margin-top: 30px;
}

.cookie-setting {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
    border-radius: 4px;
}

.cookie-setting-content h3 {
    margin: 0 0 10px;
    color: var(--text-light);
    font-size: 16px;
}

.cookie-setting-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}

/* Cookie Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 5px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-darkgray);
    transition: .3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: var(--color-crimson);
}

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

.cookie-preferences-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-darkgray);
}

.cookie-preferences-info p {
    color: var(--text-light);
    opacity: 0.7;
    font-size: 14px;
    font-style: italic;
    margin: 0;
}

.modal-link {
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
}

.modal-link:hover {
    color: var(--accent-color-hover);
}

/* Floating Social Links */
.crpr-social-float {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
}

.crpr-social-float-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid var(--color-darkgray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.crpr-social-float-item::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--color-crimson), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.crpr-social-float-item:hover {
    transform: translateY(-3px);
    border-color: var(--color-crimson);
}

.crpr-social-float-item:hover::before {
    opacity: 1;
}

/* .crpr-social-float-item.discord:hover {
    color: #5865F2;
}

.crpr-social-float-item.patreon:hover {
    color: #FF424D;
}

.crpr-social-float-item.royal-road:hover {
    color: #0063AA;
}

.crpr-social-float-item.twitter:hover {
    color: #1DA1F2;
} */

/* Gallery View All Button */
.crpr-gallery-view-all {
    text-align: center;
    margin-top: 40px;
}

.crpr-gallery .crpr-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: var(--color-crimson);
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* .crpr-gallery .crpr-view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: transform 0.6s ease;
}

.crpr-gallery .crpr-view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(138, 0, 28, 0.4);
}

.crpr-gallery .crpr-view-all-btn:hover::before {
    transform: translateX(200%);
} */

/* Focus Mode Navigation Hide */
body:has(.crpr-reader-container.focus-mode) .crpr-nav-top-container {
    display: none !important;
}

body:has(.crpr-reader-container.focus-mode) .crpr-social-float {
    display: none !important;
}

body:has(.crpr-reader-container.focus-mode) .crpr-to-top {
    display: none !important;
}

/* Fallback for browsers that don't support :has() */
.focus-mode-active .crpr-nav-top-container,
.focus-mode-active .crpr-social-float,
.focus-mode-active .crpr-to-top {
    display: none !important;
}

/* ===== MEDIA QUERIES ===== */

/* Modal Responsive Design */
@media (max-height: 600px) {
    .crpr-modal-container {
        max-height: 95vh;
    }
    
    .crpr-modal-content {
        padding: 20px;
    }
    
    .crpr-modal-header,
    .crpr-modal-footer {
        padding: 15px 20px;
    }
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .crpr-body, .crpr-main {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    /* 1. Top Nav - Red bar stretch across and links in one row */
    .crpr-nav-top-container {
        width: 100%;
        overflow-x: hidden;
    }
    
    .crpr-nav-top-contents {
        flex-direction: column;
        padding: 0;
        max-width: 100%;
        width: 100%;
        overflow-x: hidden;
    }
    
    .crpr-nav-top-center {
        font-size: 1.5em;
        order: -1;
        flex: unset;
        padding: 5px 20px;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }
    
    .crpr-nav-top-center::after {
        content: unset;
    }
    
    /* Create a single row container for all navigation links */
    .crpr-nav-links-row {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        padding: 10px;
        gap: 15px;
        box-sizing: border-box;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .crpr-nav-links-row::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    /* Links in one row: Home Read Codex Community Gallery Login */
    .crpr-nav-top-left, 
    .crpr-nav-top-right {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        gap: 15px;
        flex-shrink: 0;
    }
    
    .crpr-nav-btn {
        height: unset;
        font-size: 0.85em;
        padding: 8px 12px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: fit-content;
    }
    
    /* User card responsive adjustments */
    .crpr-user-card {
        font-size: 0.85em;
        padding: 6px 10px;
    }
    
    .crpr-user-card-name {
        display: none; /* Hide username text on tablets for space */
    }
    
    /* 2. Hero - Stack vertically: left content on top, right content on bottom */
    .crpr-hero {
        /* min-height: auto;
        height: auto; */
        padding: 120px 0 60px;
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .crpr-hero-content {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        max-width: 90%;
        /* margin: 0 auto; */
        width: 100%;
        box-sizing: border-box;
    }
    
    .crpr-hero-content-sm {
        width: 100%;
        max-width: 100%;
        margin-top: unset;
    }
    
    /* Left content on top */
    .crpr-hero-content-left {
        width: 100%;
        /* flex-direction: column; */
        order: 1;
    }
    
    .crpr-hero-content-left-socialtabs {
        display: flex;
        flex-direction: column;
        /* justify-content: center;
        gap: 15px; */
        margin-bottom: 20px;
        width: 100%;
        max-width: max-content;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .crpr-hero-content-left-socialtabs::-webkit-scrollbar {
        display: none;
    }
    
    .crpr-hero-content-left-socialtabs > div {
        position: relative;
        height: 60px;
        width: 60px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .crpr-hero-content-left-content {
        /* font-size: 16px; */
        line-height: 1.5;
        padding: 40px;
        /* Limit to 6 lines with ellipsis */
        display: -webkit-box;
        /* -webkit-line-clamp: 6;
        line-clamp: 6; */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Right content on bottom */
    .crpr-hero-content-right {
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 30px;
        order: 2;
    }
    
    .crpr-hero-content-book {
        flex-direction: row;
        align-items: center;
        gap: 30px;
    }
    
    .crpr-hero-content-book img {
        max-width: 200px;
        flex-shrink: 0;
    }
    
    /* Read Now button to the right of book image */
    .crpr-hero-read-btn {
        order: 1;
        align-self: center;
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Book carousel responsive adjustments */
    .crpr-book-carousel {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .crpr-book-carousel-item {
        width: 400px;
        min-width: 280px;
    }
    
    /* 3. CTA - Button to the right of email */
    .crpr-cta-field {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    .crpr-cta-field input {
        /* width: auto; */
        flex: 1;
        max-width: none;
    }
    
    .crpr-cta-field .crpr-btn {
        flex-shrink: 0;
        min-width: 150px;
    }
    
    .crpr-cta-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 30px;
    }
    
    /* 4. Codex - Cards 70% width, centered buttons, 1 line text */
    .crpr-codex-carousel {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .crpr-codex-carousel-item {
        width: 70%;
        max-width: 400px;
    }
    
    .crpr-codex-carousel-blurb {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.4;
    }
    
    .crpr-codex-carousel-button .crpr-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1;
    }
    
    /* 5. Footer - Legal and Links side by side, newsletter below */
    .crpr-footer-columns {
        width: 100%;
        flex-direction: column;
        gap: 30px;
        max-width: 100%;
    }
    
    .crpr-footer-top-row {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 40px;
    }
    
    .crpr-footer-column-left,
    .crpr-footer-top-row .crpr-footer-column-center {
        flex: 1;
    }
    
    .crpr-footer-column-right {
        width: 100%;
        order: 1;
    }
    
    .crpr-footer-newsletter-form {
        flex-direction: column;
        gap: 15px;
    }
    
    .crpr-constrain {
        max-width: 90%;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    /* Prevent any element from causing horizontal overflow */
    .crpr-features,
    .crpr-cta,
    .crpr-codex,
    .crpr-gallery,
    .crpr-contactus {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .crpr-modal-backsplash.active {
        padding: 10px;
    }
    
    .crpr-modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .crpr-modal-content {
        padding: 20px;
    }
    
    .crpr-modal-title {
        font-size: 20px;
    }
    
    .crpr-nav-top-contents {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
        padding-top: 0;
    }
    
    .crpr-nav-top-left,
    .crpr-nav-top-right {
        gap: 15px;
    }
    
    .crpr-nav-top-center {
        font-size: 1.5em;
        order: -1;
        flex: unset;
    }
    
    .crpr-nav-btn {
        font-size: 0.9em;
        padding: 8px 12px;
        height: unset;
    }
    
    .crpr-footer-columns {
        width: unset;
        flex-direction: column;
    }
    
    .crpr-footer-column-left,
    .crpr-footer-column-center,
    .crpr-footer-column-right {
        text-align: center;
    }
    
    .crpr-hero {
        height: unset;
        padding: 20px;
        padding-bottom: 120px;
        min-height: auto;
    }
    
    .crpr-hero-content-left-socialtabs {
        display: none;
    }
    
    .crpr-hero-content-left-content {
        font-size: 1em;
        line-height: 1.6;
    }
    
    .crpr-hero-content-book {
        text-align: center;
    }
    
    .crpr-hero-content-book img {
        max-width: 250px;
        width: 100%;
        height: auto;
    }
    
    .crpr-hero-read-btn {
        font-size: 1em;
        padding: 12px 24px;
        margin-top: 15px;
    }
    
    .crpr-hero-content-right {
        width: 100%;
    }
    
    .crpr-hero-content-left {
        width: 100%;
    }
    
    .crpr-footer-newsletter-form {
        flex-direction: column;
    }
    
    .crpr-codex-carousel {
        flex-direction: column;
    }
    
    .crpr-codex-carousel-item {
        width: 100%;
    }
    
    .crpr-cta-content {
        width: unset;
    }
    
    .crpr-cta-field {
        flex-direction: column;
    }
    
    .crpr-cta-field input {
        width: 90%;
    }
    
    .crpr-social-float {
        position: fixed;
        bottom: 20px;
        right: 10px;
        flex-direction: row;
        gap: 8px;
        background: rgba(20, 20, 20, 0.9);
        padding: 8px;
        border-radius: 25px;
        backdrop-filter: blur(10px);
    }
    
    .crpr-social-float-item {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .crpr-section {
        padding: 40px 20px;
    }
    
    .crpr-section h2 {
        font-size: 2em;
    }
    
    .crpr-contact-form,
    .crpr-newsletter-form {
        padding: 20px;
    }
    
    .crpr-form-group {
        margin-bottom: 20px;
    }
    
    .crpr-form-input,
    .crpr-form-textarea {
        font-size: 16px;
    }
    
    .crpr-newsletter-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .crpr-newsletter-input-group input {
        margin-bottom: 10px;
    }
    
    .crpr-btn {
        font-size: 1em;
        padding: 12px 20px;
        width: 100%;
        text-align: center;
    }
    
    .crpr-modal-content {
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .crpr-to-top {
        bottom: 80px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
    
    .crpr-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        align-items: stretch;
    }
    
    .crpr-toast {
        min-width: auto;
        max-width: none;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .crpr-hero {
        min-height: auto;
        padding: 15px;
    }
    
    .crpr-hero-content {
        gap: 20px;
    }
    
    .crpr-nav-top-contents {
        padding: 8px 20px;
    }
}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    .crpr-nav-top-left,
    .crpr-nav-top-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .crpr-nav-btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }
    
    .crpr-hero-content-book img {
        max-width: 200px;
    }
    
    .crpr-hero-read-btn {
        width: 90%;
        margin: 15px auto 0;
        display: block;
    }
    
    h1 { 
        font-size: 2em; 
    }
    
    h2 { 
        font-size: 1.5em; 
    }
    
    h3 { 
        font-size: 1.2em; 
    }
    
    .crpr-section {
        padding: 30px 15px;
    }
    
    .crpr-social-float {
        bottom: 15px;
        right: 5px;
        gap: 6px;
        padding: 6px;
        flex-direction: column;
        height: fit-content;
    }
    
    .crpr-social-float-item {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .crpr-to-top {
        bottom: 70px;
        right: 5px;
        width: 40px;
        height: 40px;
    }
    
    .crpr-logout-modal-content {
        width: 95%;
        margin: 0 10px;
    }
    
    .crpr-logout-modal-actions {
        flex-direction: column;
    }
    
    .crpr-logout-modal-actions button {
        flex: none;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .crpr-nav-btn:hover,
    .crpr-btn:hover,
    .crpr-social-float-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .crpr-nav-btn:active,
    .crpr-btn:active,
    .crpr-social-float-item:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
    
    .crpr-nav-btn,
    .crpr-btn,
    .crpr-social-float-item {
        min-height: 44px;
        min-width: 44px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .crpr-hero-content-book img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility - Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode preference */
@media (prefers-color-scheme: light) {
    :root {
        --backgroundColor: #f8f9fa;
        --text-light: #212529;
        --color-darkgray: #6c757d;
        --color-nearblack: #f8f9fa;
    }
}