* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #FFB6D9 0%, #FFC9E3 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

h1 {
    font-size: 2.5em;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: bounce 1s ease-in-out infinite;
}

.name {
    font-size: 1.8em;
    color: #fff;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    color: #f0f0f0;
    margin-bottom: 30px;
}

.scratch-container {
    position: relative;
    margin: 30px auto;
    display: block;
    width: 100%;
    max-width: 400px;
}

.scratch-canvas {
    display: block;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFD89B 0%, #FFA500 100%);
    position: relative;
    z-index: 10;
    transition: opacity 0.5s ease-out;
    width: 100%;
    max-width: 100%;
    animation: slideInMain 0.5s ease-out;
}

@keyframes slideInMain {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: scale(0.95) rotateZ(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateZ(0deg);
    }
}

.scratch-canvas {
    display: block;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #FFD89B 0%, #FFA500 100%);
    position: relative;
    z-index: 10;
    transition: opacity 0.5s ease-out;
    width: 100%;
    max-width: 100%;
}

.scratch-canvas.card-0 {
    animation: slideInMain 0.6s ease-out;
}

.scratch-canvas.card-1 {
    animation: slideInLeft 0.6s ease-out;
}

.scratch-canvas.card-2 {
    animation: slideInRight 0.6s ease-out;
}

.scratch-canvas.card-3 {
    animation: rotateIn 0.6s ease-out;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
    padding: 0 10px;
}

/* Revealed Cards (Small Cards at Top) */
.revealed-cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    min-height: 100px;
}

.revealed-card {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 0.8em;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: popIn 0.5s ease-out;
    padding: 5px;
}

@keyframes popIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    color: white;
    padding: 30px;
    text-align: center;
    z-index: 1;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.message h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.message p {
    font-size: 0.95em;
    margin-bottom: 8px;
    line-height: 1.4;
}

.hint {
    color: white;
    font-size: 1.1em;
    margin-top: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.next-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 0.95em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.5);
    transition: all 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 15;
}

.next-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 105, 180, 0.6);
}

.next-btn:active {
    transform: translateY(-1px);
}

.completion-message {
    color: white;
    font-size: 1.3em;
    margin-top: 30px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.8s ease-in;
    animation: pulse 1s ease-in-out infinite;
}

.completion-message.show {
    opacity: 1;
}

/* Sticker Images */
.sticker-left {
    position: fixed;
    left: 5%;
    bottom: 10%;
    transform: rotate(-15deg);
    max-width: 70px;
    height: auto;
    z-index: 20;
    animation: stickerBounceLeft 0.8s ease-out 0.3s backwards;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.sticker-right {
    position: fixed;
    right: 5%;
    top: 45%;
    transform: rotate(15deg);
    max-width: 70px;
    height: auto;
    z-index: 20;
    animation: stickerBounceRight 0.8s ease-out 0.5s backwards;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

@keyframes stickerBounceLeft {
    from {
        opacity: 0;
        transform: translateY(150px) translateX(-150px) rotate(-15deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(-15deg);
    }
}

@keyframes stickerBounceRight {
    from {
        opacity: 0;
        transform: translateY(-150px) translateX(150px) rotate(15deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(15deg);
    }
}

/* Final Image */
.final-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    max-width: 70%;
    max-height: 70vh;
    z-index: 100;
    opacity: 0;
    display: none;
    animation: finalImagePop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 20px;
    overflow: hidden;
}

.final-image:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

@keyframes finalImagePop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.final-image:not(.hidden) {
    display: block;
}

/* Love Message */
.love-message {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5em;
    font-weight: bold;
    color: #FF1493;
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.6), 0 0 30px rgba(255, 105, 180, 0.4);
    z-index: 99;
    pointer-events: none;
    display: none;
    animation: loveMessageBounce 0.6s ease-out;
}

@keyframes loveMessageBounce {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) rotateZ(-20deg);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotateZ(0deg);
    }
}

.love-message:not(.hidden) {
    display: block;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Romantic Effects */
.floating-heart {
    position: fixed;
    font-size: 2em;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 3s ease-in forwards;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-500px) translateX(100px) rotate(360deg);
    }
}

.floating-heart.left {
    animation: floatUpLeft 3s ease-in forwards;
}

@keyframes floatUpLeft {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-500px) translateX(-100px) rotate(-360deg);
    }
}

.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    font-size: 1.5em;
    animation: sparkleAnim 2s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0);
    }
}

.rose-petal {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    font-size: 1.2em;
    animation: fallDown 4s ease-in forwards;
}

@keyframes fallDown {
    0% {
        opacity: 1;
        transform: translateY(-100px) translateX(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(window.innerHeight) translateX(200px) rotate(720deg);
    }
}

/* Responsive Design */
@media (max-width: 900px) {
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .name {
        font-size: 1.4em;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .message h3 {
        font-size: 1.2em;
    }
    
    .message p {
        font-size: 0.85em;
    }
    
    .hint {
        font-size: 1em;
    }
}
