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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 10px;
    width: 100%;
}

h1 {
    text-align: center;
    margin: 15px 0 25px;
    font-size: clamp(22px, 5vw, 36px);
}

.bottles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 25px;
    justify-content: center;
}

.bottle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    transition: transform 0.2s;
}

/* Scale the entire bottle wrapper on active state */
.bottle-wrapper:active {
    transform: scale(1.05);
}

/* Bottle cap styling */
.bottle-cap {
    width: 54px;
    height: 10px;
    border: 2px solid #333;
    border-radius: 5px 5px 0 0;
    z-index: 2;
}

/* Bottle neck styling */
.bottle-neck {
    width: 50px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #333;
    border-width: 0 2px;
    z-index: 1;
    margin-top: -2px;
}

.bottle {
    width: 80px;
    height: 160px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid #333;
    border-radius: 10px 10px 5px 5px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    margin-top: -2px;
}

.fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #F285CA; /* Pink color as specified */
    transition: height 0.2s ease;
}

.bottle-label {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

.button-container {
    display: flex;
    justify-content: center;
    margin: 2em auto;
}

#clearAllButton {
    background-color: #ff69b4;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#clearAllButton:hover {
    background-color: #ff4da0;
}

#clearAllButton:active {
    transform: scale(0.95);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .bottles-container {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 12px;
    }

    .bottle {
        width: 55px;
        height: 110px;
    }

    .bottle-neck {
        width: 42px;
        height: 8px;
    }

    .bottle-cap {
        width: 45px;
        height: 10px;
    }

    .bottle-label {
        font-size: 12px;
    }

    h1 {
        margin: 10px 0 20px;
    }

    .container {
        padding: 10px 5px;
    }

    #clearAllButton {
        font-size: 14px;
        padding: 6px 16px;
    }
}

/* 小屏手机设备 */
@media (max-width: 480px) {
    .bottles-container {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }

    .bottle {
        width: 45px;
        height: 90px;
        margin-bottom: 5px;
    }

    .bottle-neck {
        width: 28px;
        height: 8px;
    }

    .bottle-cap {
        width: 30px;
        height: 6px;
    }

    .container {
        padding: 8px 5px;
    }

    .bottle-label {
        font-size: 10px;
    }

    h1 {
        margin: 8px 0 15px;
    }

    .button-container {
        margin-bottom: 15px;
    }

    #clearAllButton {
        font-size: 12px;
        padding: 5px 14px;
    }
}

/* 极小屏设备 */
@media (max-width: 360px) {
    .bottles-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 6px;
    }

    .bottle {
        width: 40px;
        height: 80px;
    }

    .bottle-neck {
        width: 16px;
        height: 14px;
    }

    .bottle-cap {
        width: 18px;
        height: 5px;
    }

    .bottle-label {
        font-size: 9px;
    }
}