/* ==========================================================================
   "MEET THE RHINO" – WORLD RHINO DAY 2026 INTERACTIVE FLIPBOOK
   Department of Chemistry, Thiagarajar College of Engineering & TCE EIACP PC-RP
   Under the Aegis of MoEF&CC, Government of India | Mission LiFE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #070e0a;
    --bg-deep: #0b1510;
    --bg-card: #122018;
    --bg-surface: #182c22;
    --bg-surface-trans: rgba(24, 44, 34, 0.78);
    --gold-300: #fde68a;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-gradient: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #d97706 100%);
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --emerald-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --crimson: #ef4444;
    --sand-100: #fefdfb;
    --sand-200: #f7f3ec;
    --sand-300: #e8e0d1;
    --sand-400: #cbbfa9;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-heading: 'Cinzel', serif;
    --font-accent: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-book: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.08);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.25);
    --radius-book: 20px;
    --radius-card: 16px;
    --radius-sm: 10px;
    --transition-smooth: all 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: radial-gradient(circle at 50% 20%, #15271d 0%, #080f0b 70%, #040806 100%);
    background-attachment: fixed;
    user-select: none;
    -webkit-user-select: none;
}

/* Background Atmosphere */
.ambient-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: 
        radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.07) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
}

/* Header Top Bar */
.book-header {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: rgba(11, 21, 16, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-badge-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 8px rgba(245, 158, 11, 0.4));
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-tagline {
    font-family: var(--font-accent);
    font-size: 0.65rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-400);
    font-weight: 700;
    line-height: 1.1;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--sand-100);
    line-height: 1.2;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--sand-200);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-icon:hover, .btn-icon.active {
    background: var(--gold-500);
    color: #111;
    border-color: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-pill-share {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border: none;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--font-accent);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: var(--transition-smooth);
}

.btn-pill-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

/* Main Flipbook Stage */
.stage-container {
    flex: 1;
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px 80px 16px;
    perspective: 2000px;
    width: 100%;
}

.book-wrapper {
    position: relative;
    width: 100%;
    max-width: 960px;
    height: calc(100dvh - 146px);
    min-height: 540px;
    max-height: 720px;
    border-radius: var(--radius-book);
    box-shadow: var(--shadow-book);
    background: var(--bg-card);
    overflow: hidden;
    border: 1.5px solid rgba(245, 158, 11, 0.25);
    transform-style: preserve-3d;
}

/* Page Stack Deck */
.pages-deck {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Individual Page (Block layout to prevent flex overflow clipping!) */
.page {
    position: absolute;
    inset: 0;
    background: var(--bg-card);
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px) scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.4s;
    display: block; /* CRITICAL: Block layout ensures full vertical scroll without top-clipping */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 158, 11, 0.35) transparent;
}

.page::-webkit-scrollbar {
    width: 6px;
}

.page::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.35);
    border-radius: 999px;
}

.page.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    z-index: 10;
}

.page.prev-page {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-40px) scale(0.98);
    z-index: 5;
}

/* Page Inner Layouts: ALWAYS top-aligned */
.page-inner {
    padding: 30px 34px 40px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

.page-watermark {
    position: absolute;
    right: -15px;
    bottom: -20px;
    font-size: 16rem;
    opacity: 0.03;
    pointer-events: none;
    user-select: none;
    line-height: 1;
}

/* Page Header Typography */
.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 6px;
}

.page-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold-400);
    box-shadow: 0 0 8px var(--gold-400);
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 4vw, 2.1rem);
    font-weight: 800;
    color: var(--sand-100);
    line-height: 1.15;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.page-title .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    max-width: 680px;
    font-weight: 400;
    line-height: 1.5;
}

/* ==========================================================================
   PAGE 1: COVER
   ========================================================================== */
.page-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(7, 14, 10, 0.45) 0%, 
        rgba(7, 14, 10, 0.7) 40%, 
        rgba(7, 14, 10, 0.95) 85%,
        #070e0a 100%);
    z-index: 1;
}

.cover-inner {
    position: relative;
    z-index: 2;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 34px 34px 24px;
    box-sizing: border-box;
}

.cover-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.gov-emblem-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(245, 158, 11, 0.3);
    padding: 5px 14px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.gov-emblem-badge img {
    height: 20px;
    width: auto;
}

.gov-emblem-badge span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: 0.5px;
    font-family: var(--font-accent);
}

.date-stamp-badge {
    background: var(--gold-gradient);
    color: #111;
    font-family: var(--font-accent);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.cover-center {
    margin: auto 0;
    text-align: center;
    max-width: 800px;
    padding: 10px 0;
}

.cover-rhino-emblem {
    font-size: 3.2rem;
    margin-bottom: 8px;
    display: inline-block;
    filter: drop-shadow(0 4px 16px rgba(245, 158, 11, 0.5));
}

.cover-h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5.5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--sand-100);
    line-height: 1.08;
    margin-bottom: 8px;
    text-shadow: 0 4px 25px rgba(0,0,0,0.8);
}

.cover-h1 span {
    display: block;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cover-tagline {
    font-family: var(--font-accent);
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
    font-weight: 600;
    color: var(--gold-300);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 14px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.cover-desc {
    font-size: 0.95rem;
    color: rgba(243, 244, 246, 0.88);
    max-width: 580px;
    margin: 0 auto 22px;
    font-weight: 400;
    line-height: 1.55;
}

.cover-action {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-open-book {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gold-gradient);
    color: #111;
    font-family: var(--font-accent);
    font-weight: 800;
    font-size: 0.95rem;
    padding: 14px 32px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.45);
    transition: var(--transition-smooth);
}

.btn-open-book:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.65);
}

.btn-open-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: var(--sand-100);
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 14px 26px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-open-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--gold-400);
    color: var(--gold-300);
    transform: translateY(-2px);
}

.cover-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 12px;
    margin-top: 10px;
}

/* ==========================================================================
   PAGE 2: WHO IS THE RHINO?
   ========================================================================== */
.who-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.who-card {
    background: var(--bg-surface-trans);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: var(--radius-card);
    padding: 20px;
    transition: var(--transition-smooth);
}

.who-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.who-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.who-card-title {
    font-family: var(--font-accent);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sand-100);
    margin-bottom: 6px;
}

.who-card-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.geo-map-box {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-card);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.geo-map-icon {
    font-size: 2.6rem;
    flex-shrink: 0;
}

.geo-map-content h4 {
    font-family: var(--font-accent);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald-400);
    margin-bottom: 4px;
}

.geo-map-content p {
    font-size: 0.88rem;
    color: var(--sand-200);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   PAGE 3: MEET THE FIVE
   ========================================================================== */
.species-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.species-card {
    background: var(--bg-surface-trans);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.species-card:hover, .species-card.active-species {
    transform: translateY(-4px);
    border-color: var(--gold-400);
    background: rgba(245, 158, 11, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
}

.species-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    border: 2px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 8px;
    transition: var(--transition-smooth);
}

.species-card:hover .species-avatar, .species-card.active-species .species-avatar {
    border-color: var(--gold-400);
    transform: scale(1.06);
}

.species-name {
    font-family: var(--font-accent);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--sand-100);
    line-height: 1.2;
    margin-bottom: 3px;
}

.species-sci {
    font-size: 0.68rem;
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.status-badge {
    font-family: var(--font-accent);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.status-crit {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-vuln {
    background: rgba(245, 158, 11, 0.2);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-near {
    background: rgba(52, 211, 153, 0.2);
    color: #a7f3d0;
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.species-detail-drawer {
    background: linear-gradient(135deg, rgba(18, 32, 24, 0.96), rgba(11, 21, 16, 0.96));
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-card);
    padding: 16px 20px;
    display: flex;
    gap: 16px;
    align-items: center;
}

.sdd-main {
    flex: 1;
}

.sdd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.sdd-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold-400);
}

.sdd-desc {
    font-size: 0.86rem;
    color: var(--sand-200);
    line-height: 1.48;
    margin-bottom: 10px;
}

.sdd-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sdd-stat-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--sand-300);
}

.sdd-stat-pill strong {
    color: var(--gold-300);
}

/* ==========================================================================
   PAGE 4: DID YOU KNOW?
   ========================================================================== */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.fact-card {
    background: var(--bg-surface-trans);
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: var(--radius-card);
    padding: 18px;
    transition: var(--transition-smooth);
}

.fact-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold-400);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.fact-card.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(18, 32, 24, 0.9) 100%);
    border-color: rgba(245, 158, 11, 0.35);
}

.fact-icon-badge {
    font-size: 1.8rem;
    margin-bottom: 6px;
    display: inline-block;
}

.fact-number {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold-400);
    line-height: 1.1;
    margin-bottom: 4px;
}

.fact-title {
    font-family: var(--font-accent);
    font-size: 1rem;
    font-weight: 700;
    color: var(--sand-100);
    margin-bottom: 4px;
}

.fact-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* ==========================================================================
   PAGE 5: WHY DO RHINOS NEED PROTECTION?
   ========================================================================== */
.threats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.threat-card {
    background: var(--bg-surface-trans);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    padding: 18px;
    display: flex;
    gap: 14px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.threat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--crimson);
}

.threat-card:nth-child(2)::before {
    background: #f97316;
}

.threat-card:nth-child(3)::before {
    background: var(--emerald-500);
}

.threat-card:nth-child(4)::before {
    background: #3b82f6;
}

.threat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.threat-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    line-height: 1;
}

.threat-body h4 {
    font-family: var(--font-accent);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--sand-100);
    margin-bottom: 4px;
}

.threat-body p {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 8px;
}

.threat-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-accent);
    color: var(--gold-400);
    background: rgba(245, 158, 11, 0.1);
    padding: 3px 9px;
    border-radius: 999px;
}

/* ==========================================================================
   PAGE 6: THE CONSERVATION MESSAGE & PLEDGE
   (Top-aligned, zero clipping, fully responsive!)
   ========================================================================== */
.page-conservation {
    background-size: cover;
    background-position: center;
}

.cons-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, 
        rgba(7, 14, 10, 0.82) 0%, 
        rgba(7, 14, 10, 0.94) 50%, 
        #070e0a 100%);
    z-index: 1;
}

.cons-inner {
    position: relative;
    z-index: 2;
    padding: 24px 28px 40px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* CRITICAL: Never space-between, so header is always at top! */
    gap: 14px;
    box-sizing: border-box;
}

.creed-box {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}

.creed-h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3.8vw, 1.85rem);
    font-weight: 900;
    line-height: 1.2;
    color: var(--sand-100);
    margin-bottom: 6px;
}

.creed-h2 .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.creed-sub {
    font-size: clamp(0.85rem, 2vw, 0.98rem);
    color: var(--gold-300);
    font-weight: 500;
    letter-spacing: 0.4px;
}

/* Interactive Pledge Generator */
.pledge-box {
    background: rgba(24, 44, 34, 0.85);
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-card);
    padding: 16px 20px;
    backdrop-filter: blur(12px);
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
}

.pledge-title {
    font-family: var(--font-accent);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sand-100);
    margin-bottom: 8px;
}

.pledge-form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pledge-input {
    flex: 1 1 200px;
    padding: 11px 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1.5px solid rgba(245, 158, 11, 0.3);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition-smooth);
}

.pledge-input:focus {
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.btn-pledge {
    background: var(--gold-gradient);
    color: #111;
    border: none;
    font-family: var(--font-accent);
    font-weight: 800;
    font-size: 0.92rem;
    padding: 11px 24px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-pledge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.55);
}

/* Certificate Result Modal */
.cert-card {
    display: none;
    background: linear-gradient(135deg, #102419, #08110c);
    border: 2px solid var(--gold-400);
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 14px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-glow);
    animation: popIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.94); }
    to { opacity: 1; transform: scale(1); }
}

.cert-header {
    font-family: var(--font-accent);
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-400);
    margin-bottom: 4px;
}

.cert-user-name {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    font-weight: 900;
    color: var(--sand-100);
    margin-bottom: 2px;
    word-break: break-word;
}

.cert-badge-text {
    font-size: 0.82rem;
    color: var(--emerald-400);
    margin-bottom: 10px;
    font-weight: 600;
}

.cert-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-download-cert {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-download-cert:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: var(--gold-400);
}

/* Share & Action Buttons Bar */
.social-share-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn-share-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #25d366;
    color: #fff;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.86rem;
    padding: 10px 20px;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
}

.btn-share-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.55);
}

.btn-copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--font-accent);
    font-weight: 700;
    font-size: 0.86rem;
    padding: 10px 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-copy-link:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--gold-400);
    color: var(--gold-300);
    transform: translateY(-2px);
}

/* ==========================================================================
   NAVIGATION & BOTTOM CONTROLS
   ========================================================================== */
.flipbook-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: rgba(11, 21, 16, 0.95);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(245, 158, 11, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-counter {
    font-family: var(--font-accent);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--gold-300);
    letter-spacing: 1px;
}

.nav-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-dot.active {
    background: var(--gold-500);
    width: 24px;
    border-radius: 999px;
    box-shadow: 0 0 10px var(--gold-400);
}

.nav-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--sand-200);
    padding: 8px 18px;
    border-radius: 999px;
    font-family: var(--font-accent);
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    min-height: 40px;
    transition: var(--transition-smooth);
}

.btn-nav:hover:not(:disabled) {
    background: var(--gold-500);
    color: #111;
    border-color: var(--gold-400);
    transform: translateY(-2px);
}

.btn-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Toast notification */
.toast-msg {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    background: #10b981;
    color: #fff;
    padding: 9px 22px;
    border-radius: 999px;
    font-family: var(--font-accent);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE & MOBILE DESIGN
   ========================================================================== */
@media (max-width: 900px) {
    .book-wrapper {
        height: calc(100dvh - 140px);
        max-height: none;
    }
    
    .species-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .facts-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .fact-card.featured {
        grid-column: span 2;
    }
}

@media (max-width: 680px) {
    .book-header {
        padding: 10px 14px;
    }
    
    .brand-tagline {
        font-size: 0.58rem;
    }

    .brand-name {
        font-size: 0.82rem;
    }

    .stage-container {
        padding: 8px 8px 72px 8px;
    }
    
    .book-wrapper {
        height: calc(100dvh - 132px);
        min-height: 480px;
        border-radius: 14px;
    }
    
    .page-inner {
        padding: 20px 16px 36px;
    }
    
    .cover-inner {
        padding: 20px 16px 20px;
    }

    .cons-inner {
        padding: 18px 16px 36px;
        gap: 12px;
    }
    
    .cover-h1 {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .cover-tagline {
        font-size: 0.95rem;
    }
    
    .cover-action button {
        width: 100%;
        justify-content: center;
    }

    .cover-bottom {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .who-grid, .threats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .geo-map-box {
        grid-column: span 1;
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px;
    }
    
    .species-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .species-grid .species-card:nth-child(5) {
        grid-column: span 2;
    }

    .species-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }

    .species-detail-drawer {
        flex-direction: column;
        text-align: center;
        padding: 14px;
        gap: 10px;
    }

    .species-detail-drawer .sdd-header {
        flex-direction: column;
        gap: 6px;
    }

    .sdd-stats {
        justify-content: center;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .fact-card.featured {
        grid-column: span 1;
    }
    
    .pledge-box {
        padding: 14px 12px;
    }

    .pledge-form {
        flex-direction: column;
    }

    .pledge-input, .btn-pledge {
        width: 100%;
    }

    .cert-actions button {
        width: 100%;
    }

    .social-share-row {
        flex-direction: column;
        width: 100%;
    }

    .social-share-row button, .social-share-row a {
        width: 100%;
    }

    .flipbook-nav-bar {
        padding: 0 14px;
        height: 60px;
    }
    
    .btn-nav span {
        display: none;
    }
    
    .btn-nav {
        padding: 8px 14px;
        min-width: 44px;
        justify-content: center;
    }
}
