﻿

.poem-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /*margin-top: 1rem;*/
    font-size: 1rem;
    color: #555;
}

    .poem-meta span {
        display: block;
    }

/* ===== SECTIONS ===== */
.poem-section {
    /*background: white;*/
    /*border-radius: 8px;*/
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: #ffd4a4;
    border: 2px solid #8b4513;
    border-radius: 10px;
}

    .poem-section h2 {
        font-family: var(--font-serif);
        color: var(--primary);
        font-size: 1.4rem;
        margin-top: 0;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.5rem;
    }

.poem-presentation {
    font-size: 1.05rem;
    line-height: 1.3;
}

/* ===== POEM TEXT ===== */
.poem-text {
    font-family: var(--font-serif);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.1rem;
    white-space: pre-wrap;
    text-align: justify;
    color: #222;
}

/* ===== BUTTONS ===== */
.btn-back {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.2s;
}

    .btn-back:hover {
        background: #2980b9;
    }

.btn-retry {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.2s;
}

    .btn-retry:hover {
        background: #2980b9;
    }

/* ===== LOADING & ERROR ===== */
.loading, .error-box {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.error-box {
    color: var(--error);
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--secondary);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .poem-page {
        padding: 1rem;
    }

    .poem-section {
        padding: 1rem;
    }

    .poem-text {
        font-size: 1rem;
        text-align: left;
    }
}
