* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.game-area {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.bathtub {
    position: relative;
    width: 300px;
    height: 350px;
    background: linear-gradient(to right, #e0e0e0, #f5f5f5);
    border: 8px solid #8b7355;
    border-radius: 30px 30px 40px 40px;
    overflow: hidden;
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.1);
}

.water {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(180deg, #87ceeb 0%, #4a90e2 100%);
    animation: waterWave 3s ease-in-out infinite;
}

@keyframes waterWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

.character {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 150px;
    z-index: 10;
}

.head {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #f4a460;
    border-radius: 50%;
    top: 0;
    left: 30px;
    border: 2px solid #d4846f;
}

.head::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    top: 20px;
    left: 15px;
}

.head::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #333;
    border-radius: 50%;
    top: 20px;
    right: 15px;
}

.body {
    position: absolute;
    width: 70px;
    height: 60px;
    background: #f4a460;
    border-radius: 30%;
    top: 55px;
    left: 25px;
    border: 2px solid #d4846f;
}

.arms {
    position: absolute;
    width: 100px;
    height: 15px;
    top: 70px;
    left: 10px;
}

.arms::before,
.arms::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 15px;
    background: #f4a460;
    border-radius: 50%;
    border: 2px solid #d4846f;
}

.arms::before {
    left: 0;
    transform: rotate(-20deg);
}

.arms::after {
    right: 0;
    transform: rotate(20deg);
}

.legs {
    position: absolute;
    width: 60px;
    height: 40px;
    top: 110px;
    left: 30px;
}

.legs::before,
.legs::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 35px;
    background: #f4a460;
    border-radius: 50%;
    border: 2px solid #d4846f;
}

.legs::before {
    left: 0;
}

.legs::after {
    right: 0;
}

.bubbles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.bubble {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(200,220,255,0.4));
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    animation: float-up 2s ease-in infinite;
}

@keyframes float-up {
    to {
        transform: translateY(-300px);
        opacity: 0;
    }
}

.stats {
    margin: 30px 0;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
}

.stat {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat label {
    font-weight: bold;
    min-width: 80px;
    color: #333;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s ease;
}

#cleanlinessBar {
    background: linear-gradient(90deg, #2196f3, #00bcd4) !important;
}

#soapBar {
    background: linear-gradient(90deg, #ff9800, #ffc107) !important;
}

#happinessBar {
    background: linear-gradient(90deg, #f44336, #e91e63) !important;
}

.stat span {
    min-width: 40px;
    text-align: right;
    font-weight: bold;
    color: #333;
}

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 30px 0;
}

.btn {
    padding: 15px 20px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.soap-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.wash-btn {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
}

.water-btn {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.scrub-btn {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.reset-btn {
    background: linear-gradient(135deg, #a8edea, #fed6e3);
    color: #333;
    width: 100%;
}

.messages {
    min-height: 30px;
    text-align: center;
    color: #555;
    font-style: italic;
    margin: 20px 0;
}

.message {
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.reset {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .bathtub {
        width: 250px;
        height: 300px;
    }

    .controls {
        grid-template-columns: 1fr;
    }
}
