body {
    background-image: url('istock_35013098_1345157829_231215143853_1280x720.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #1a1a1a; /* Dark fallback */
    font-family: 'EB Garamond', serif;
    color: #333;
    margin: 0;
    padding: 2rem;
    cursor: url('planchette_cursor.png'), auto;
}

.newspaper-container {
    max-width: 1200px;
    margin: auto;
    background: #c5a982; /* Wood color */
    border: 8px double #000000;
    box-shadow: 0 0 25px rgba(0,0,0,0.7);
    color: #000;
}

header {
    text-align: center;
    padding: 1rem;
    border-bottom: 4px double #000;
    margin-bottom: 1rem;
}

.header-main h1 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 4rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.header-icon {
    height: 50px;
    filter: invert(1);
}

.header-sub {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    margin-top: 1rem;
    font-weight: bold;
    font-family: 'Uncial Antiqua', cursive;
}

.content-grid {
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.main-story {
    grid-column: 1 / -1;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.main-story h2 {
    font-size: 3rem;
    text-align: center;
    margin: 0 0 1rem 0;
    font-family: 'Uncial Antiqua', cursive;
}

.main-story img {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1rem auto;
    display: block;
}

.main-story p {
    column-count: 2;
    column-gap: 2rem;
    text-align: justify;
    font-size: 1.3rem;
}

.story article {
    /* Adding a class to story articles to avoid style conflicts with exercise */
    border-top: 1px solid #333;
    padding-top: 1rem;
}

.story {
    border-top: 1px solid #333;
    padding-top: 1rem;
}

.story h3 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.story img {
    width: 100%;
    margin-bottom: 0.5rem;
    filter: grayscale(100%) sepia(30%);
    border: 2px solid #000;
}

.story p {
    text-align: justify;
    line-height: 1.4;
    font-size: 1.3rem;
}

.keywords-container {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px dotted #000;
}

.keywords-container .keyword {
    background-color: transparent;
    border: 1px solid #000;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    font-size: 1rem;
    font-weight: normal;
    font-family: 'EB Garamond', serif;
    color: #000;
}

.break-title {
    grid-column: 1 / -1;
    text-align: center;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    padding: 0.5rem;
    margin: 1rem 0;
}

.break-title h2 {
    margin: 0;
    font-family: 'Uncial Antiqua', cursive;
    font-size: 2.1rem;
    font-weight: 400;
}

footer {
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 1rem;
    border-top: 4px double #000;
    font-family: 'Uncial Antiqua', cursive;
}

/* Responsive Design */
@media (max-width: 900px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-story p {
        column-count: 1;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }
    .content-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }
    .header-main h1 {
        font-size: 3rem;
    }
    .header-sub {
        font-size: 0.9rem;
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
    }
    .main-story h2 {
        font-size: 2.4rem;
    }
}

/* Exercise Styles */
.exercise-container {
    padding: 2rem;
    margin: 2rem;
    border: 4px double #000;
    background-color: rgba(0,0,0,0.1);
}

.exercise-container h2 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 2.4rem;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.exercise-container p {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

#story-list {
    list-style: none;
    padding: 0;
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
}

#story-list li {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Uncial Antiqua', cursive;
    color: #000;
}

#story-list li:hover {
    color: #444;
    text-decoration: underline;
}

#keyword-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0;
}

#keyword-list li {
    background-color: transparent;
    border: 1px solid #000;
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-size: 1.3rem;
    font-weight: bold;
    box-shadow: none;
    font-family: 'Uncial Antiqua', cursive;
}

.story-box {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #000;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: justify;
}

.exercise-container button {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.3rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: 2px solid #000;
    background-color: #000;
    color: #c5a982;
    margin-right: 0.5rem;
    transition: background-color 0.3s, color 0.3s;
}

.exercise-container button:hover {
    background-color: #c5a982;
    color: #000;
}

#retell-box {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    border: 1px solid #000;
    margin-bottom: 1rem;
    background-color: rgba(255,255,255,0.3);
}

.exercise-buttons {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

#timer {
    font-weight: bold;
    font-size: 1.4rem;
}

.timer-bar-container {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    margin-top: 1rem;
}

.timer-bar {
    width: 100%;
    height: 100%;
    background-color: #000;
    transition: width 1s linear;
}

/* Three-Phase Structure Styles */
.three-phase-structure {
    padding: 2rem;
    margin: 2rem;
    border-top: 4px double #000;
}

.three-phase-structure h2 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.three-phase-structure > p {
    text-align: center;
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

.phases-container {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap;
}

.phase {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: rgba(0,0,0,0.1);
    border: 2px solid #000;
    padding: 1.5rem;
    text-align: center;
}

.phase h3 {
    font-family: 'Uncial Antiqua', cursive;
    font-size: 1.8rem;
    margin-top: 0;
    color: #000;
}

.phase p {
    font-size: 1.2rem;
    text-align: justify;
}

@media (max-width: 600px) {
    #story-list {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
    }

    .exercise-container {
        margin: 1rem;
        padding: 1.5rem;
    }

    .three-phase-structure {
        margin: 1rem;
        padding: 1.5rem;
    }
}