/* Commedia Memory Palace - Shared Styles */

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

body {
    font-family: 'Georgia', serif;
    background: #1a1a1a;
    color: #e5e5e5;
    min-height: 100vh;
    padding: 2rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

header h1 {
    font-size: 1.3rem;
    font-weight: normal;
    color: #ffffff;
    letter-spacing: 0.1em;
}

.layout {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2rem;
}

.image-section {
    grid-column: 1;
    grid-row: 1;
    text-align: center;
}

.image-section img {
    max-width: 900px;
    width: 100%;
}

.stanza {
    font-size: 1rem;
    line-height: 1.8;
}

.stanza-below {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    justify-content: center;
}

.stanza-below .stanza-inner {
    text-align: left;
    min-width: 450px;
}

.stanza-right {
    grid-column: 2;
    grid-row: 1;
    padding-top: 1rem;
    padding-left: 1rem;
    min-width: 380px;
}

details {
    margin: 0.8rem 0;
}

summary {
    cursor: pointer;
    color: #ffffff;
    font-size: 0.9rem;
    list-style: none;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: "▶ ";
    font-size: 0.7rem;
    margin-right: 0.3rem;
}

details[open] summary::before {
    content: "▼ ";
}

.text-content {
    margin-top: 0.3rem;
    padding-left: 1rem;
}

.italian {
    font-style: italic;
    color: #f5f5f5;
}

.english {
    color: #9CA3AF;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.1rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

nav a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s;
}

nav a:hover {
    color: #ffffff;
}

nav .prev,
nav .next {
    min-width: 100px;
}

nav .prev {
    text-align: left;
}

nav .next {
    text-align: right;
}

nav .home {
    color: #9CA3AF;
}

nav .home:hover {
    color: #ffffff;
}

.disabled {
    color: #4B5563 !important;
    cursor: default;
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .stanza-right {
        grid-column: 1;
        grid-row: 3;
        padding-left: 0;
        text-align: center;
        min-width: unset;
    }

    .stanza-below .stanza-inner {
        min-width: unset;
    }
}

@media print {
    body {
        background: white;
        color: black;
    }

    .italian {
        color: black;
    }

    summary {
        color: #2563EB;
    }

    details {
        display: block;
    }

    details[open] .text-content,
    .text-content {
        display: block !important;
    }
}
