/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', sans-serif;
  /* Deep Space/Minecraft Gradient */
  background: radial-gradient(circle at center, #2b32b2, #1488cc);
  background-size: cover;
  color: white;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Minimal Header */
header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}




/* ICONS: horizontal, left-aligned, separated */
.icon-group {
  display: flex;           /* horizontal row */
  flex-direction: row;     /* left to right */
  gap: 240px;               /* space between each icon */
  align-items: center;     /* vertically center icons */
}

.icon-btn {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.icon-btn:hover {
  background: white;
  color: #333;
  transform: scale(1.1) rotate(5deg);
}

.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  font-size: 0.8rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  border: 2px solid #fff;
}

/* 3D Stage */
.hero-stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 2000px;
  padding: 40px 8px; /* Added padding to ensure space */
}

.column-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px; /* Space between book and button */
}

/* The Book Container */
.book-wrapper {
  position: relative;
  width: 400px;
  height: 500px;
  /* Initial State: slightly tilted closed, floating */
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Book State: CLOSED (Default) */
.book-wrapper.closed {
  transform: rotateX(10deg) rotateY(-15deg) rotateZ(-5deg);
  animation: floatClosed 6s ease-in-out infinite;
}

/* Book State: OPEN (Reads like a book) */
.book-wrapper.open {
  /* Stable Open State - Removed TranslateX to prevent layout jumping/overflow */
  transform: rotateX(0deg) rotateY(0deg);
  width: 400px;
}

/* Hide Hint when Open */
.book-wrapper.open .click-hint {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}

@keyframes floatClosed {
  0%, 100% { transform: rotateX(10deg) rotateY(-15deg) rotateZ(-5deg) translateY(0); }
  50% { transform: rotateX(10deg) rotateY(-15deg) rotateZ(-5deg) translateY(-20px); }
}

/* The Pages Container */
.book {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}

/* Individual Paper Sheets */
.paper {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  box-shadow: inset 10px 0 20px rgba(0, 0, 0, 0.1); /* Spine shadow */
  cursor: pointer;
}

/* Z-Index Stacking (Closed State) */
#p0 { z-index: 10; } /* Cover */
#p1 { z-index: 9; }
#p2 { z-index: 8; }
#p3 { z-index: 7; }
#p4 { z-index: 6; }

/* Page Visuals */
.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 5px 15px 15px 5px;
  overflow: hidden;
}

.front { background: #fff; z-index: 2; }
.back { background: #eef; transform: rotateY(180deg); z-index: 1; }

/* When Flipped */
.paper.flipped { transform: rotateY(-180deg); }

/* Specific Page Styling */
.cover .front {
  background: url('assets/minecraft_book_cover.png') center/cover;
  border: 5px solid #2d3436; /* Glossy effect */
  position: relative;
}

.cover .front::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
}

.inside-cover {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f5f6fa;
  color: #2d3436;
  text-align: center;
  padding: 20px;
}

.page-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-image: url('https://www.transparenttextures.com/patterns/paper.png');
}

.page-content img {
  max-width: 95%;
  max-height: 90%;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* Interactive Hint */
.click-hint {
  position: absolute;
  bottom: 20px;
  background: rgba(0,0,0,0.6);
  padding: 10px 20px;
  border-radius: 20px;
  animation: fadeInOut 2s infinite;
  pointer-events: none;
  font-size: 0.9rem;
  z-index: 20;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; transform: translateY(-5px); }
}

/* Paywall Styling */
.locked-page {
  background: linear-gradient(135deg, #2d3436, #000);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.lock-icon {
  font-size: 4rem;
  color: #f1c40f;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 20px rgba(241,196,15,0.5));
}

.btn-unlock {
  margin-top: 30px;
  padding: 15px 40px;
  background: linear-gradient(45deg, #00b894, #00cec9);
  border: none;
  border-radius: 30px;
  color: white;
  font-weight: 900;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,184,148,0.4);
  transition: transform 0.2s;
  animation: pulseBtn 1.5s infinite;
}

.btn-unlock:hover { transform: scale(1.1); }

@keyframes pulseBtn {
  0% { box-shadow: 0 0 0 0 rgba(0,184,148,0.7); }
  70% { box-shadow: 0 0 0 15px rgba(0,184,148,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,184,148,0); }
}

/* Bottom Actions */
.bottom-actions { z-index: 100; margin-top: 10px; }

.floating-buy-btn {
  padding: 15px 50px;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #FF9800, #F57C00);
  color: white;
  font-family: 'Outfit';
  font-weight: 900;
  font-size: 1.3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: 0.3s;
  animation: pulseBtn 3s infinite;
}

.floating-buy-btn:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Content Below */
.video-section {
  padding: 80px 20px;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  text-align: center;
}

.video-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.vid {
  width: 320px;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.2);
  transition: transform 0.3s;
}

.vid:hover { transform: scale(1.05); }

/* Footer */
footer {
  padding: 40px;
  text-align: center;
  font-size: 0.8rem;
  color: #aaa;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.modal-overlay.active { display: flex; animation: bgFade 0.3s; }

.shop-modal {
  background: white;
  color: #333;
  padding: 40px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: slideUp 0.4s;
}

@keyframes slideUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Mobile */
@media (max-width: 1024px) {
  .book-wrapper { transform: scale(0.6); }
  .book-wrapper.open { transform: translateX(0) scale(0.6); }
  .column-wrapper { gap: 20px; }
  .floating-buy-btn { padding: 12px 30px; font-size: 1rem; }
}
.video-container {
    display: flex;
    gap: 20px; /* space between thumbnails */
}

.vid {
    display: block;
    width: 300px;   /* set your desired width */
    height: 170px;  /* set your desired height */
    overflow: hidden;
    border-radius: 10px; /* rounded corners like your screenshot */
}

.vid img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* makes the thumbnail fill the box perfectly */
    display: block;
}
