/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    background-color: black;
}

body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main story container */
.story-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Images fit to screen */
.story-image {
    width: 100%;
    max-height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.story-image img {
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: filter 0.2s ease;
}

.story-image img.blinking {
    filter: blur(8px);
}

/* Eyelid overlays */
.eyelid {
    position: absolute;
    left: 0;
    width: 100%;
    height: 0;
    background-color: black;
    z-index: 10;
    transition: height 0.25s ease-in-out;
}

.eyelid-top {
    top: 0;
}

.eyelid-bottom {
    bottom: 0;
}

.eyelid.closing {
    height: 50%;
}

/* Large centered white serif text */
.story-text {
    margin-top: 2rem;
    text-align: center;
}

.story-text p,
#story-caption {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 2rem;
    color: white;
    text-align: center;
}

/* Progress hearts */
.story-progress {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.dot {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease, transform 0.3s ease;
}

.dot::before {
    content: '♥';
}

.dot.active {
    color: red;
    transform: scale(1.2);
}

/* Restart button */
.restart-button {
    margin-top: 2rem;
    padding: 1rem 2rem;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 1.5rem;
    color: white;
    background-color: transparent;
    border: 2px solid white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

.restart-button.visible {
    opacity: 1;
    visibility: visible;
}

.restart-button:hover {
    background-color: white;
    color: black;
}
