/* --- Rain Effect --- */

#rain-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 5px;
    animation: fall linear forwards;
    transform: translateY(-100vh);
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* --- Global Styles --- */

:root {
    --bg-color: #000000;
    --text-color: #f0f0f0;
    --accent-color: #993333;
}

/* Pastel Theme Colors */
body.pastel-on {
    --bg-color: #f0e6e6;
    --text-color: #3d3434;
    --accent-color: #8c7171;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    z-index: 0;
}

/* --- Scanlines Effect --- */
body.scanlines-on::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        rgba(0,0,0,0.2) 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}


/* --- Sway Animation --- */

@keyframes sway {
    0% { transform: rotate(-1.5deg); }
    50% { transform: rotate(1.5deg); }
    100% { transform: rotate(-1.5deg); }
}

/* --- Scattered Photo Fragments --- */
.photo-fragment {
    position: fixed;
    pointer-events: none;
    z-index: -2;
    animation-name: sway;
    animation-duration: 4s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

.photo-fragment img {
    max-width: 120px;
    height: auto;
    opacity: 0.8;
}

/* Tape on each photo fragment */
.photo-fragment::before {
    content: '';
    position: absolute;
    top: -5px;
    right: 15%;
    width: 50px;
    height: 20px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(5deg);
    z-index: -1;
    pointer-events: none;
}

/* Individual placement and rotation */
#photo-fragment-1 {
    top: 10%;
    left: -20px;
    transform: rotate(-12deg);
    animation-delay: 0s;
}

#photo-fragment-2 {
    top: 30%;
    right: -30px;
    transform: rotate(18deg);
    animation-delay: 1.5s;
}

#photo-fragment-3 {
    top: 60%;
    left: -10px;
    transform: rotate(-7deg);
    animation-delay: 0.7s;
}

/* --- Header & Navigation --- */
.site-header {
    text-align: center;
    padding: 20px;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}

.banner-container {
    position: relative;
}

/* The tape is now applied to the container */
.banner-container::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 15%;
    width: 100px;
    height: 30px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(-10deg);
    z-index: 1;
}

.banner-container::after {
    content: '';
    position: absolute;
    top: -10px;
    right: 15%;
    width: 120px;
    height: 40px;
    background: url('images/tape_elements.png') -10px -200px no-repeat;
    background-size: 300px 500px;
    transform: rotate(15deg);
    z-index: 1;
}

.site-header img {
    max-width: 60%; /* Reduced banner width to 60% */
    height: auto;
    display: block;
    margin: 0 auto;
    margin-bottom: 10px;
    border: 1px solid var(--text-color);
    padding: 3px;
    background-color: #1a1a1a;
}

/* --- Banner Animation --- */
@keyframes banner-tape-on {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.banner-anim {
    animation: banner-tape-on 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}


.site-header h1 {
    font-family: 'Georgia', serif;
    font-size: 2.5em;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--text-color);
    margin: 0;
    margin-bottom: 10px;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    margin: 0 5px;
    font-family: 'Georgia', serif;
}

nav a:hover {
    color: var(--accent-color);
}

/* --- Main Content --- */
.content-container {
    max-width: 900px; /* Changed from 600px to 900px */
    margin: 20px auto;
    padding: 0 20px;
    background-color: transparent;
    border: none;
    position: relative;
    z-index: 0;
}

.info-block p {
    margin-bottom: 1.5em;
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--text-color);
    margin: 40px 0;
}

h2 {
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    font-weight: normal;
    font-size: 1.5em;
    margin-bottom: 1em;
    color: var(--accent-color);
}

/* --- About Page Photo --- */
.about-mugshot {
    float: right;
    width: 150px;
    margin: 0 0 20px 20px;
}

.about-mugshot img {
    width: 100%;
    border: 1px solid var(--text-color);
    padding: 2px;
    background-color: #1a1a1a;
}

/* --- Character Mugshot Styles --- */
.character-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

.character-mugshot {
    width: 150px;
    height: auto;
    text-align: center;
    position: relative;
}

.character-mugshot img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--text-color);
    padding: 2px;
    background-color: #1a1a1a;
    transition: transform 0.3s ease;
}

.character-mugshot img:hover {
    transform: scale(1.05);
    filter: brightness(1.2) contrast(1.1);
}

/* --- Button Styles --- */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-color);
}

.button-white {
    color: #f0f0f0;
    border-color: #f0f0f0;
    text-shadow: 0 0 5px #f0f0f0, 0 0 10px #f0f0f0;
    box-shadow: 0 0 5px rgba(240, 240, 240, 0.5), inset 0 0 5px rgba(240, 240, 240, 0.5);
}

.button-white:hover {
    color: #000000;
    background-color: #f0f0f0;
    text-shadow: none;
    box-shadow: 0 0 10px #f0f0f0;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8em;
    color: var(--text-color);
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

/* --- New Character Page & Settings Styles --- */

.settings-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.settings-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

.settings-list li:last-child {
    border-bottom: none;
}

.character-profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.character-full-body {
    position: relative;
    max-width: 250px;
    background-color: #000000; /* Changed from #1a1a1a to #000000 */
    margin-right: 20px;
    float: left;
    margin-bottom: 20px;
    overflow: hidden;
}

.character-full-body img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tape on the full-body render */
.character-full-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 100px;
    height: 30px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(-10deg);
    z-index: 1;
}

.character-full-body::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 120px;
    height: 40px;
    background: url('images/tape_elements.png') -10px -200px no-repeat;
    background-size: 300px 500px;
    transform: rotate(15deg);
    z-index: 1;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    background-color: #1a1a1a;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.5) grayscale(0.5);
    transition: filter 0.3s ease;
}

.gallery-item:hover img {
    filter: sepia(0) grayscale(0);
}

/* Small tape on gallery items */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20%;
    width: 60px;
    height: 25px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(-5deg);
    z-index: 1;
}

.gallery-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 15%;
    width: 65px;
    height: 30px;
    background: url('images/tape_elements.png') -10px -200px no-repeat;
    background-size: 300px 500px;
    transform: rotate(10deg);
    z-index: 1;
}
/* --- New Character Page & Settings Styles --- */

.settings-list {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.settings-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(240, 240, 240, 0.1);
}

.settings-list li:last-child {
    border-bottom: none;
}

.character-profile-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
}

.character-full-body {
    position: relative;
    max-width: 250px;
    background-color: #000000;
    margin-right: 20px;
    float: left;
    margin-bottom: 20px;
    overflow: hidden;
}

.character-full-body img {
    width: 100%;
    height: auto;
    display: block;
}

/* Tape on the full-body render */
.character-full-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 100px;
    height: 30px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(-10deg);
    z-index: 1;
}

.character-full-body::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    width: 120px;
    height: 40px;
    background: url('images/tape_elements.png') -10px -200px no-repeat;
    background-size: 300px 500px;
    transform: rotate(15deg);
    z-index: 1;
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    background-color: #1a1a1a;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.5) grayscale(0.5);
    transition: filter 0.3s ease;
}

.gallery-item:hover img {
    filter: sepia(0) grayscale(0);
}

/* Small tape on gallery items */
.gallery-item::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20%;
    width: 60px;
    height: 25px;
    background: url('images/tape_elements.png') -0px -0px no-repeat;
    background-size: 300px 500px;
    transform: rotate(-5deg);
    z-index: 1;
}

.gallery-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 15%;
    width: 65px;
    height: 30px;
    background: url('images/tape_elements.png') -10px -200px no-repeat;
    background-size: 300px 500px;
    transform: rotate(10deg);
    z-index: 1;
}

.info-block {
    overflow: auto; /* This creates a new block formatting context */
    /* Alternative: Add `clear: both;` to a separate class */
}