/* Body & container */
body {
    font-family: 'Baskerville', serif;
    background: #fdf6e3 url('images/paper_texture.jpg') repeat; 
    color: #222;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    position: relative; /* required for ::before overlay */
}

/* Full-page paper texture overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05; /* very low for subtle effect */
    pointer-events: none; /* allows clicking on content normally */
    z-index: 9999;
}

.container {
    max-width: 1000px;
    margin: auto;
    padding: 20px;
    background-color: rgba(253, 246, 227, 0.95); /* slightly transparent to let texture show through */
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #222;
    padding-bottom: 10px;
}

header h1 {
    font-size: 3em;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Articles */
article {
    margin-bottom: 40px;
    column-count: 2;
    column-gap: 40px;
}

article h2 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
    break-inside: avoid;
    border-bottom: 1px dotted #222;
    padding-bottom: 5px;
}

article p {
    margin-bottom: 15px;
    text-align: justify;
}

article img {
    max-width: 100%;
    display: block;
    margin: 10px auto;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* Hidden clues */
.hidden-clue {
    color: #fdfcf7;
    user-select: text;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    font-size: 0.9em;
    color: #555;
    border-top: 1px solid #222;
    padding-top: 10px;
}

/* Corkboard */
#corkboard {
    width: 100%;
    height: 400px;
    background: url('images/cardboard.jpg') center/cover no-repeat;
    border: 2px solid #8b5e3c;
    position: relative;
    margin-top: 50px;
    overflow: hidden;
}

/* Sticky notes */
.clue {
    width: 150px;
    min-height: 120px;
    padding: 10px;
    background-color: #fff8dc; /* classic yellow post-it */
    border: 1px solid #d4a373; /* subtle outline */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    position: absolute;
    cursor: grab;
    user-select: none;
    font-size: 0.9em;
    color: #222;
    line-height: 1.2em;
    border-radius: 4px;
}

/* Add a red pin at the top */
.clue::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background-color: red;
    border-radius: 50%;
    border: 1px solid #900; /* darker outline for realism */
    box-shadow: 1px 1px 2px rgba(0,0,0,0.4);
    z-index: 10;
}


/* Popup */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 300px;
    background: #fff8dc;
    border: 2px solid #d4a373;
    padding: 20px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
    display: none;
    z-index: 1000;
}

#popup button {
    margin-top: 10px;
    cursor: pointer;
}

/* Red strings connecting clues */
svg#strings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
