.word-card {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 1.5rem;
}

/* Editable Text Div */
.word-input-area {
    width: 100%;
    height: 430px;
    overflow-y: auto;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 400;
    font-family: "Roboto Slab", serif;
    border-radius: 10px;
    border: 1px solid #ccc;
    background: #fff;
    color: #111;
    line-height: 1.6;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Placeholder for contenteditable div */
.word-input-area:empty:before {
    content: attr(data-placeholder);
    color: #888;
    pointer-events: none;
    display: block;
}

/* Scrollbar Styling */
.word-input-area::-webkit-scrollbar {
    width: 8px;
}

.word-input-area::-webkit-scrollbar-thumb {
    background-color: #b3b3b3;
    border-radius: 6px;
}

.word-input-area::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

/* Button */
.word-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 0;
}

.word-analyze-btn {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #0F2BC9 0%, #667eea 100%);
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    font-family: "Roboto Slab", serif;
    border: none;
    border-radius: 8px;
    width: 40%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.word-analyze-btn:hover {
    transform: translateY(1px);
}

/* Result Card */
.word-result-card {
    max-width: 1000px;
    margin: 1.75rem auto 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
    padding: 1.75rem;
    text-align: center;
}

.word-result-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.word-result-box {
    flex: 1;
    min-width: 180px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.word-value {
    font-size: 1.6rem;
    font-weight: 500;
    font-family: "Roboto Slab", serif;
    color: rgb(9,119,9);
    margin-bottom: 0.5rem;
}

.word-label {
    font-size: 1rem;
    font-weight: 400;
    color: #111;
    margin-top: -12px;
}

/* Table */
.word-table-container {
    margin-top: 1rem;
    overflow-x: auto;
}

.word-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.word-table th, .word-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ccc;
    font-size: 1rem;
    color: #111;
}

.word-table th {
    background: #f0f4ff;
    font-weight: 700;
}


/***** Media Query *****/
/***** Tablets in portrait & smaller laptops (≤991px) ******/
@media (max-width: 991px) {
.word-card {
    max-width: 800px;
    gap: 1.75rem;
}

.word-result-card {
    max-width: 800px;
}
}

/***** Standard tablets & landscape phones (≤768px) ******/
@media (max-width: 768px) {
.word-card {
    max-width: 670px;
    gap: 1.75rem;
}

.word-result-card {
    max-width: 670px;
}
}

/***** Large smartphones & phablets (≤617px) ******/
@media (max-width: 617px) {
.word-card {
    max-width: 530px;
    gap: 1.75rem;
}

.word-result-card {
    max-width: 530px;
}

.word-analyze-btn {
    width: 70%;
}

.word-input-area {
    height: 380px;
    font-size: 1rem;
}
}

/***** Small smartphones (≤450px) ******/
@media (max-width: 450px) {
.word-card {
    max-width: 400px;
    gap: 1.75rem;
}

.word-result-card {
    max-width: 400px;
}

.word-analyze-btn {
    width: 100%;
}

.word-input-area {
    height: 340px;
    font-size: 0.9rem;
}

.word-value {
    font-size: 1.4rem;
}

.word-label {
    font-size: 0.9rem;
}

.word-table th, .word-table td {
    font-size: 0.9rem;
}
}

/***** Extra small phones & older devices (≤365px) ******/
@media (max-width: 365px) {
.word-card {
    max-width: 320px;
    gap: 1.75rem;
}

.word-result-card {
    max-width: 320px;
}

.word-analyze-btn {
    width: 100%;
}

.word-input-area {
    height: 300px;
    font-size: 0.85rem;
}

.word-value {
    font-size: 1.3rem;
}

.word-label {
    font-size: 0.85rem;
}

.word-table th, .word-table td {
    font-size: 0.85rem;
}
}

