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

/* Base styles */
body {
    font-family: Georgia, serif;
    line-height: 1.4;
    color: #bbb;
    background-color: #555;
    height: 100vh;
    overflow-x: hidden;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    position: relative;
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
}

.loader::after {
    content: "";
    position: absolute;
    width: 45px;
    height: 45px;
    top: -3px;
    left: -3px;
    border: 3px solid transparent;
    border-top: 3px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    animation: rotate 1s infinite linear;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Film grain effect */
.film-grain {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    background: url(../images/film-grain.gif) repeat top left;
    opacity: 0.1;
    pointer-events: none;
    z-index: 2;
}

/* Gradient overlay */
.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .1) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Poem container */
.poem-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.poem-content {
    max-width: 800px;
    width: 90%;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
    position: relative;
    z-index: 5;
}

/* Poem text styling */
.poem-text {
    font-size: 1.6rem;
    line-height: 1.6;
    margin-bottom: 2.3rem;
    text-align: center;
    color: #bbb;
}

.poem-text:last-child {
    margin-bottom: 0;
}

.last-line {
    font-style: italic;
    opacity: 0.9;
}

/* Back button */
.back-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: rgba(187, 187, 187, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #bbb;
    transition: all 0.3s ease;
    z-index: 100;
}

.back-button:hover {
    background: rgba(0, 0, 0, 0.2);
}

.arrow-up {
    border: solid #bbb;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px 4px 4px 3px;
    transform: rotate(-45deg);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Responsive styles */
@media (max-width: 992px) {
    .poem-text {
        font-size: 1.7rem;
        line-height: 1.6;
    }
}

@media (max-width: 767px) {
    .poem-content {
        padding: 30px 20px;
    }
    
    .poem-text {
        font-size: 1.6rem;
        line-height: 1.5;
        margin-bottom: 1.6rem;
    }
    
    .back-button {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .poem-text {
        font-size: 1.3rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    .back-button {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}