/* --- RESET --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

body {
    margin: 0; padding: 0;
    width: 100%; height: 100vh;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    display: flex; justify-content: center; align-items: center;
}

/* BACKGROUND */
body::before {
    content: ""; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, #ff9a9e 0%, #fad0c4 100%);
    z-index: -2;
}

canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* --- CARD --- */
.glass-container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 4px solid white;
    box-shadow: 0 25px 60px rgba(255, 111, 97, 0.3);
    width: 85%; max-width: 320px;
    padding: 30px 20px;
    border-radius: 40px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center;
    position: relative; z-index: 10;
}

h1 { color: #c0392b; margin: 0 0 5px 0; font-size: 1.8rem; font-weight: 800; }
.subtitle { color: #d35400; margin-bottom: 15px; font-size: 0.9rem; }

/* --- IMAGE WRAPPER --- */
.image-wrapper {
    width: 140px; height: 140px;
    margin-bottom: 20px;
    display: flex; justify-content: center; align-items: center;
}

.cat-img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 25px; border: 4px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: block;
}

/* --- INPUTS --- */
.input-group {
    width: 100%; background: white; border-radius: 50px;
    padding: 5px; border: 3px solid #ffebee;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; /* Adjusted height */
    margin-bottom: 10px;
}

input {
    border: none; background: transparent; padding: 0 15px;
    flex: 1; /* Takes available space */
    min-width: 0; /* 🔴 CRITICAL FIX: Allows input to shrink so button fits */
    outline: none; font-size: 1rem;
    color: #ff6f61; font-weight: bold;
}

.btn {
    background: linear-gradient(135deg, #ff6f61 0%, #ff9a9e 100%);
    color: white; border: none; border-radius: 50%;
    width: 48px; height: 48px;
    min-width: 48px; flex-shrink: 0; /* Prevents squashing */
    cursor: pointer; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.4);
    margin-left: 5px; /* Tiny gap between input and button */
}

.hint-box {
    font-weight: bold; color: #c0392b;
    background: rgba(255,255,255,0.6);
    padding: 8px 15px; border-radius: 15px;
    font-size: 0.85rem; min-height: 2.5em;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}

.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake { 0%, 100% {transform: translateX(0);} 25% {transform: translateX(-10px);} 75% {transform: translateX(10px);} }

/* --- MODAL --- */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 2000;
    justify-content: center; align-items: center;
}
.modal-content {
    background: white; padding: 30px; border-radius: 30px;
    text-align: center; border: 4px solid #ff6f61; width: 85%; max-width: 320px;
}
.happy-img { width: 100%; border-radius: 15px; margin-bottom: 15px; }
.enter-btn {
    background: #ff6f61; color: white; border: none; padding: 12px 30px;
    border-radius: 30px; font-weight: bold; cursor: pointer;
}

/* --- RIPPLE EFFECT --- */
.ripple {
    position: fixed; border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none; z-index: 9999;
    width: 100px; height: 100px;
    animation: rip 0.6s linear forwards;
}
@keyframes rip { to { transform: translate(-50%, -50%) scale(4); opacity: 0; } }
