/* ==========================================================================
   MASTER BLUEPRINT FOR CAERITHBOOKS.COM (UNIFIED - FINAL v19 - AESTHETIC FIX)
   Architect: Alex Molina
   Engineer: Gemini (Feature Ordinances Added & Corrected)
   STATUS: Contains all ordinances for Desktop and intelligent, adaptive Tablet views.
========================================================================== */

/* ==========================================================================
   CHAPTER 1: GLOBAL STYLES & FOUNDATIONS (Federal Law)
========================================================================== */

/* --- General & Foundational Styles --- */
#loading-screen {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #000; z-index: 9999; opacity: 1; transition: opacity 0.5s ease-out;
}

html, body {
    margin: 0; padding: 0; width: 100%; height: 100%;
    font-family: 'Helvetica Neue', sans-serif; color: #e0e0e0;
}

/* --- Main Layout & Structure --- */
.video-background {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    overflow: hidden; background-color: #06104d;
    background-image: url('images/beforev.jpg'); background-size: cover;
    background-position: center center; background-repeat: no-repeat;
    z-index: -2;
}
.video-background video {
    min-width: 100%; min-height: 100%; width: auto; height: auto;
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    object-fit: cover; pointer-events: none;
}

.site-stage {
    position: relative; width: 100%; height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    flex-grow: 1;
}

/* --- Transitions & Animations (Inter-City Transport) --- */
.view {
    position: absolute; top: 0; left: 0; width: 100%; min-height: 100%;
    opacity: 0; transform: scale(1.02);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    pointer-events: none; z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}
.view.active { opacity: 1; transform: scale(1); pointer-events: auto; z-index: 11; }
.view.fading-out { opacity: 0; transform: scale(0.98); pointer-events: none; z-index: 10; }

/* --- Global Utilities (Federal Services) --- */
.home-icon-button img { width: 8.5vmin; height: 8.5vmin; display: block; transition: transform 0.3s ease-in-out; }
.home-icon-button:hover img { transform: scale(1.1); }

.close-button {
    position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff;
    background: transparent; border: none; cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease; z-index: 1001;
}
.close-button:hover { transform: scale(1.2); color: #aaa; }


/* ==========================================================================
   CHAPTER 2: THE MAIN GATE (Home Page View - Desktop) - FINAL 5-BOOK LAYOUT
========================================================================== */
#home-view {
    display: flex;
    justify-content: center;
    align-items: center; /* This vertically centers the books */
    gap: 2.5vw; /* The space BETWEEN the books */
    padding: 0 4vw; /* This creates space on the far left and right edges */
    box-sizing: border-box;
    height: 100%; /* Ensures the flex container takes up the full height */
}

#home-view .main-title-img {
    position: absolute;
    width: 26vw;
    max-width: 550px;
    top: -1vh; /* Positioned from the top */
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    z-index: 10; /* Ensure title is above books */
    pointer-events: none;
}

#home-view .book-group {
    position: relative;
    width: 14vw; /* The width of each book container */
    max-width: 220px; /* Prevents books from getting too large */
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 5;
}

#home-view .book-cover {
    width: 100%;
    height: auto;
    border-radius: 1vmin;
    box-shadow: 0 0.5vmin 1.5vmin rgba(0,0,0,0.5);
    display: block;
}

#home-view .book-link {
    text-decoration: none;
    display: block;
    transform: scale(1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 4;
}

#home-view .book-link:hover {
    transform: scale(1.05);
    box-shadow: 0 1vmin 3vmin rgba(0,0,0,0.8);
    z-index: 6;
}

#home-view .inner-left-book .saga-tag {
    position: absolute;
    top: -9vmin;
    left: 0;
    width: 100%;
    font-family: 'Cinzel', serif;
    font-size: 3vmin;
    color: #c0c0c0;
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
    font-weight: bold;
    text-align: left;
}

#home-view .inner-right-book .saga-tag {
    position: absolute;
    top: -9vmin;
    right: 0;
    width: 100%;
    font-family: 'Cinzel', serif;
    font-size: 3vmin;
    color: #fdfcfc;
    text-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
    font-weight: bold;
    text-align: right;
}

#home-view .saga-continues-img,
#home-view .coming-soon-img {
    width: 100%;
    height: auto;
    margin-top: 2vmin;
}

#home-view .apex-book {
    transform: translateY(-7vh);
    width: 16vw;
    box-shadow: 0 0 35px 5px rgba(9, 17, 19, 0.7);
}

#home-view .inner-left-book {
    width: 15vw;
    transform: translateY(-5vh);
}

#home-view .inner-right-book {
    width: 15vw;
    transform: translateY(-3vh);
}

#home-view .outer-right-book {
    transform: translateY(2vh);
}

/* ==========================================================================
   CHAPTER 3 & 4: ALL BOOK DETAIL PAGES (Unified Ordinances - Desktop)
========================================================================== */
.arca-of-itharion-book-page-container, 
.arca-book-page-container, 
.ascendemos-book-page-container,
.el-auroral-weaver-book-page-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 90vw;
    height: 90vh;
    max-width: 1400px;
    gap: 3vw;
    padding: 3vmin;
    padding-bottom: 20vh;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 1vmin;
}

.arca-of-itharion-cover-container, 
.arca-cover-container, 
.ascendemos-cover-container,
.el-auroral-weaver-cover-container {
    flex: 0 0 35%;
    height: auto;
}
.arca-of-itharion-book-cover-large, 
.arca-book-cover-large, 
.ascendemos-book-cover-large,
.el-auroral-weaver-book-cover-large {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.arca-of-itharion-book-details, 
.arca-book-details, 
.ascendemos-book-details,
.el-auroral-weaver-book-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    color: #fff;
    font-family: 'Cinzel', serif;
}
.arca-of-itharion-book-text-content, 
.arca-book-text-content, 
.ascendemos-book-text-content,
.el-auroral-weaver-book-text-content {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 2vmin;
    box-sizing: border-box;
}

.arca-of-itharion-book-details h1, .arca-book-details h1, .ascendemos-book-details h1, .el-auroral-weaver-book-details h1 { font-size: 4.5vmin; margin-top: 0; text-align: left; }
.arca-of-itharion-book-details h3, .arca-book-details h3, .ascendemos-book-details h3, .el-auroral-weaver-book-details h3 { font-size: 3.0vmin; font-style: italic; color: #ccc; margin-bottom: 2vmin; text-align: left; }
.arca-of-itharion-book-details p, .arca-book-details p, .ascendemos-book-details p, .el-auroral-weaver-book-details p { font-size: 2.2vmin; text-align: justify; line-height: 1.6; margin-bottom: 2vmin; }
.arca-of-itharion-tagline, .arca-tagline, .ascendemos-tagline, .el-auroral-weaver-tagline { font-style: italic; text-align: left; }


/* ==========================================================================
   CHAPTER 3.1: ARCA OF ITHARION & ASCENDEMOS (Specific Ordinances)
========================================================================== */
#arca-of-itharion-view .arca-of-itharion-purchase-options-container,
#ascendemos-book-view .ascendemos-purchase-options-container { 
    margin-top: auto; 
    padding-top: 2vh; 
    flex-shrink: 0; 
}

#arca-of-itharion-view .arca-of-itharion-button-container,
#ascendemos-book-view .ascendemos-button-container { 
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    gap: 1.5vmin; 
}

#arca-of-itharion-view .arca-of-itharion-buy-buttons-wrapper, 
#arca-of-itharion-view .arca-of-itharion-taste-button-wrapper,
#ascendemos-book-view .ascendemos-buy-buttons-wrapper, 
#ascendemos-book-view .ascendemos-taste-button-wrapper { 
    display: flex; 
    align-items: center; 
    gap: 2vmin; 
}

.arca-of-itharion-taste-button,
.ascendemos-taste-button {
    display: block; padding: 2.5vmin 2vmin; color: #fff; text-decoration: none;
    border-radius: 0.8vmin; font-family: 'Cinzel', serif; font-size: 1.8vmin;
    text-align: center; transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: #1a3c52; border: 0.2vmin solid #3c7cac;
}
.arca-of-itharion-taste-button:hover,
.ascendemos-taste-button:hover { 
    transform: translateY(-0.2vmin); 
    box-shadow: 0 0.4vmin 1.2vmin rgba(0,0,0,0.2); 
}

/* ==========================================================================
   CHAPTER 3.2: SOVEREIGN TREASURY GATES (Stripe Buttons)
========================================================================== */
.stripe-buy-button { display: block; line-height: 0; background: none; border: none; padding: 0; cursor: pointer; }
.stripe-buy-button img { transition: transform 0.2s ease-in-out; }
.stripe-buy-button:hover img { transform: scale(1.05); }

#arca-of-itharion-view .stripe-buy-button img, 
#ascendemos-book-view .stripe-buy-button img, 
#arca-book-view .stripe-buy-button img,
#the-auroral-weaver-view .stripe-buy-button img,
#el-auroral-weaver-view .stripe-buy-button img { 
    height: 8.5vmin; 
    width: auto; 
}

.home-buy-button { display: block; margin-top: 2vmin; width: 85%; }
.home-buy-button img { width: 100%; height: auto; transition: transform 0.2s ease-in-out; }
.home-buy-button:hover img { transform: scale(1.05); }


/* ==========================================================================
   CHAPTER 4.1 & 4.2: THE WEAVER BOOKS (English & Spanish Specifics)
========================================================================== */
.weaver-button-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2vmin;
}
.weaver-taste-button-wrapper {
    display: flex;
}
.weaver-buy-buttons-wrapper {
    justify-content: flex-start;
    display: flex;
    align-items: center;
    gap: 2vmin;
}
.arca-taste-button,
.el-auroral-weaver-taste-button {
    display: block;
    padding: 2.5vmin 2vmin;
    color: #fff;
    text-decoration: none;
    border-radius: 0.8vmin;
    font-family: 'Cinzel', serif;
    font-size: 1.8vmin;
    text-align: center;
    background-color: #1a3c52;
    border: 0.2vmin solid #3c7cac;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.arca-taste-button:hover,
.el-auroral-weaver-taste-button:hover {
    transform: translateY(-0.2vmin);
    border-color: rgba(0, 220, 255, 0.7);
    box-shadow: 0 0 15px 4px rgba(0, 220, 255, 0.6);
}

/* ==========================================================================
   CHAPTER 5: ALL OVERLAYS (Reading Room & Galleries)
========================================================================== */

/* --- UNIFIED READING OVERLAY STYLES --- */
.arca-of-itharion-reading-overlay,
.ascendemos-reading-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); z-index: 1000; display: flex;
    justify-content: center; align-items: center; opacity: 0; pointer-events: none;
    transition: opacity 1.8s ease-in-out, backdrop-filter 1.8s ease-in-out; backdrop-filter: blur(0px);
}
.arca-of-itharion-reading-overlay.visible,
.ascendemos-reading-overlay.visible { opacity: 1; pointer-events: auto; backdrop-filter: blur(8px); }

#arca-of-itharion-chapter-content-wrapper,
#ascendemos-chapter-content-wrapper {
    width: 80%; max-width: 800px; height: 65vh; background-color: #080808;
    border: 1px solid #444; border-radius: 10px; transform: translateY(-20px);
    transition: opacity 1.0s ease-out 0.3s, transform 1.0s ease-out 0.3s;
    opacity: 0; display: flex; flex-direction: column;
}
.arca-of-itharion-reading-overlay.visible #arca-of-itharion-chapter-content-wrapper,
.ascendemos-reading-overlay.visible #ascendemos-chapter-content-wrapper { transform: translateY(0); opacity: 1; }

#arca-of-itharion-chapter-content,
#ascendemos-chapter-content { 
    flex-grow: 1; overflow-y: auto; padding: 40px; color: #e0e0e0; 
    font-family: 'Cinzel', serif; font-size: 1.1rem; line-height: 1.7; 
}

/* --- UNIFIED GALLERY OVERLAY STYLES --- */
.arca-of-itharion-gallery-overlay,
.arca-gallery-overlay,
.ascendemos-gallery-overlay,
.el-auroral-weaver-gallery-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: rgba(0, 0, 15, 0.2); z-index: 2000; display: flex;
    justify-content: center; align-items: center; opacity: 0; pointer-events: none;
    transition: opacity 0.5s ease-in-out, backdrop-filter 0.5s ease-in-out; backdrop-filter: blur(0px);
}
.arca-of-itharion-gallery-overlay.visible,
.arca-gallery-overlay.visible,
.ascendemos-gallery-overlay.visible,
.el-auroral-weaver-gallery-overlay.visible { opacity: 1; pointer-events: auto; backdrop-filter: blur(8px); }

.arca-of-itharion-gallery-view,
.arca-gallery-view,
.ascendemos-gallery-view,
.el-auroral-weaver-gallery-view { 
    width: 90vw; max-width: 1600px; 
    transition: opacity 0.5s ease, transform 0.5s ease; 
}
.arca-of-itharion-gallery-view:not(.active),
.arca-gallery-view:not(.active),
.ascendemos-gallery-view:not(.active),
.el-auroral-weaver-gallery-view:not(.active) { display: none; }

.arca-of-itharion-gallery-title,
.arca-gallery-title,
.ascendemos-gallery-title,
.el-auroral-weaver-gallery-title { 
    font-family: 'Cinzel', serif; color: #fff; text-align: center; 
    font-size: clamp(1.8rem, 4vmin, 2.5rem); margin-bottom: 2vh; width: 100%; 
}

.arca-of-itharion-gallery-grid,
.arca-gallery-grid,
.ascendemos-gallery-grid,
.el-auroral-weaver-gallery-grid { 
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1vmin; 
}

.gallery-item { 
    aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; position: relative; 
    cursor: pointer; border: 2px solid rgba(255,255,255,0.3); 
    transition: transform 0.3s ease, border-color 0.3s ease; 
}
.gallery-item:hover { transform: scale(1.05); border-color: #fff; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.item-title { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); 
    color: #fff; font-family: 'Cinzel', serif; padding: 20px 15px 15px; 
    text-align: center; font-size: 1.2rem; box-sizing: border-box; 
}

.back-button { 
    position: absolute; top: 30px; left: 30px; background: transparent; border: none; 
    color: #fff; font-family: 'Cinzel', serif; font-size: 1.2rem; 
    cursor: pointer; transition: color 0.3s; z-index: 10; 
}
.back-button:hover { color: #3c7cac; }

.arca-of-itharion-player-container,
.arca-player-container,
.ascendemos-player-container,
.el-auroral-weaver-player-container { 
    position: relative; width: 100%; max-width: 900px; margin: auto; max-height: 70vh; 
    background-color: #000; border-radius: 10px; overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid #444; 
    transform: translateY(-5vh); 
}

#arca-of-itharion-player-background-image,
#arca-player-background-image,
#ascendemos-player-background-image,
#el-auroral-weaver-player-background-image { 
    width: 100%; height: 100%; object-fit:contain; opacity: 0.7; 
}

.arca-of-itharion-player-controls,
.arca-player-controls,
.ascendemos-player-controls,
.el-auroral-weaver-player-controls { 
    position: absolute; bottom: 0; left: 0; width: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); 
    display: flex; align-items: center; padding: 20px; box-sizing: border-box; 
}

#arca-of-itharion-player-title,
#arca-player-title,
#ascendemos-player-title,
#el-auroral-weaver-player-title { 
    color: #fff; font-family: 'Cinzel', serif; font-size: 1.2rem; 
    margin: 0; flex-grow: 1; 
}

#arca-of-itharion-gallery-play-pause-btn,
#arca-gallery-play-pause-btn,
#ascendemos-gallery-play-pause-btn,
#el-auroral-weaver-gallery-play-pause-btn { 
    background: transparent; border: 2px solid #fff; color: #fff; 
    padding: 8px 20px; font-family: 'Cinzel', serif; font-size: 1rem; 
    cursor: pointer; border-radius: 5px; margin-left: 20px; 
    transition: background-color 0.3s, color 0.3s; 
}
#arca-of-itharion-gallery-play-pause-btn:hover,
#arca-gallery-play-pause-btn:hover,
#ascendemos-gallery-play-pause-btn:hover,
#el-auroral-weaver-gallery-play-pause-btn:hover { background-color: #fff; color: #000; }

.arca-of-itharion-progress-bar-container,
.arca-progress-bar-container,
.ascendemos-progress-bar-container,
.el-auroral-weaver-progress-bar-container { 
    flex-grow: 1; height: 6px; background-color: rgba(255,255,255,0.3); 
    margin-left: 20px; border-radius: 3px; overflow: hidden; max-width: 300px; 
}
.progress-bar { 
    width: 0%; height: 100%; background-color: #3c7cac; 
    border-radius: 3px; transition: width 0.1s linear; 
}

/* ==========================================================================
   CHAPTER 6: THE INTELLIGENT & ADAPTIVE PALACE (Tablet Ordinances)
========================================================================== */
@media (min-width: 600px) and (max-width: 1024px) {
  .view {
    position: relative; display: flex; flex-direction: column; height: auto;
    min-height: 100vh; padding: 8vh 0; box-sizing: border-box;
  }
  #home-view { justify-content: flex-start; gap: 8vh; padding-bottom: 25vh; }
  #home-view .book-group, #home-view .main-title-img {
    position: relative !important; top: auto !important; left: auto !important;
    transform: none !important; margin: 0;
  }
  #home-view .main-title-img { width: 70vw; max-width: 450px; order: -1; }
  #home-view .book-group { width: 65vw; max-width: 350px; }
  #home-view .promo-text-saga, #home-view .promo-text-coming { display: none; }
  .arca-of-itharion-book-page-container, .arca-book-page-container, .ascendemos-book-page-container, .el-auroral-weaver-book-page-container {
    flex-direction: column; align-items: center; text-align: center;
    padding: 20px; width: 85vw; height: auto; max-height: 95vh;
    margin: 0 auto; gap: 20px;
  }
  .arca-of-itharion-cover-container, .arca-cover-container, .ascendemos-cover-container, .el-auroral-weaver-cover-container {
    width: 60vw; max-width: 300px; max-height: 400px;
    margin-bottom: 20px;
  }
  .arca-of-itharion-gallery-grid, .arca-gallery-grid, .ascendemos-gallery-grid, .el-auroral-weaver-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  
  #arca-of-itharion-view .arca-of-itharion-button-container, 
  #arca-book-view .weaver-button-container, 
  #ascendemos-book-view .ascendemos-button-container,
  #el-auroral-weaver-view .weaver-button-container {
    align-items: center;
  }
}
@media (min-width: 600px) and (max-width: 1024px) and (orientation: landscape) {
  .arca-of-itharion-book-page-container, .arca-book-page-container, .ascendemos-book-page-container, .el-auroral-weaver-book-page-container {
    flex-direction: row; justify-content: center; align-items: center;
    text-align: left; gap: 40px; padding: 40px; width: 90vw; max-height: 90vh;
  }
  .arca-of-itharion-cover-container, .arca-cover-container, .ascendemos-cover-container, .el-auroral-weaver-cover-container {
    flex: 0 0 35%; width: auto; max-width: 280px; margin-bottom: 0;
  }
  .arca-of-itharion-book-details, .arca-book-details, .ascendemos-book-details, .el-auroral-weaver-book-details { flex: 1; }
}


/* ==========================================================================
   CHAPTER 7: THE SHIP'S COMMAND CONSOLE (Footer)
========================================================================== */
.footer-controls {
    position: fixed; bottom: 0; left: 0; width: 100%; padding: 15px 0;
    z-index: 1000; display: flex; flex-direction: column;
    align-items: center; justify-content: center; pointer-events: none;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
.footer-controls > * { pointer-events: auto; }
.footer-button-container {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
    justify-content: center;
}
.join-journey-button, .music-controls button {
    padding: 0.1rem 0; background-color: rgba(0,0,0,0.7);
    color: #fff; border-radius: 0.4rem; font-family: 'Cinzel', serif;
    font-size: 1rem; border: 1px solid #fff; cursor: pointer;
    box-shadow: 0 0 15px rgba(173, 216, 230, 0.7); text-decoration: none;
    display: inline-block; transition: background-color 0.3s ease, box-shadow 0.3s ease;
    width: 180px;
    text-align: center;
}
.join-journey-button:hover, .music-controls button:hover {
    background-color: #333; box-shadow: 0 0 25px rgba(173, 216, 230, 1);
}
#sovereignty-tagline {
    color: #aaa; font-family: 'Cinzel', serif;
    font-size: 1rem; margin: 0; width: 100%; text-align: center;
}
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ==========================================================================
   CHAPTER 8: THE GRAND STAGE (Desktop-Only Ordinance)
========================================================================== */
@media (min-width: 1025px) { .site-stage { overflow-y: hidden; } }

/* ==========================================================================
   CHAPTER 11: THE UNIFIED LAW FOR THE SECURE CHECKOUT TOOLTIP
========================================================================== */

.buy-link {
    position: relative;
    display: inline-flex !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.buy-link::after {
    content: "SECURE CHECKOUT VIA STRIPE" !important;
    position: absolute !important;
    top: 110% !important;            
    left: 50% !important;
    transform: translateX(-50%) !important;
    
    /* UNIFIED STYLE */
    background: rgba(0, 0, 0, 0.95) !important;
    color: #ffffff !important;
    padding: 8px 14px !important;
    border: 2px solid #4a90e2 !important; /* THE BLUE BORDER */
    border-radius: 4px !important;
    
    /* UNIFIED FONT */
    font-family: 'Cinzel', serif !important;
    font-size: 10px !important;
    white-space: nowrap !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

.buy-link:hover::after {
    opacity: 1 !important;
}

/* ==========================================================================
   CHAPTER 13: PRECISE POSITIONING FOR THE AURORAL WEAVER (ENGLISH)
========================================================================== */

/* Final nudge for the English "Whisper" button */
#arca-hear-weaver-btn {
  position: relative;
  top: 8px;
  left: 0px;
}
#the-auroral-weaver-view .buy-tooltip-wrapper {
  position: relative;
  top: 0px;
  left: -6px;
}
#the-auroral-weaver-view .home-icon-button {
  position: relative;
  top: 0px;
  left: -11px;
}
/* ==========================================================================
   CHAPTER 14: PRECISE POSITIONING FOR EL AURORAL WEAVER (SPANISH)
========================================================================== */

/* --- Nudge for the NEW SPANISH "BUY NOW" button --- */
#el-auroral-weaver-view .home-buy-button {
  position: relative;
  left: -9px; /* CHANGE THIS NUMBER */
}

/* --- Nudge for the "UN SUSURRO DE ITHARION" button --- */
#el-auroral-weaver-hear-weaver-btn {
  position: relative;
  top: 13px;
  left: 0px;
}

/* --- Nudge for the SPANISH "BUY NOW" button --- */
#el-auroral-weaver-view .buy-tooltip-wrapper {
  position: relative;
  top: 0px;
  left: -9px;
}

/* --- Nudge for the SPANISH "HOME" icon button --- */
#el-auroral-weaver-view .home-icon-button {
  position: relative;
  top: -45px;
  left: -80px;
  }

/* ==========================================================================
   CHAPTER 15: THE AUTHOR'S SANCTUARY (Author Page Ordinances)
========================================================================== */

/* This makes the Author Photo responsive and large */
.author-photo {
    width: 100%; max-width: 800px; height: auto;
    display: block; margin: 1.5rem auto;
    border-radius: 8px; border: 2px solid #9fc5ff;
    box-shadow: 0 0 25px rgba(159, 197, 255, 0.4);
}

/* 1. RESTORE THE ARCH (Stop the squashing) */
#home-view {
    display: flex !important;
    flex-wrap: nowrap !important; /* Forces the 5 books to stay in a line */
    justify-content: center !important;
    align-items: center !important;
    height: 100% !important;
    padding-top: 2vh !important;
    overflow: visible !important;
}

/* 2. REMOVE THE INVISIBLE WALL BLOCKING THE LAST BOOK */
.email-contact-container {
    position: absolute !important;
    bottom: 110px; /* Positions icon above the footer buttons */
    left: 50%;
    transform: translateX(-50%);
    width: 60px !important;
    height: 0px !important;
    z-index: 50;
    pointer-events: none; /* Makes the wide "box" invisible to clicks */
    display: flex;
    justify-content: center;
    align-items: center;
}

.email-link {
    pointer-events: auto !important; /* ONLY the icon itself is clickable */
    display: block;
    z-index: 51;
}

.email-icon-img {
    width: 40px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 242, 255, 0.8));
    transition: transform 0.3s ease;
}

.email-icon-img:hover {
    transform: scale(1.1);
}

/* 3. FORCE BUY BUTTONS TO THE FRONT LAYER */
.home-buy-button {
    position: relative !important;
    z-index: 9999 !important; /* Puts buttons above EVERYTHING else */
    pointer-events: auto !important;
}

.buy-link, .buy-link img {
    cursor: pointer !important;
    display: inline-block;
}

/* 4. CONTACT POPUP (STRIKE THE INVISIBLE OVERLAY) */
.contact-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 15, 0.85);
    display: none; /* Controlled by your JavaScript */
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    pointer-events: none; /* Prevents blocking clicks when invisible */
}

/* This activates the mouse only when the popup is actually open */
.contact-overlay[style*="display: flex"], 
.contact-overlay.active {
    pointer-events: auto !important;
}

.contact-popup {
    background: #000510;
    padding: 35px; border-radius: 15px;
    width: 90%; max-width: 450px;
    border: 1px solid rgba(0, 242, 255, 0.5);
    position: relative;
}

.popup-title {
    color: #00f2ff; font-family: 'Cinzel', serif;
    margin-bottom: 25px; letter-spacing: 3px;
}

.contact-popup input, .contact-popup textarea {
    width: 100%; padding: 12px; margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(0, 242, 255, 0.2);
    color: white; border-radius: 5px; box-sizing: border-box;
}

.send-btn {
    width: 100%; padding: 15px; background: transparent;
    border: 1px solid #00f2ff; color: #00f2ff;
    cursor: pointer; font-family: 'Cinzel', serif;
}

.close-contact-btn {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: #00f2ff;
    font-size: 30px; cursor: pointer;
}

/* 5. SUCCESS NOTIFICATION */
.quantum-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000510;
    color: #00f2ff;
    padding: 15px 30px;
    border: 1px solid #00f2ff;
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    z-index: 10001; 
    display: none; /* Hidden by default */
}

/* This is the magic that makes it vanish */
.toast-active {
    display: block !important;
    animation: quantumFade 3s ease-in-out forwards;
}

@keyframes quantumFade {
    0% { opacity: 0; bottom: 10px; }
    15% { opacity: 1; bottom: 30px; }
    85% { opacity: 1; bottom: 30px; }
    100% { opacity: 0; bottom: 10px; }
}