body {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); 
    color: white;
    overflow: hidden; 
}

/* ä¸»å†…å®¹ */
.container {
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    width: 90%; 
    max-width: 400px; 
    position: relative;
    z-index: 1; 
    backdrop-filter: blur(10px); 
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 0 0 10px #00ffcc; 
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.decibel-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

input {
    padding: 10px;
    font-size: 16px;
    border: 2px solid #007bff;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    flex: 1 1 100%;
    outline: none; 
}

input::placeholder {
    color: #ccc;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    flex: 1 1 45%;
    outline: none; 
    text-shadow: 0 0 5px #00ffcc; 
}

button:hover {
    background-color: #0056b3;
    transform: translateY(-5px) scale(1.05); 
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none; 
}

#decibel-output {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #00ffcc;
    text-shadow: 0 0 5px #00ffcc; 
}

#output {
    font-size: 1.5rem;
    margin-top: 20px;
    color: #00ffcc;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(20px); 
}

#output.active {
    opacity: 1;
    transform: translateY(0); 
}

/* æ·»åŠ åª’ä½“æŸ¥è¯¢ä»¥å¤„ç†å°å±å¹• */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    .controls, .decibel-controls {
        flex-direction: column;
        align-items: center;
    }

    button {
        flex: 1 1 100%;
        margin: 5px 0;
    }

    input {
        flex: 1 1 100%;
        margin: 5px 0;
    }
}