@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Merriweather:ital,wght@0,300;0,400;1,300&display=swap');

body {
    background-image: url('ouija_board.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: #333;
    font-family: 'Merriweather', serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.newspaper-container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: rgba(255, 249, 232, 0.9);
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

header {
    text-align: center;
    padding: 20px;
    border-bottom: 5px double #333;
}

.header-main h1 {
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    margin: 0;
    font-weight: 700;
}

.header-sub {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: bold;
}

.content {
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    filter: grayscale(100%) sepia(20%);
    border: 1px solid #ddd;
    padding: 3px;
}

h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-top: 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 15px;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.2rem;
}


.main-story {
    grid-column: 1 / 2;
}

.side-stories {
    grid-column: 2 / 3;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid #ccc;
    padding-left: 20px;
}

.story p {
    font-size: 0.9rem;
}

.full-width-section {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
}

.columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    font-size: 0.85rem;
}

.column-story p {
    text-align: justify;
}

.hauntings-section {
    grid-column: 1 / -1;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #333;
}

.hauntings-section h2 {
    font-size: 2rem;
}

.haunting-story {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.haunting-story img {
    max-width: 250px;
    flex-shrink: 0;
}

.haunting-story p {
    text-align: justify;
    margin: 0;
}

footer {
    text-align: center;
    padding: 15px;
    border-top: 5px double #333;
    margin-top: 20px;
    font-size: 0.8rem;
    font-style: italic;
}

@media (max-width: 900px) {
    .header-main h1 {
        font-size: 4rem;
    }
    .content {
        grid-template-columns: 1fr;
    }
    .side-stories {
        border-left: none;
        padding-left: 0;
    }
    .columns {
        grid-template-columns: repeat(2, 1fr);
    }
    #paranormal-poll li {
        font-size: 3rem;
    }
}

@media (max-width: 600px) {
    .header-main h1 {
        font-size: 2.5rem;
    }
    .header-sub {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    .columns {
        grid-template-columns: 1fr;
    }
    .haunting-story {
        flex-direction: column;
    }
    .haunting-story img {
        max-width: 100%;
    }
    #paranormal-poll li {
        font-size: 2.5rem;
    }
}

#ouija-board-container {
    position: relative;
    max-width: 1000px;
    margin: 20px auto;
    border: 5px solid #333;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    cursor: none;
    overflow: hidden;
    background-color: rgba(245, 242, 232, 0.9);
}

#ouija-board-img {
    width: 100%;
    display: block;
}

#planchette-img {
    position: absolute;
    width: 15%;
    max-width: 130px;
    height: auto;
    pointer-events: none;
    transition: top 0.1s ease-out, left 0.1s ease-out, opacity 0.3s ease-in-out;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1; /* Make it visible by default */
}

#answer-display {
    position: absolute;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Playfair Display', serif;
    font-size: clamp(16px, 2.5vw, 40px);
    color: #f5e6c4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 10;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-transform: uppercase;
    width: 90%;
    line-height: 1.3;
}

#answer-display .question-text {
    font-size: 0.8em;
    font-style: italic;
    color: #e0d6b8;
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

#answer-display .answer-text {
    font-weight: bold;
}

#questions-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(245, 242, 232, 0.9);
    border: 1px dashed #333;
}

#questions-container h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.question-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.category {
    flex: 1 1 200px;
    min-width: 180px;
}

.category h4 {
    font-size: 1.1rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.category ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-family: 'Merriweather', serif;
    font-size: 0.9rem;
    font-style: italic;
    color: #555;
}

.category li {
    margin-bottom: 8px;
}

.category li.question {
    cursor: pointer;
    transition: color 0.2s ease-in-out, font-weight 0.2s ease-in-out;
}

.category li.question:hover {
    color: #000;
    font-weight: bold;
}

.category li.question.disabled {
    cursor: not-allowed;
    color: #999;
    font-weight: normal;
    font-style: italic;
}

#guess-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(245, 242, 232, 0.9);
    border: 1px dashed #333;
    text-align: center;
}

#guess-container h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

#guess-input {
    padding: 10px;
    font-size: 1rem;
    width: 300px;
    max-width: 80%;
    border: 1px solid #ccc;
    margin-right: 10px;
    font-family: 'Merriweather', serif;
}

#guess-button, #play-again-button {
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    background-color: #333;
    color: #f5f2e8;
    border: none;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

#guess-button:hover, #play-again-button:hover {
    background-color: #555;
}

#guess-result {
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 1.5em;
}

#paranormal-poll {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: rgba(245, 242, 232, 0.9);
    border: 1px dashed #333;
    text-align: center;
}

#paranormal-poll h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

#paranormal-poll ul {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
}

#paranormal-poll li {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-style: normal;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    text-transform: uppercase;
    line-height: 1.2;
    animation: blink 2.5s infinite;
}

#paranormal-poll li:nth-child(odd) {
    animation-delay: 1.25s;
}

#paranormal-poll p {
    font-style: italic;
    color: #555;
    font-size: 0.9rem;
}

#celebrity-gallery {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    text-align: center;
    background-color: rgba(245, 242, 232, 0.9);
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

#celebrity-gallery h2 {
    font-size: 2.5rem;
    border-bottom: none;
}

#celebrity-gallery > p {
    font-style: italic;
    color: #555;
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.gallery-item {
    border: 1px solid #ccc;
    padding: 10px;
    background-color: rgba(255, 249, 232, 0.95);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gallery-item.correct {
    transform: scale(1.05);
    box-shadow: 0 0 15px 5px #c8a34e;
    border-color: #c8a34e;
}

.gallery-item img {
    border: none;
    padding: 0;
    margin-bottom: 5px;
}

.gallery-item .caption {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

@media (max-width: 400px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}