body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
}

#counter {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.box-container {
    position: relative;
    width: 220px;
    height: 220px;
    cursor: pointer;
    margin: 0 auto;
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
}

.box-container:active {
    transform: scale(0.9);
}

.box {
    width: 100%;
    height: 100%;
    background-color: #ff4757;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.ribbon-v {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 100%;
    background-color: #ffa502;
    transition: background-color 0.3s ease;
}

.ribbon-h {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 34px;
    background-color: #ffa502;
    transition: background-color 0.3s ease;
}

#message {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.85);
    padding: 12px 24px;
    border-radius: 25px;
    text-align: center;
    max-width: 280px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.hidden {
    display: none !important;
}

#final-gift {
    text-align: center;
    background: white;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    max-width: 85%;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#final-gift h1 {
    color: #ff4757; 
    margin: 0 0 10px 0;
}

#final-gift p {
    font-size: 1.2rem; 
    color: #555;
}

.reward-container {
    margin-top: 25px;
}

.reward-label {
    font-weight: bold; 
    color: #777; 
    margin-bottom: 5px !important;
}

.reward-text {
    color: #2ed573; 
    background: #f1f2f6; 
    padding: 20px; 
    border-radius: 12px; 
    margin: 0;
}

@keyframes popIn {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
