/* Book Theme - Parchment and Aged Paper Styles */
/* Apply this theme to all calculator pages */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Global Book Theme Variables */
:root {
    --parchment-light: #f9f3e8;
    --parchment: #f4e8d8;
    --parchment-dark: #e8dcc8;
    --leather-brown: #8b6f47;
    --ink-dark: #2c1810;
    --ink: #3a2817;
    --ink-light: #6b5a47;
    --accent-red: #8b3a3a;
    --accent-gold: #b89968;
    --shadow-dark: rgba(44, 24, 16, 0.8);
}

/* Parchment Texture Mixin */
.parchment-texture {
    background: linear-gradient(135deg, var(--parchment-light) 0%, var(--parchment) 100%);
    position: relative;
}

.parchment-texture::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 111, 71, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 58, 58, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(184, 153, 104, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

/* Book Page Border */
.book-border {
    border: 4px solid var(--leather-brown);
    box-shadow: 
        0 8px 30px var(--shadow-dark),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 0 80px rgba(139, 111, 71, 0.3);
    position: relative;
}

.book-border::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(139, 111, 71, 0.3);
    pointer-events: none;
}

/* Aged Paper Effect */
.aged-paper {
    background: linear-gradient(135deg, #f9f3e8 0%, #f4e8d8 100%);
    box-shadow: 
        inset 0 0 50px rgba(139, 111, 71, 0.1),
        inset 0 0 20px rgba(139, 111, 71, 0.05);
}

/* Ink Stain Decorations */
.ink-stain {
    position: relative;
}

.ink-stain::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(58, 40, 23, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Leather Binding Effect */
.leather-binding {
    background: linear-gradient(135deg, #8b6f47 0%, #6b5537 100%);
    border: 2px solid #5a4527;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

/* Decorative Corner Ornaments */
.ornament-corners::before,
.ornament-corners::after {
    content: '❧';
    position: absolute;
    font-size: 1.5rem;
    color: var(--accent-gold);
    opacity: 0.6;
}

.ornament-corners::before {
    top: 10px;
    left: 10px;
}

.ornament-corners::after {
    bottom: 10px;
    right: 10px;
    transform: rotate(180deg);
}

/* Book Typography */
.book-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--ink-dark);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.book-text {
    font-family: 'Crimson Text', 'Garamond', 'Georgia', serif;
    line-height: 1.8;
    color: var(--ink);
}

.illuminated-letter::first-letter {
    font-size: 3em;
    font-weight: bold;
    float: left;
    line-height: 0.8;
    margin: 0.1em 0.1em 0 0;
    color: var(--accent-red);
}

/* Wax Seal Effect */
.wax-seal {
    position: relative;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #8b3a3a 0%, #6b2a2a 70%, #4b1a1a 100%);
    border-radius: 50%;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

/* Scroll Effect */
.scroll-effect {
    background: linear-gradient(135deg, #f9f3e8 0%, #f4e8d8 100%);
    border-radius: 8px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 0 30px rgba(139, 111, 71, 0.1);
    position: relative;
}

.scroll-effect::before,
.scroll-effect::after {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 111, 71, 0.2) 0%, transparent 100%);
}

.scroll-effect::before {
    left: 0;
}

.scroll-effect::after {
    right: 0;
    transform: scaleX(-1);
}

/* Page Curl Effect */
.page-curl {
    position: relative;
}

.page-curl::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 30px 30px;
    border-color: transparent transparent #d4c4a8 transparent;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Quill Pen Cursor (Optional) */
.quill-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><text y="15" font-size="15">🖊️</text></svg>'), auto;
}

/* Book Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
    margin: 30px 0;
    position: relative;
}

.section-divider::before {
    content: '❦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--parchment);
    padding: 0 15px;
    color: var(--accent-gold);
    font-size: 1.2rem;
}
