/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", Times, serif;
    font-size: 19px;
    line-height: 1.55;
    color: #000;
    background-color: #fff;
    padding: 30px 20px 20px;
}

/* Main container */
main {
    max-width: 800px;
    margin: 0 auto;
}

/* Typography */
h1 {
    font-size: 52px;
    font-weight: 400;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 25px;
    text-align: center;
}

h3 {
    font-size: 19px;
    font-weight: 400;
    margin-top: 25px;
    margin-bottom: 10px;
}

p {
    margin-bottom: 18px;
}

p em {
    text-align: center;
    display: block;
}

/* Links */
a {
    color: #0000EE;
    text-decoration: underline;
}

a:visited {
    color: #551A8B;
}

a:hover {
    opacity: 0.8;
}

/* Lists */
ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

li {
    margin-bottom: 5px;
}

/* Horizontal rule */
hr {
    border: none;
    border-top: 1px solid #000;
    margin: 25px 0;
}

/* Footer */
footer {
    margin-top: 25px;
    text-align: center;
}

footer p {
    font-size: 16px;
    margin-bottom: 0;
}

footer nav {
    font-size: 16px;
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.photo-grid img {
    width: 100%;
    height: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    display: block;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 85%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 18px;
    opacity: 0.7;
    user-select: none;
}

.lightbox-arrow:hover {
    opacity: 1;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

/* Mode pill switcher */
.mode-pill {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    border: 1px solid #000;
    border-radius: 999px;
    overflow: hidden;
    z-index: 100;
}

.mode-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background-color 0.3s, color 0.3s;
}

.mode-option.mobile-toggle {
    display: none;
}

.mode-option.active {
    background: #000;
    color: #fff;
}

.mode-option:hover:not(.active) {
    background: rgba(0, 0, 0, 0.08);
}

/* Mode-specific content */
.bangerlore-content {
    display: none;
}

body.dark .basedcon-content {
    display: none;
}

body.dark .bangerlore-content {
    display: block;
}

/* Dark mode */
body.dark {
    background-color: #111;
    color: #e0e0e0;
}

body.dark a {
    color: #6ea8fe;
}

body.dark a:visited {
    color: #b08adb;
}

body.dark .mode-pill {
    border-color: #555;
}

body.dark .mode-option.active {
    background: #e0e0e0;
    color: #111;
}

body.dark .mode-option:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

body.dark hr {
    border-top-color: #444;
}

body.dark .lightbox {
    background: rgba(0, 0, 0, 0.95);
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 25px 20px 20px;
        font-size: 17px;
    }

    h1 {
        font-size: 38px;
    }

    h2 {
        font-size: 19px;
    }

    h3 {
        font-size: 17px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lightbox-arrow {
        font-size: 40px;
        padding: 0 10px;
    }

    .lightbox-img {
        max-width: 95%;
        max-height: 80vh;
    }

    /* Collapse pill to single yin-yang circle on mobile */
    .mode-pill {
        top: 14px;
        right: 14px;
    }

    .mode-option#basedcon-mode,
    .mode-option#bangerlore-mode {
        display: none;
    }

    .mode-option.mobile-toggle {
        display: flex;
        border-radius: 999px;
    }
}
