.word-counter {
    width: 90%;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.word-counter h1 {
    text-align: center;
    color: #007bff;
    margin-bottom: 2rem;
    margin-top: 2rem; /* Thêm khoảng cách phía trên */
    font-size: 2rem;
}

.word-counter textarea {
    width: 100%;
    height: 200px;
    margin-bottom: 2rem;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.word-counter textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.word-counter .stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.word-counter .stat-box {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    flex: 1;
    background: #f8f9fa;
    transition: transform 0.2s;
}

.word-counter .stat-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.word-counter .stat-box h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.word-counter .stat-box p {
    color: #3498db;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.word-counter button {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: #4e888d;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s, box-shadow 0.2s;
    margin-bottom: 1rem; /* Added spacing between buttons */
}

.word-counter button:hover {
    background-color: #f48840;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#clear-text {
    background-color: #d9534f; /* Different color for the clear button */
}

@media (max-width: 600px) {
    .word-counter .stats {
        flex-direction: column;
    }

    .word-counter .stat-box {
        margin-bottom: 1rem;
    }
}

@media (max-width: 400px) {
    .word-counter h1 {
        font-size: 1.8rem;
    }

    .word-counter textarea {
        height: 150px;
    }

    .word-counter button {
        font-size: 1rem;
        padding: 0.8rem;
    }
}

    .container.counter {
        margin: 30px auto;
        padding: 25px;
        background-color: #ffffff;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
        border-radius: 10px;
        font-family: "Helvetica Neue", Arial, sans-serif;
        color: #333333;
        line-height: 1.8;
    }

    .container.counter h1 {
        font-size: 2.4rem;
        text-align: center;
        color: #0056b3;
        margin-bottom: 20px;
        margin-top: 40px;
    }

    .container.counter p {
        font-size: 1.1rem;
        margin-bottom: 20px;
        color: #555555;
        text-align: justify;
    }

    .container.counter h2 {
        font-size: 1.8rem;
        color: #007BFF;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .container.counter ul {
        margin-left: 20px;
        margin-bottom: 20px;
        padding-left: 20px;
    }

    .container.counter ul li {
        font-size: 1rem;
        margin-bottom: 10px;
        color: #444444;
    }

    .container.counter ul li strong {
        color: #0056b3;
    }

    .container.counter a {
        color: #007BFF;
        text-decoration: none;
    }

    .container.counter a:hover {
        text-decoration: underline;
    }
