:root {
    --primary-color: #c5a059;
    /* Wine Red */
    --accent-gold: #c5a059;
    --paper-bg: #fdfaf4;
}

body,
html {
    height: 100%;
    margin: 0;
    background-color: #e5e5e5;
    background-image: url('https://www.transparenttextures.com/patterns/gray-paper.png');
    overflow-x: hidden;
}

/* Full display feel - main container fits viewport as much as possible */
.diwan-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.poetry-book-page {
    background: var(--paper-bg);
    width: 100%;
    max-width: 850px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 2px solid var(--accent-gold);
    outline: 15px solid var(--paper-bg);
    box-shadow: 0 0 0 17px var(--accent-gold), 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Corner Decorations */
.poetry-book-page::before,
.poetry-book-page::after {
    content: '❧';
    position: absolute;
    font-size: 2rem;
    color: var(--accent-gold);
}

.poetry-book-page::before {
    top: 20px;
    left: 20px;
}

.poetry-book-page::after {
    bottom: 20px;
    right: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px double var(--accent-gold);
    padding-bottom: 20px;
}

.title-urdu {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 2.5rem;
    line-height: 1.8;
    color: var(--primary-color);
    margin: 0;
    direction: rtl;
}

.urdu-subtitle {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    font-size: 1.2rem;
    color: #888;
    margin-top: 15px;
    line-height: 1.6;
}

.poet-subtitle {
    font-family: 'Philosopher', sans-serif;
    font-size: 1.1rem;
    color: #888;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 10px;
}

.poetry-content {
    direction: rtl;
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 1.2rem;
    line-height: 2.1;
    color: #333;
    text-align: center;
}

.sher {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    width: 100%;
}

.misra {
    flex: 0 0 45%;
    display: block;
    text-align: justify;
    text-align-last: justify;
    text-justify: inter-word;
    padding: 0 10px;
    position: relative;
}

.divider-ornament {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin: 20px 0;
}

.back-nav {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.back-btn {
    background: white;
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #000;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12rem;
    opacity: 0.04;
    color: var(--primary-color);
    pointer-events: none;
    font-family: 'Noto Nastaliq Urdu', serif;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
}

@media (max-width: 768px) {
    .poetry-book-page {
        padding: 30px 15px;
        outline: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .title-urdu {
        font-size: 2.5rem;
    }

    .urdu-subtitle {
        font-size: 1.1rem;
    }

    .sher {
        flex-direction: column;
        gap: 15px;
    }

    .misra {
        flex: 0 0 90%;
        margin: 0 auto;
        min-width: unset;
    }

    .misra-sani {
        padding-right: 0;
    }
}