/* Apply the color palette and general layout design */

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: #FFFBDA;
    text-align: center;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.scrolling-header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #FFBB70;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-bottom: 1px solid #FFBB70;
    overflow: hidden;
  }
  
  .scrolling-header .messages {
    display: flex;
    animation: scroll-horizontal 50s linear infinite;
  }
  
  .scrolling-header .messages span {
    font-size: 14px;
    font-weight: bold;
    color: #fdfdfd;
    padding: 0 20px;
    white-space: nowrap;
  }
  
  @keyframes scroll-horizontal {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
  }

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 90%;
    max-width: 600px;
    margin: auto;
    padding: 20px;
}

h1 {
    color: #ED9455;
}

.bitsy-story {
    font-size: 1.2em;
    font-weight: bold;
    color: #ED9455;
    background-color: #FFFBDA;
    padding: 10px;
    border-left: 5px solid #FFBB70;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.bitsy-display {
    width: 90%;
    max-width: 300px;
    height: auto;
    aspect-ratio: 1 / 1;
    background-color: #FFEC9E;
    border: 4px solid #FFBB70;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

button {
    background-color: #FFBB70;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    touch-action: manipulation;
}

button:hover {
    background-color: #ED9455;
}

.bitsy {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bitsy img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
}

.bitsy-bg {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bitsy-body {
    width: 50%;
    top: 10%;
    left: 49%;
    transform: translateX(-50%);
    z-index: 2;
}

.bitsy-head {
    width: 50%;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.bitsy-handL {
    width: 40%;
    top: 20%;
    left: 30%;
    z-index: 4;
}

.bitsy-handR {
    width: 40%;
    top: 20%;
    right: 35%;
    z-index: 5;
}

.bitsy-foot {
    width: 50%;
    top: 10%;
    left: 49%;
    transform: translateX(-50%);
    z-index: 6;
}

.bitsy-name {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: bold;
    color: #ED9455;
    background: rgba(255, 251, 218, 0.8); /* Light background for readability */
    padding: 5px 10px;
    border-radius: 5px;
     z-index: 7;
}

footer {
    background-color: #FFBB70;
    color: white;
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    font-size: 14px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    .bitsy-display {
        max-width: 250px;
    }

    button {
        width: 100%;
        padding: 12px;
    }
}
