:root {
    --color-yellow: #fff799;
    --color-green: #a6f5b3;
    --color-blue: #a6e3f5;
    --color-pink: #f5a6e3;
    --color-orange: #f5cda6;
}

* {
    box-sizing: border-box;
}

#header-gallery {
    display: flex;
    width: 100%;
    height: 450px;
    overflow: hidden;
}

.gallery-item {
    position: relative;
    width: 14.3%; /* Adjusted for 7 items */
    height: 100%;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    z-index: 5;
    transition: opacity 0.3s;
    font-family: sans-serif; /* Using a more standard font for clarity */
}

#header-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: grayscale(0.5);
}

#header-gallery:hover .gallery-item {
    width: 12%; /* Adjusted for 7 items */
}
#header-gallery:hover img {
    filter: grayscale(1);
}

#header-gallery .gallery-item:hover {
    width: 28%;
}

#header-gallery .gallery-item:hover img {
    filter: grayscale(0);
}

#header-gallery .gallery-item:hover .gallery-item-number {
    opacity: 0;
}

#new-prompts-container {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
}

#new-prompt-post-it {
    width: 90%;
    max-width: 450px;
    padding: 25px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    text-align: left;
    background-color: var(--color-blue);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    transform: rotate(1deg);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#new-prompt-post-it:hover {
    transform: rotate(1deg) scale(1.05);
    box-shadow: 10px 10px 25px rgba(0,0,0,0.4);
}

#new-prompt-post-it h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
}

#new-prompt-post-it ul {
    list-style-type: '💡';
    padding-left: 25px;
    margin: 0;
}

#new-prompt-post-it li {
    padding-left: 10px;
    margin-bottom: 1rem;
    line-height: 1.4;
}

#page-index {
    background-color: rgba(253, 245, 230, 0.85); /* Slightly transparent creamy paper */
    text-align: center;
    padding: 1rem;
    border-bottom: 2px solid rgba(0,0,0,0.2);
    backdrop-filter: blur(2px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.index-title {
    font-weight: bold;
    margin-right: 10px;
    font-size: 1.3rem;
    color: #333;
    vertical-align: middle;
}

#page-index a {
    font-family: 'Kalam', cursive;
    color: #444;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.2rem;
    transition: color 0.3s, text-shadow 0.3s;
}

#page-index a:hover {
    color: #a0522d;
    text-shadow: 0 0 1px #a0522d;
}

body {
    font-family: 'Kalam', cursive;
    background-color: #6d4c41; /* A dark brown as fallback */
    background-image: url('cork_board.png');
    margin: 0;
    color: black;
    min-height: 100vh;
}

header {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
    color: black;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.7);
}

header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin: 0;
}

.instructions {
    margin: 1rem 0 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 0 1rem;
}

.model-story {
    margin: 1rem auto 0;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 0 2rem;
    max-width: 800px;
    font-style: italic;
    opacity: 0.9;
    line-height: 1.5;
}

#story-prompt-container {
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

#story-prompt {
    width: 90%;
    max-width: 380px;
    height: auto;
    min-height: 250px;
    padding: 25px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    display: block;
    text-align: left;
    cursor: default;
    transform: rotate(-2deg);
    background-color: var(--color-yellow);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#story-prompt:hover {
    transform: rotate(-2deg) scale(1.05);
    box-shadow: 10px 10px 25px rgba(0,0,0,0.4);
}

.header-post-it {
    width: 90%;
    max-width: 380px;
    height: auto;
    min-height: 250px;
    padding: 25px;
    font-size: clamp(1rem, 3vw, 1.2rem);
    display: block;
    text-align: left;
    cursor: default;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.header-post-it:hover {
    box-shadow: 10px 10px 25px rgba(0,0,0,0.4);
    transform: scale(1.05);
}

#story-prompt {
    background-color: var(--color-yellow);
    transform: rotate(-2deg);
}
#story-prompt:hover {
    transform: rotate(-2deg) scale(1.05);
}

#model-story-post-it {
    background-color: var(--color-green);
    transform: rotate(3deg);
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.5;
}

#model-story-post-it:hover {
     transform: rotate(3deg) scale(1.05);
}

#model-story-post-it p {
    margin: 0;
}

.header-post-it h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: clamp(1.2rem, 4vw, 1.4rem);
}

#story-prompt h3 {
    margin-bottom: 1.5rem;
}

#story-prompt ul {
    list-style-type: '📌';
    padding-left: 25px;
    margin: 0;
}

#story-prompt li {
    padding-left: 10px;
    margin-bottom: 1rem;
    line-height: 1.4;
}

#board-container {
    padding: 2rem;
    overflow: hidden;
}

#board {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 25px;
}

.post-it {
    width: 220px;
    height: 220px;
    padding: 20px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.4;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, z-index 0s 0.2s;
    cursor: pointer;
    position: relative;
}

.post-it p {
    margin: 0;
}

.post-it-number {
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    color: rgba(0,0,0,0.6);
}

.post-it:hover {
    transform: scale(1.15) rotate(0deg) !important;
    box-shadow: 10px 10px 25px rgba(0,0,0,0.4);
    z-index: 10;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, z-index 0s 0s;
}

.color-1 { background-color: var(--color-yellow); }
.color-2 { background-color: var(--color-green); }
.color-3 { background-color: var(--color-blue); }
.color-4 { background-color: var(--color-pink); }
.color-5 { background-color: var(--color-orange); }

@media (max-width: 600px) {
    #board-container {
        padding: 1rem;
    }

    .post-it {
        width: 150px;
        height: 150px;
        font-size: 0.9rem;
        padding: 15px;
    }

    #board {
        gap: 15px;
    }
}

/* This or That Questionnaire Styles */
#this-or-that {
    padding: 2rem;
    background-color: #fdf5e6; /* A creamy paper color */
    margin: 2rem;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#this-or-that h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-top: 0;
    margin-bottom: 2rem;
    color: #333;
}

.questionnaire-category {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(0,0,0,0.2);
}

.questionnaire-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.questionnaire-category h3 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: #4a4a4a;
    margin-bottom: 1rem;
}

.question p {
    margin: 0.5rem 0;
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.5;
    color: #222;
}

.why-prompt {
    font-style: italic;
    color: #555;
    margin-top: 0.25rem;
    padding-left: 1rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 0.5rem;
}

.question strong {
    color: #c0392b;
    margin: 0 0.5em;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    #this-or-that {
        padding: 1rem;
        margin: 1rem;
    }

    #this-or-that h2 {
        margin-bottom: 1.5rem;
    }

    .question p {
        line-height: 1.6;
    }
}

/* Fill in the Blanks Styles */
#fill-in-the-blanks {
    padding: 2rem;
    background-color: #fdf5e6; /* A creamy paper color */
    margin: 2rem;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    color: #222;
    text-align: center;
}

#fill-in-the-blanks h2 {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-top: 0;
    margin-bottom: 2rem;
    color: #333;
}

#fill-in-text p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 2.8; /* Increased for inputs */
    text-align: justify;
}

.blank-input {
    font-family: 'Kalam', cursive;
    border: none;
    border-bottom: 2px solid #555;
    background-color: transparent;
    width: 120px;
    font-size: 1em;
    text-align: center;
    margin: 0 5px;
    padding-bottom: 2px;
    transition: border-bottom-color 0.3s ease, background-color 0.3s ease;
}

.blank-input:focus {
    outline: none;
    border-bottom-color: var(--color-blue);
}

.blank-input.correct {
    border-bottom-color: #27ae60;
    background-color: #e9f7ef;
}

.blank-input.incorrect {
    border-bottom-color: #c0392b;
    background-color: #f9e5e3;
}

#check-answers-btn {
    font-family: 'Kalam', cursive;
    font-size: 1.2rem;
    padding: 10px 25px;
    margin-top: 1.5rem;
    border: none;
    background-color: var(--color-green);
    color: black;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#check-answers-btn:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
}

#results-container {
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 2rem; /* Reserve space */
}

@media (max-width: 600px) {
    #fill-in-the-blanks {
        padding: 1rem;
        margin: 1rem;
    }

    #fill-in-text p {
        line-height: 3;
    }

    .blank-input {
        width: 90px;
    }
}