* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; 
    background-color: #ffb6c1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: background 0.5s ease-in-out;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.heart-bg {
    position: absolute;
    color: #ff4757;
    font-size: 24px;
    opacity: 0.4;
    animation: floatUp 6s infinite linear;
    bottom: -50px;
    pointer-events: none;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-115vh) rotate(360deg); opacity: 0; }
}

.card {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px 15px; 
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 400px;
    
    max-height: 85vh; 
    overflow-y: auto;
    
    z-index: 10;
    border: 3px solid #ff4757;
    -webkit-overflow-scrolling: touch; 
}

.card::-webkit-scrollbar {
    width: 6px;
}
.card::-webkit-scrollbar-track {
    background: transparent;
}
.card::-webkit-scrollbar-thumb {
    background: rgba(255, 71, 87, 0.3);
    border-radius: 10px;
}

h2 {
    color: #ff4757;
    margin-top: 0;
    font-size: 24px;
}

p {
    color: #444;
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.rating-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.rating-btn {
    background: transparent;
    border: none;
    font-size: 32px;
    padding: 0;
    cursor: pointer;
    transition: transform 0.1s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-btn:active {
    transform: scale(1.2);
}

.btn {
    background-color: #ff4757;
    color: white;
    border: none;
    padding: 14px 35px; 
    font-size: 18px;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 4px 10px rgba(255, 71, 87, 0.2);
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.95);
}

.sticker-container {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

.sticker-container img {
    max-width: 200px;
    height: auto;
}

.poem-text {
    font-style: italic;
    white-space: pre-line;
    font-size: 14px; 
    color: #333;
    line-height: 1.6;
    margin-top: 15px;
    text-align: center;
    padding: 0 2px;
}