.bp-typewriter-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 40px 30px;
    background: #faf6f2; /* Warm ivory/cream background */
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(242, 159, 182, 0.12);
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
    border: 1px solid #f6ebec;
}

/* Floating decorations - Scattered and subtle */
.bp-typewriter-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.bp-float-item {
    position: absolute;
    font-size: 1.4rem;
    opacity: 0.65;
    user-select: none;
}

/* Distinct positioning & independent animations to prevent grouping */
.bp-float-1 {
    top: 12%;
    left: 6%;
    animation: bobSlow 7s ease-in-out infinite;
}
.bp-float-2 {
    top: 48%;
    left: 4%;
    animation: bobMedium 9s ease-in-out infinite;
}
.bp-float-3 {
    top: 20%;
    right: 8%;
    animation: bobSlight 6s ease-in-out infinite;
}
.bp-float-4 {
    top: 68%;
    right: 5%;
    animation: bobSlow 8s ease-in-out infinite;
}
.bp-float-5 {
    top: 82%;
    left: 14%;
    animation: bobMedium 10s ease-in-out infinite;
}
.bp-float-6 {
    top: 15%;
    left: 28%;
    animation: bobSlight 11s ease-in-out infinite;
}
.bp-float-7 {
    top: 78%;
    right: 22%;
    animation: bobSlow 9s ease-in-out infinite;
}

@keyframes bobSlow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(6deg); }
}

@keyframes bobMedium {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-8deg); }
}

@keyframes bobSlight {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(3deg); }
}

/* Elegant calligraphic Instruction styling */
.bp-typewriter-instruction {
    font-size: 1.45rem;
    font-family: 'Playfair Display', 'Georgia', 'Didot', serif;
    font-style: italic;
    font-weight: 600;
    color: #a38590; /* Soft muted mauve / dusty rose */
    margin-bottom: 35px;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

.bp-typewriter-instruction:hover {
    transform: scale(1.04);
}

/* Restyled Minimal Sound control */
.bp-typewriter-sound-control {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 10;
}

.bp-typewriter-sound-btn {
    background: #fff0f3; /* Blush pink */
    border: 1px solid #f6dbe2;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(242, 159, 182, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.bp-typewriter-sound-btn:hover {
    transform: scale(1.08);
    background: #ffe5ec;
    border-color: #f2cfd9;
    box-shadow: 0 6px 15px rgba(242, 159, 182, 0.2);
}

.bp-sound-icon {
    font-size: 1.05rem;
    line-height: 1;
}

/* Container */
.bp-typewriter-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    z-index: 2;
    cursor: pointer;
}

/* Paper and Carriage */
.bp-typewriter-carriage {
    position: relative;
    width: 85%;
    margin: 0 auto -10px auto;
    transition: transform 0.12s ease;
    z-index: 3;
}

.bp-typewriter-paper-roller {
    width: 100%;
    height: 14px;
    background: #4a4446;
    border-radius: 7px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.bp-typewriter-paper-sheet {
    width: 82%;
    margin: 0 auto;
    background: #ffffff;
    min-height: 155px;
    padding: 22px 18px;
    border-radius: 6px 6px 0 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
    box-sizing: border-box;
    transform: translateY(0);
    transition: transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15);
    border-bottom: 2px dashed #f5eae8;
}

.bp-typewriter-typed-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #4a3f43;
    text-align: left;
    min-height: 100px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.bp-typewriter-typed-text::after {
    content: '|';
    animation: blink 0.8s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Typewriter Body */
.bp-typewriter-body {
    position: relative;
    width: 100%;
    background-color: #f29fb6; /* Soft warm pink */
    padding: 25px 20px;
    border-radius: 18px 16px 24px 24px;
    box-shadow: 
        0 8px 0 #db7b95,
        0 18px 35px rgba(184, 114, 134, 0.25);
    box-sizing: border-box;
    z-index: 4;
}

.bp-typewriter-carriage-track {
    height: 6px;
    background: #a39496;
    margin: -15px auto 15px auto;
    width: 95%;
    border-radius: 3px;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.15);
}

.bp-typewriter-bar {
    height: 35px;
    background-color: #f089a4;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: inset 0 3px 6px rgba(0,0,0,0.1);
}

/* Keyboard */
.bp-typewriter-keyboard {
    background: #e58da3;
    padding: 15px;
    border-radius: 12px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.12);
}

.bp-typewriter-keyboard-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.bp-typewriter-keyboard-row:last-child {
    margin-bottom: 0;
}

.bp-typewriter-key {
    background: #ffffff;
    color: #cc6d85;
    font-weight: bold;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 0 #bf6279;
    cursor: pointer;
    user-select: none;
    transition: all 0.05s ease;
}

.bp-typewriter-key.is-typing,
.bp-typewriter-key:active {
    transform: translateY(3px);
    box-shadow: 0 0px 0 #bf6279;
    background: #fff3f6;
}

.bp-key-space {
    width: 100px;
    border-radius: 14px;
}

/* Reset Button */
.bp-typewriter-actions {
    margin-top: 35px;
}

.bp-typewriter-btn {
    background: transparent;
    border: 2px solid #e3a9c7;
    color: #e3a9c7;
    padding: 11px 32px;
    font-size: 0.95rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.bp-typewriter-btn:hover {
    background: #e3a9c7;
    color: #ffffff;
    box-shadow: 0 5px 18px rgba(227, 169, 199, 0.25);
}

/* Responsive adjustment */
@media (max-width: 600px) {
    .bp-typewriter-wrapper {
        padding: 25px 12px;
    }
    .bp-typewriter-instruction {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    .bp-typewriter-key {
        width: 23px;
        height: 23px;
        font-size: 0.72rem;
    }
    .bp-key-space {
        width: 65px;
    }
    .bp-typewriter-paper-sheet {
        min-height: 125px;
        padding: 16px 12px;
    }
    .bp-typewriter-sound-control {
        top: 15px;
        right: 15px;
    }
}
