/* Basic Reset & Body Styling */
body {
    margin: 0;
    font-family: 'Courier New', monospace; /* Or a fun pixel/typewriter font */
    background-color: #3f2f23; /* Dark brown for background around the board */
    color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

#wrapper {
    width: 100%;
    max-width: 1000px; /* Max width for the entire site */
    background-color: #5e4a3b; /* Slightly lighter brown for wrapper */
    border: 5px solid #2a1f16;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    padding: 20px;
    border-radius: 8px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-family: 'Impact', 'Arial Black', sans-serif; /* A strong, conspiratorial feel */
    color: #ffda6a; /* Gold/yellow for prominence */
    text-shadow: 2px 2px #c28800;
    font-size: 2.5em;
    margin-bottom: 5px;
}

.tagline {
    font-style: italic;
    color: #ccc;
}

/* Main Board Area */
#conspiracy-board {
    display: grid;
    grid-template-columns: 250px 1fr; /* Input on left, board on right */
    gap: 30px;
    min-height: 600px; /* Minimum height for the board */
}

#input-area {
    background-color: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 5px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

#input-area p {
    margin-bottom: 15px;
    font-size: 0.9em;
}

#input-area input[type="text"] {
    width: calc(100% - 20px);
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #777;
    background-color: #2a1f16;
    color: #eee;
    font-size: 1em;
    box-sizing: border-box;
}

#generate-btn, #reset-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #e74c3c; /* Red button for "action" */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#generate-btn:hover {
    background-color: #c0392b;
}

.secondary-btn {
    background-color: #34495e; /* Muted blue for secondary actions */
}
.secondary-btn:hover {
    background-color: #2c3e50;
}


#board-display {
    position: relative;
    background-image: url('cork-texture.jpg'); /* A repeating cork texture image */
    background-size: cover; /* Or 'contain' depending on texture */
    border-radius: 5px;
    border: 2px solid #2a1f16;
    overflow: hidden; /* Ensure notes don't spill out */
}

#conspiracy-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Behind the notes */
}

/* Dynamically created note elements */
.note {
    position: absolute;
    background-color: #fffacd; /* Light yellow/cream paper color */
    color: #333;
    padding: 10px 15px;
    border-radius: 2px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    cursor: grab;
    user-select: none;
    font-size: 0.9em;
    line-height: 1.3;
    z-index: 1; /* Above SVG lines */
    /* Torn paper effect: This is tricky with pure CSS, might need a background image */
    /* Example: background-image: url('torn_paper_edge.png'); background-repeat: no-repeat; */
    /* For simplicity, a slight rotation: */
    transform: rotate(calc(var(--random-rotation) * 1deg)); /* JS will set --random-rotation */
}

.note::before {
    content: '';
    position: absolute;
    top: -8px; /* Adjust to place the pin visually */
    left: 50%;
    transform: translateX(-50%);
    width: 16px; /* Size of the pin image */
    height: 16px;
    background-image: url('pushpin-red.png'); /* A small, iconic red pushpin image */
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2; /* Above the note */
}

#controls-area {
    grid-column: 1 / 3; /* Spans both columns below the board */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(0,0,0,0.2);
    border-radius: 5px;
}

#controls-area label {
    font-size: 0.9em;
    color: #ccc;
    cursor: pointer;
}

footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.8em;
    color: #999;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #conspiracy-board {
        grid-template-columns: 1fr; /* Stack input area above board */
    }
    #controls-area {
        flex-direction: column;
        gap: 15px;
    }
    #download-btn {
        width: 100%;
    }
}