@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Chewy&display=swap');

/* =====================================================
   ROOT VARIABLES (THEME)
   ===================================================== */
:root {
  --honey-gold: #f4c430;
  --honey-dark: #c48f2f;
  --cream: #fff8d6;
  --wood: #5a4634;
  --brown: #4a3210;
  --berry: #c05757;
  --shadow: rgba(0, 0, 0, 0.2);
}

/* =====================================================
   GLOBAL RESET & BASE
   ===================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: var(--honey-gold);
  color: var(--wood);
  text-align: center;
}

.page {
  min-height: 100vh;
}

/* =====================================================
   LOGIN OVERLAY
   ===================================================== */
.login-screen {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 214, 0.97);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.login-card {
  background: #fff;
  padding: 40px 35px;
  border-radius: 28px;
  border: 8px solid var(--honey-gold);
  width: 320px;
  box-shadow: 0 10px 25px var(--shadow);
  position: relative;
}

.login-pot-icon {
  width: 90px;
  margin-bottom: 10px;
}

.login-card h2 {
  font-family: "Chewy", cursive;
  margin: 10px 0;
}

.garden-input {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 12px;
  border: 2px solid var(--honey-dark);
  text-align: center;
  margin-bottom: 15px;
}

/* =====================================================
   HEADER
   ===================================================== */
header {
  width: 100%;
}

.header-wrapper {
  position: relative;
  height: 260px;
}

.header-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cute-title {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--cream);
  padding: 10px 22px;
  border-radius: 16px;
  font-family: "Chewy", cursive;
  font-size: 2.2rem;
  box-shadow: 0 4px 8px var(--shadow);
}

/* =====================================================
   NAVIGATION (ORIGINAL STRUCTURE)
   ===================================================== */
.navbar {
  background: var(--berry);
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.nav-honey {
  width: 40px;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
}

.nav-list li {
  display: inline;
}

.nav-list a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
}

.nav-list a:hover,
.nav-list a.active {
  background: rgba(255, 255, 255, 0.25);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
main {
  padding: 30px 15px 60px;
}

.section-title {
  font-family: "Chewy", cursive;
  font-size: 2rem;
  margin-bottom: 25px;
}

/* =====================================================
   WHEEL AREA
   ===================================================== */
#wheel-container {
  position: relative;
  display: inline-block;
}

#wheelCanvas {
  display: block;
  margin: auto;
  border-radius: 50%;
  background: #ffeb75;
  border: 8px solid var(--honey-dark);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   CONTROLS
   ===================================================== */
.wheel-controls {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* =====================================================
   BUTTONS (SINGLE SOURCE OF TRUTH)
   ===================================================== */
.honey-pot-btn {
  background: var(--honey-gold);
  border: 2px solid var(--honey-dark);
  padding: 10px 24px;
  font-family: "Chewy", cursive;
  font-size: 1.1rem;
  border-radius: 22px;
  cursor: pointer;
  color: var(--brown);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 8px var(--shadow);
}

.honey-pot-btn:hover {
  transform: scale(1.06);
}

.honey-pot-btn:active {
  transform: scale(0.97);
}

/* =====================================================
   POPUP OVERLAY
   ===================================================== */
.popup-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 500;
}

.center-card {
  background: var(--cream);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 8px solid var(--honey-gold);
  padding: 30px;
  box-shadow: 0 10px 25px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.popup-title {
  font-family: "Chewy", cursive;
  font-size: 1.8rem;
  margin: 0;
}

.winner-sub {
  margin: 10px 0;
}

.winner-display-box {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  width: 100%;
  font-size: 1rem;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15);
}

.popup-buttons {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
.winner-animation {
  animation: popIn 0.35s ease-out;
}

@keyframes popIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =====================================================
   UTILITIES
   ===================================================== */
.hidden {
  display: none !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .cute-title {
    font-size: 1.7rem;
  }

  .center-card {
    width: 280px;
    height: 280px;
  }
}


/* Positioning */
.left-honey {
    margin-right: 12px;
}

.right-honey {
    margin-left: 12px;
}

/* --- INPUTS --- */
.form-input, .search-bar {
    padding: 12px; border-radius: 10px; border: 2px solid #C48F2F;
    background: #FFF; width: 80%; max-width: 400px;
    margin-bottom: 15px;
}



/* --- BOOKSHELF & GRID --- */

/* The Yellow Popup Container */
.full-book-inner.yellow-popup {
    background-color: #f4c542; /* Bright Honey Yellow */
    border: 3px solid #333;
    border-radius: 20px;
    padding: 30px;
    width: 500px; /* Bigger size */
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #000;
}

/* Flex layout for Text and Image */
.popup-top-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    text-align: left;
}

.popup-text h2 {
    font-size: 1rem;
    margin: 0 0 10px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
}

.full-book-cover {
    width: 100px;
    height: auto;
    border-radius: 8px;
    border: 2px solid #333;

    display: block;
    margin: 0 auto; /* centers it */
}


/* Flex row for side-by-side buttons */
.button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    width: 100%;
    margin-top: 10px;
}

.button-row button {
    flex: 1;
    padding: 8px 12px;   /* smaller height & width */
    font-size: 0.9rem;   /* slightly smaller text */
    border-radius: 18px; /* less round */
    font-weight: bold;
    cursor: pointer;
    border: 2px solid #333;
}

#close-book {
    background-color: #fff; 
}

.dynamic-popup-btn.honey-pot-btn {
    background-color: #e6a817; /* Darker honey color */
}
#bookshelf-container {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px; padding: 20px; background: #3e2723;
    border-radius: 10px; min-height: 200px;
}

.book-spine {
    width: 40px; height: 180px; border-radius: 3px 8px 8px 3px;
    cursor: pointer; position: relative; display: flex;
    align-items: center; justify-content: center;
    transition: transform 0.2s; box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.book-spine:hover { transform: scale(1.05) translateX(5px); }
.spine-title {
    writing-mode: vertical-rl; text-orientation: mixed;
    color: white; font-weight: 600; font-size: 0.8rem;
    text-transform: uppercase; max-height: 160px; overflow: hidden;
}

.spine-honey-1 { background: #D4A017; }
.spine-honey-2 { background: #B8860B; }
.spine-honey-3 { background: #8B4513; }
.spine-honey-4 { background: #CD853F; }
.spine-honey-5 { background: #A0522D; }

/* =====================================================
   Tigger & Piglet Theme — Flipped Colors
   ===================================================== */

:root {
    --piglet-pink: #ffc0cb;       /* Soft Piglet Pink */
    --piglet-light: #ffe4e1;      /* Misty Rose */
    --tigger-orange: #ff9233;     /* Vibrant Tigger Orange */
    --tigger-stripe: #3d2b1f;     /* Dark Cocoa Stripe */
    --page-bg: #fffaf0;           /* Cream Background */
}

/* 1. Page Background Fix */
/* Removing the yellow dotted background to let the theme colors shine */
.page {
   background-color: var(--honey-gold);
    background-image: none !important; 
    font-family: 'Poppins', sans-serif;
}

/* 2. Available Books Grid (Tigger "Outside" View) */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    padding: 20px;
}

/* Base Card Style - Now Tigger Orange */
.book-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--tigger-orange) !important; /* Tigger background */
    border: 3px solid var(--tigger-stripe);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 6px 6px 0px var(--tigger-stripe);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.book-card img {
    width: 100%;
    height: 250px; 
    object-fit: cover;
    border-bottom: 3px solid var(--tigger-stripe);
}

.book-info {
    padding: 12px;
    text-align: center;
    color: white; /* White text for contrast on orange */
}

.book-info h3 {
    font-family: 'Chewy', cursive;
    font-size: 1.15rem;
    margin: 0;
}

/* 3. Currently Borrowed Section (Tigger Container) */
.checked-out-section {
    margin-top: 20px;
    padding: 30px;
    background-color: var(--tigger-orange) !important;
    border: 4px dashed var(--tigger-stripe);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
}

/* Empty Message - Forced to one line */
.empty-msg {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tigger-stripe);
    white-space: nowrap; /* Forces text into one single line */
    text-align: center;
    margin: 0;
}

/* 4. Borrowed Cards (Piglet "Inside" View) */
.borrowed-card {
    width: 90%;
    max-width: 900px;
    background: var(--piglet-pink) !important; /* Piglet background */
    color: var(--tigger-stripe);
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid var(--tigger-stripe);
    border-left: 15px solid var(--tigger-stripe); /* Tigger stripe accent */
    margin-bottom: 12px;
}

.borrowed-info em {
    color: var(--tigger-stripe);
    background: rgba(255, 255, 255, 0.4);
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: bold;
}

/* 5. Return Button */
.return-btn {
    background: var(--tigger-stripe);
    color: var(--piglet-pink);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.return-btn:hover {
    background: white;
    color: var(--tigger-stripe);
}
/* =====================================================
   6. Modal & Overlay (Piglet Theme)
   ===================================================== */

/* This darkened background covers the WHOLE screen */
/* Update your Modal and Overlay classes to this */
.full-book-view {
    position: fixed; /* Fixes it to the screen, not the document */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7); /* Darkens the background */
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center;     /* Centers vertically */
    z-index: 9999;           /* Ensures it stays on top of everything */
    overflow: hidden;        /* Prevents the background from scrolling */
}
/* Centered Full Screen Overlay */
/* Unified Modal Overlay */
.modal, .edit-modal, .addMemoryModal, #instaModal, #addMemoryModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dim background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

/* Modal Content Card */
.modal-content, .insta-card, .scrapbook-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    max-height: 90vh; /* Prevents card from going off-screen */
    overflow-y: auto; /* Scroll if content is too long */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Ensure images inside the viewer fit */
#displayImage {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    background: #f9f9f9;
}

/* Hidden state */
.hidden {
    display: none !important;
}
/* The Edit Box Design */
.edit-box {
    background-color: #fdf6e3; /* Soft cream color from Pooh background */
    background-image: url('image_7166e7.jpg'); /* Optional: very light watermark effect */
    background-blend-mode: overlay;
    border: 4px solid #d4a373; /* Earthy wood tone */
    border-radius: 25px;
    padding: 30px;
    width: 550px;
    max-width: 90%;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    text-align: center;
}

.edit-box h2 {
    font-family: 'Poppins', sans-serif;
    color: #8c6a4a;
    margin-bottom: 20px;
}

/* Styled Input Fields */
.form-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #e9edc9;
    border-radius: 12px;
    font-size: 1rem;
    box-sizing: border-box; /* Prevents overflow */
    background: white;
}

.form-input:focus {
    border-color: #d4a373;
    outline: none;
}

/* Actions Layout */
.edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Button Styling */
.edit-actions button {
    padding: 12px 20px;
    border-radius: 25px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.edit-actions button:hover {
    transform: scale(1.05);
}

.btn-add { background-color: #ccd5ae; color: #333; } /* Mossy green */
.btn-delete { background-color: #e9c46a; color: #333; } /* Honey yellow */
.close-btn { background-color: #faedcd; color: #333; border: 1px solid #d4a373 !important; }
/* Ensure the content boxes don't have weird margins */
.modal-content, .popup-card, .edit-box, .full-book-inner {
    margin: 0 auto;
    position: relative;
    max-height: 90vh; /* Prevents pop-up from being taller than screen */
    overflow-y: auto; /* Allows scrolling inside pop-up if content is long */
}

/* The actual Pop-up Card */
.checkout-modal-content {
    background: var(--piglet-light);
    border: 6px solid var(--tigger-orange);
    border-radius: 25px;
    padding: 30px;
    position: relative;
    width: 90%;
    max-width: 500px; /* Keeps it readable */
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: bounceIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Tigger-style Bounce Animation */
@keyframes bounceIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Close Button for the Modal */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: var(--tigger-stripe);
    cursor: pointer;
    font-family: 'Chewy', cursive;
}

/* Helper to hide things */
.hidden {
    display: none !important;
}
/* --- RABBIT'S GARDEN --- */
.rabbit-theme {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px; padding: 25px; background: rgba(144, 190, 109, 0.1);
    border-radius: 20px; border: 3px dashed #6a994e;
}

.star.filled { color: #f3722c; text-shadow: 1px 1px 0px #bc6c25; }

.garden-sign-btn {
    background: #bc6c25; color: #ffffff; padding: 10px 20px;
    font-family: 'Chewy', cursive; border: 2px solid #8b4513;
    border-radius: 4px; cursor: pointer; position: relative;
    box-shadow: 0 4px 0 #5e3023; transition: 0.2s ease;
}

/* =====================================================
   Eeyore Tracker Theme (Dusty Blue & Mauve)
   ===================================================== */
   /* Background and Weekdays */
.eeyore-bg {
       background-color: var(--honey-gold);
}

.eeyore-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #4a4e69; /* Mauve */
    padding-bottom: 10px;
    font-family: 'Chewy', cursive;
}

/* Calendar Grid */
.eeyore-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* Ensures 7 columns for weekdays */
    gap: 10px; /* Space between the squares */
    background: #a2b9bc; /* Dusty Blue */
    border: 4px solid #6b7a8f; /* Slate Grey */
    border-radius: 15px;
    padding: 15px;
    box-shadow: 8px 8px 0px #d6a5c0; /* Mauve Shadow */
}

/* Individual Day Cells - Forced to Squares */
.calendar-day {
    background: #ffffff;
    border-radius: 8px;
    aspect-ratio: 1 / 1; /* This makes the cell a perfect square */
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden; /* Keeps images/content inside the square */
    padding: 5px;
}

.calendar-day:hover {
    background: #f0f4f5;
    transform: scale(1.02); /* Slight pop effect */
}

.calendar-day.has-entry {
    background: #eef2f3;
    border: 2px solid #d6a5c0; /* Mauve border for days with books */
}

/* Images inside the squares */
.calendar-entry-img {
    width: 85%;
    height: 70%; /* Leaves room for the date number */
    object-fit: cover; /* Prevents image distortion inside the square */
    margin: 2px auto;
    border-radius: 5px;
    display: block;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

/* Modal and Utility Styling */
.eeyore-modal {
    background-color: #f8f9fa;
    border: 5px solid #a2b9bc;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.eeyore-hr {
    border: 0;
    height: 2px;
    background: #d6a5c0;
    margin: 15px 0;
}

.btn-delete {
    background-color: #6b7a8f !important;
    color: white;
}
/* =====================================================
   BOOK ADVENTURE – SCRAPBOOK
   ===================================================== */
/* =====================================================
   100 ACRE WOOD COLOR PALETTE
   ===================================================== */
:root {
  --pooh-honey: #f7c948;
  --pooh-cream: #fff6dc;
  --pooh-paper: #f4ecd8;
  --pooh-wood: #6b4e2e;
  --pooh-forest: #7a8f63;
  --pooh-shadow: rgba(80, 60, 40, 0.35);
}
/* =========================================
   EMPTY SCRAPBOOK – FULL PAGE FEEL
   ========================================= */
.scrapbook-container {
  min-height: 60vh;            /* makes the area tall */
  display: flex;
  align-items: center;         /* vertical centering */
  justify-content: center;     /* horizontal centering */
  background: linear-gradient(
    to bottom,
    var(--pooh-cream),
    var(--pooh-paper)
  );
  border-radius: 40px;
  padding: 40px;
}

/* Empty message styling */
.empty-state {
  font-family: "Chewy", cursive;
  font-size: 1.8rem;
  color: var(--pooh-wood);
  text-align: center;
  line-height: 1.4;
  max-width: 320px;
  opacity: 0.85;
}


/* =====================================================
   POLAROIDS (100 ACRE WOOD STYLE)
   ===================================================== */
.polaroid {
  background: var(--pooh-paper);
  border: 3px solid var(--pooh-wood);
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 10px 18px var(--pooh-shadow);
  transform: rotate(-2deg);
  cursor: grab;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.05);
}

.polaroid.dragging {
  opacity: 0.6;
  transform: scale(1.1) rotate(0deg);
  box-shadow: 0 20px 30px var(--pooh-shadow);
  cursor: grabbing;
}

.polaroid img {
  width: 100%;
  border-radius: 4px;
  border: 2px solid #fff;
  background: #eee;
}

.pol-location {
  font-family: "Chewy", cursive;
  color: var(--pooh-wood);
  margin-top: 6px;
}

/* Tape */
.polaroid .tape {
  width: 60px;
  height: 18px;
  background: rgba(255, 255, 255, 0.6);
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  border-radius: 4px;
}

/* =====================================================
   MODALS – EDIT AREA (STORYBOOK FEEL)
   ===================================================== */
.modal-content.scrapbook-form,
.polaroid-viewer {
  background: var(--pooh-paper);
  border: 4px solid var(--pooh-wood);
  border-radius: 22px;
  box-shadow: 0 15px 30px var(--pooh-shadow);
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  background: var(--pooh-cream);
  border: 2px solid var(--pooh-forest);
  border-radius: 12px;
  padding: 8px;
  font-family: "Poppins", sans-serif;
}

.scrapbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
}

/* Stickers */
.sticker-honey::after {
  content: "🍯";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
}

.sticker-bee::after {
  content: "🐝";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
}

.sticker-flower::after {
  content: "🌸";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
}

.sticker-balloon::after {
  content: "🎈";
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 2rem;
}

.delete-memory-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}
