body {
      margin: 0;
      height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      background: linear-gradient(135deg, #4169E1, #4169E1, #4169E1 );
      font-family: "Segoe UI", sans-serif;
      overflow: hidden;
     
    }

    h1 {
      color: #fff;
      margin-bottom: 50px;
      font-size: 40px;
      letter-spacing: 1px;
      text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }

    .book {
      width: 800px;
      height: 600px;
      perspective: 2000px;
      position: relative;
      animation: float 6s ease-in-out infinite;
        margin-top: 15px;
    }


    
    @keyframes float {
      0%   { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
      25%  { transform: translateY(-15px) rotateX(3deg) rotateY(-3deg); }
      50%  { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
      75%  { transform: translateY(15px) rotateX(-3deg) rotateY(3deg); }
      100% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
    }

    .page {
      width: 50%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 50%;
      transform-origin: left bottom;
      transform-style: preserve-3d;
      transition: transform 1.5s cubic-bezier(0.77, 0, 0.175, 1);
      cursor: pointer;
    }

    .page .front,
    .page .back {
      position: absolute;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
      overflow: hidden;
      box-sizing: border-box;
      padding: 40px;
      background:#F8ECD7;
      box-shadow: 0 0 25px rgba(0,0,0,0.25);
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 22px;
      font-weight: bold;
      border-radius: 8px;
    }

    .page .front img,
    .page .back img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 8px;
    }

    .page .back {
      transform: rotateY(180deg);
      background:#F8ECD7;
    }

    .page.flipped {
      transform: rotateY(-180deg) rotateZ(-3deg); 
      
    }

  
    .page:nth-child(1) { z-index: 6; }
    .page:nth-child(2) { z-index: 5; }
    .page:nth-child(3) { z-index: 4; }
    .page:nth-child(4) { z-index: 3; }
    .page:nth-child(5) { z-index: 2; }
    .page:nth-child(6) { z-index: 1; }

    .controls {
      margin-top: 20px;
    }

    .btn {
      background: #fff;
      color: #203a43;
      border: none;
      padding: 12px 22px;
      margin: 0 10px;
      font-size: 16px;
      font-weight: bold;
      cursor: pointer;
      border-radius: 8px;
      box-shadow: 0 5px 18px rgba(0,0,0,0.3);
      transition: 0.3s;
    }

    .btn:hover {
      background: #203a43;
      color: #fff;
    }
    @media (max-width: 767px) {   
     h1 {
      color: #fff;
      margin-bottom: 50px;
      font-size: 40px;
      letter-spacing: 1px;
      text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    }

    .book {
      width: 900px;
      height: 700px;
      perspective: 2000px;
      position: relative;
      animation: float 6s ease-in-out infinite;
        margin-top: 15px;
    }

} 
    @media (max-width: 768px) {
      .book {
        width: 100%;
        height: 420px;
      }
      .page .front, .page .back {
        font-size: 18px;
        padding: 20px;
      }
    }
 
