/* =========================================================
   GLOBAL RESET
========================================================= */
* {
    margin: 0;
    padding: 0;
    text-decoration: none;
}
img {
    border-style: none;
}

/* =========================================================
   PAGE BACKGROUND
========================================================= */
body {
    background: #111;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    color: #fff;
}

#alltherest {
    background-image: linear-gradient(0deg, #ffffff, #660000);
    min-height: 100%;
}

/* =========================================================
   TOP SECTION
========================================================= */
.top-section {
    width: 1000px;
    height: 200px;
    margin: auto;
    background-color: black;
    border-radius: 20px;
    padding: 10px;
    position: relative;
    top: 5px;
}

#praguepic {
    width: 600px;
    height: 200px;
    margin: auto;
    position: relative;
}

.banner {
    position: absolute;
    width: 600px;
    height: 140px;
    top: 90px;
    text-align: center;
    color: #2C4969;
    font-family: "Century Gothic", Verdana, sans-serif;
    font-size: 96px;
    font-weight: bold;
    line-height: 140px;
}

/* =========================================================
   MENU
========================================================= */
#menu {
    width: 100%;
    height: 50px;
    margin-top: 5px;
    background-image: linear-gradient(yellow 10%, green 12%, green 88%, yellow 90%);
}

#menubox {
    width: 1100px;
    height: 30px;
    padding: 3px 0;
    margin: auto;
    text-align: center;
    font-family: "Century Gothic", Verdana, sans-serif;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.amenu {
    width: 220px;
    height: 30px;
    float: left;
    padding-top: 5px;
}

#breaker {
    width: 100%;
    height: 10px;
    background-image: linear-gradient(red, yellow, red);
}

/* =========================================================
   CAROUSEL WRAPPER
========================================================= */
.carousel-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image: linear-gradient(
        to right,
        rgba(0,0,0,1) 25%,
        rgba(0,0,0,0) 40%,
        rgba(0,0,0,0) 60%,
        rgba(0,0,0,1) 75%
    );
}

.section {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* =========================================================
   CAROUSEL CONTAINER
========================================================= */
.carousel-container {
    position: relative;
    width: 900px;
    height: 550px;
}

.scene {
    width: 100%;
    height: 550px;
    perspective: 1400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-frame {
    width: 1000px;
    height: 500px;
    border: 3px solid #888;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* =========================================================
   ROTATING CAROUSEL
========================================================= */
.carousel {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

/* IMAGE PANELS */
.panel {
    position: absolute;
    width: 250px;
    height: 400px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #444;
    border-radius: 10px;
    cursor: pointer;
}

.panel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    pointer-events: none;
}

/* BLACK SPACER PANELS */
.spacer-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    background: #000;
    box-shadow: none;
    cursor: default;
}

/* BACK WALL — hides rear panels */
.carousel-backwall {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 900px;
    height: 900px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%) translateZ(-200px);
    z-index: -1;
}

/* =========================================================
   ARROWS
========================================================= */
.arrow-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: #222;
    border: 3px solid #888;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 50;
}

.arrow-btn:hover {
    background: #444;
}

.left-arrow { left: -60px; }
.right-arrow { right: -60px; }

/* =========================================================
   OVERLAY PANEL (EXPANDED PANEL)
========================================================= */
.overlay-panel {
    position: fixed;
    border-radius: 20px;
    display: block;
    font-size: 26px;
    z-index: 500;
    box-shadow: 0 0 40px rgba(0,0,0,0.7);
    opacity: 0;
    transform-origin: center center;
    transition: all 0.6s;
    cursor: pointer;
    background-image: radial-gradient(circle, #640000, #0C0000);
    min-height: 100%;
    background-size: cover;
}

/* CLOSE BUTTON */
.overlay-close-btn {
    position: absolute;
    bottom: 10px;
    right: 16px;
    background: #cc0000;
    color: #fff;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    z-index: 10;
}

.overlay-close-btn:hover {
    background: #ff0000;
}

/* RED STRIPE */
#line1 {
    position: relative;
    top: 50px;
    width: 100%;
    height: 5px;
    background-image: linear-gradient(
        to right,
        rgba(255,0,0,0),
        rgba(255,0,0,1) 33%,
        rgba(255,0,0,1) 66%,
        rgba(255,0,0,0)
    );
    margin: auto;
}

/* =========================================================
   OVERLAY BOXES
========================================================= */
.overlay-box {
    position: absolute;
    background: white;
    border-radius: 12px;
    transition: all 0.45s ease;
    transform-origin: center center;
}

/* LEFT BOX */
.box-left {
    width: 435px;
    height: 650px;
    background-image: url(images/bookopener2.png);
    background-size: cover;
    left: 25%;
    top: 10%;
    transform: translateX(-50%);
    cursor: grab;
}

/* RIGHT BOX */
.box-right {
    left: 75%;
    top: 10%;
    transform: translateX(-50%);
    background: black;
    padding: 5px;
    font-size: 18px;
    height: 600px;
    width: 400px;
    overflow-y: auto;
}

/* BLURB CONTENT */
#blurb {
    background-color: transparent;
    color: white;
    padding: 15px;
    font-size: 18px;
    width: 100%;
    height: auto;
    text-align: left;
    font-family: 'Source Serif Pro', serif;
    box-sizing: border-box;
}

/* BOOK IMAGE */
#book {
    position: relative;
    top: 30px;
    left: 30px;
    height: 600px;
    width: 375px;
    background-size: cover;
    background-position: center;
    box-shadow: 7px 7px 5px rgba(0,0,0,1);
    transition: all 0.45s ease;
}

/* =========================================================
   BOOK READER
========================================================= */
#blackbox {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 750px;
    width: 1050px;
    background-color: orange;
    z-index: 20000;
    opacity: 1;
}

#whitebox {
    position: absolute;
    height: 700px;
    width: 940px;
    left: 25px;
    top: 25px;
    background-color: white;
    z-index: 20101;
    overflow-y: auto;
    padding-left: 30px;
    padding-right: 30px;
}

#butclose {
    position: relative;
    bottom: 0;
    left: 0;
    transform: none;
    margin: 20px auto;
    display: block;
}

/* =========================================================
   AMAZON BUTTON
========================================================= */
#gotoAmazon {
    position: relative;
    top: 10px;
    left: 67px;
    display: inline-block;
    overflow: hidden;
}

#gotoAmazon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.45s ease;
}

.box-right {
    opacity: 0;
    transition: opacity 0.45s ease;
}

.overlay-box.box-right.loaded {
    opacity: 1;
}

.spacer-panel {
    opacity: 1;
    border-radius: 10px;
    background: linear-gradient(to bottom, #000, #222);
}

.carousel {
    transform-style: preserve-3d;
}

.panel, .spacer-panel {
    position: absolute;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}