body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Georgia', serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.container {
    text-align: center;
    background: rgba(20, 20, 20, 0.92);
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: 0 0 40px 10px #000000cc;
    max-width: 500px;
    width: 100%;
    margin: 2.5rem auto 2.5rem auto;
    min-height: 290px; /* Reverted from fixed height to min-height */
    padding-bottom: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #b1001c;
    box-sizing: border-box;
    /* Remove extra top/bottom margin from children for perfect centering */
    position: relative;
    z-index: 2;
}

section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.manifesto, .membership {
    background: rgba(20, 20, 20, 0.92);
    margin: 0 auto 2.5rem auto;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 0 24px 2px #000a;
    text-align: center;
    position: relative;
    z-index: 2;
}

.gallery {
    background: rgba(20, 20, 20, 0.92);
    margin: 0 auto 2.5rem auto;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 0 24px 2px #000a;
    text-align: center;
    position: relative;
}

.manifesto h2, .membership h2, .gallery h2 {
    color: #b1001c;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.manifesto p, .membership p {
    color: #e0e0e0;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.join-form {
    margin-top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
}

.join-form input[type="email"] {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 5px;
    background: #181818;
    color: #fff;
    font-size: 1rem;
    width: 220px;
    box-shadow: 0 0 6px #b1001c33;
}

.join-form button {
    padding: 0.6rem 1.5rem;
    background: #b1001c;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.join-form button:hover {
    background: #7a0014;
}

.gallery {
    margin-bottom: 2.5rem;
}

.gallery-images {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.gallery-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 0 18px 2px #000a;
    filter: grayscale(100%) contrast(160%) brightness(80%);
    transition: transform 0.2s, filter 0.2s;
    cursor: pointer;
    background: #181818;
    aspect-ratio: 4/3;
}
.gallery-thumb:hover {
    filter: grayscale(0%) contrast(120%) brightness(100%);
    transform: scale(1.07) rotate(-2deg);
}

.lightbox {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 9999; /* Increased to ensure lightbox is always on top */
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(10,10,10,0.93);
    flex-direction: column;
    transition: opacity 0.3s;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 40px 10px #000a;
    margin-bottom: 1.5rem;
}
.lightbox-close {
    position: absolute;
    top: 2.5vh;
    right: 3vw;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
    user-select: none;
}
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 0 0.5em;
    z-index: 1001;
    background: rgba(0,0,0,0.2);
    border-radius: 0.2em;
    transform: translateY(-50%);
}
.lightbox-prev { left: 2vw; }
.lightbox-next { right: 2vw; }
@media (max-width: 700px) {
    .gallery-thumb {
        width: 28vw;
        height: 21vw;
        min-width: 70px;
        min-height: 53px;
    }
    .lightbox-img {
        max-width: 98vw;
        max-height: 60vh;
    }
}

@media (max-width: 900px) {
    .container, .manifesto, .membership, .gallery {
        max-width: 95vw;
        padding: 1.2rem 0.5rem;
    }
    .gallery-images {
        gap: 1rem;
    }
    .gallery-images img {
        width: 90px;
    }
}

@media (max-width: 600px) {
    .container, .manifesto, .membership, .gallery {
        max-width: 100vw;
        padding: 1rem 0.2rem;
        border-radius: 0;
        box-shadow: none;
    }
    .gallery-images {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    .gallery-images img {
        width: 70vw;
        max-width: 180px;
    }
    .title {
        font-size: 1.5rem;
    }
    .manifesto h2, .membership h2, .gallery h2 {
        font-size: 1.1rem;
    }
    .manifesto p, .membership p {
        font-size: 1rem;
    }
    .logo {
        width: 105px;
        max-width: 60vw;
        aspect-ratio: 2.5 / 1;
    }
}

.bg-anim {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    opacity: 0.15; /* Updated from 0.05 */
    mix-blend-mode: lighten;
    animation: bgMoveSingle 120s linear infinite;
}

@keyframes bgMoveSingle {
    0% { background-position: 50% 50%; }
    100% { background-position: 55% 53%; }
}

body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: repeating-linear-gradient(180deg, transparent, transparent 2px, #111 3px, transparent 4px),
                rgba(10,10,10,0.22);
    opacity: 1;
    z-index: 1;
}

body {
    position: relative;
    z-index: 1;
}

/* Style for the logo */
.logo {
    margin-bottom: 1rem; /* Add some space below the logo if needed */
    margin-top: -30px; /* Move the logo up */
}

.container, section, footer {
    position: relative;
    z-index: 2;
}

.footer-cryptic {
    font-family: 'Courier New', Courier, monospace;
    color: #fff;
    background: #b1001c;
    padding: 0.1em 0.5em;
    border-radius: 4px;
    margin-left: 0.5em;
    font-size: 0.95em;
}

/* Added media query for high-resolution displays */
@media (min-width: 1920px) {
    .bg-anim {
        opacity: 0.25; /* Updated from 0.15 */
    }
}

/* Styles for the quote box */
#quote {
    height: 5em; /* Fixed height for approx 3 lines (e.g., 1em font * 1.6 line-height * 3 lines = 4.8em) */
    line-height: 1.6;
    overflow-y: auto; /* Fallback if a quote is exceptionally long or calculations are off */
    font-style: italic;
    width: 90%; /* Contains text within the box, allows space for scrollbar */
    margin-top: 1rem; /* Space from subtitle */
    margin-bottom: 0.5rem; /* Space before container bottom padding */
    text-align: center;
    color: #e0e0e0; /* Inherited, but good to be explicit */
    box-sizing: border-box;
}

/* Optional: Custom scrollbar for WebKit browsers */
#quote::-webkit-scrollbar {
    width: 8px;
}

#quote::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

#quote::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#quote::-webkit-scrollbar-thumb:hover {
    background: #b1001c;
}

#lightbox {
    z-index: 9999;
}
#fragment-lightbox {
    z-index: 20000 !important;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    background: rgba(10,10,10,0.97);
}
#fragment-lightbox .lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}
#fragment-lightbox iframe {
    display: block;
    margin: 0 auto;
    max-width: 90vw;
    max-height: 80vh;
    width: 90vw;
    height: 80vh;
    border: none;
    background: #fff;
    box-shadow: 0 0 40px 10px #000a;
    border-radius: 10px;
}

/* Manifesto 'More' Link */
.more-link {
    color: #b1001c;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}

.more-link:hover {
    color: #ff4d6a;
}

/* Manifesto Lightbox Specifics */
#manifesto-lightbox .lightbox-content {
    background: rgba(20, 20, 20, 0.95);
    color: #e0e0e0;
    padding: 2rem 3rem;
    border-radius: 10px;
    max-width: 800px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    text-align: left;
    border: 1px solid #b1001c;
    box-shadow: 0 0 40px 10px #000000cc;
}

#manifesto-lightbox .lightbox-content h3 {
    color: #b1001c;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#manifesto-lightbox .lightbox-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
}
