/* ---------- Controls ---------- */
.controls {
    width: 100%;
    max-width: 1000px;
    margin: 10px auto 20px auto;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.controls input[type="text"],
.controls select {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-width: 180px;
    font-size: 0.95rem;
}

.controls .sample-card {
    display: inline-block;
    margin-left: 10px;
    padding: 6px 12px;
    background-color: #f0f8ff;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #333;
}

.controls .sample-card p {
    margin: 4px 0 0 0;
}


/* ---------- Buttons ---------- */
.btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #DC143C, #B91C3C);
    color: #fff;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease-in-out;
    font-size: 0.95rem;
}

.btn:hover {
    background: linear-gradient(135deg, #B91C3C, #DC143C);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

/* ---------- Add Form ---------- */
.add-form {
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    margin: 10px auto 30px auto;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr 1fr auto;
}

.add-form input[type="text"] {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 0.95rem;
}

/* ---------- Table ---------- */
.table-wrap {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 20px auto;
    overflow-x: auto;
}

#vocabulary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
}

#vocabulary-table th,
#vocabulary-table td {
    padding: 12px 15px;
    text-align: left;
}

#vocabulary-table thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    border-radius: 8px 8px 0 0;
}

#vocabulary-table tbody tr {
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    /* for fade-in animation */
}

/* Alternating row colors */
#vocabulary-table tbody tr:nth-child(even) {
    background-color: #fef2f2;
}

#vocabulary-table tbody tr:hover {
    background-color: #ffecec;
    transform: scale(1.02);
    transition: all 0.2s ease-in-out;
}

#vocabulary-table tbody tr td {
    border-bottom: none;
}

/* ---------- No Results ---------- */
.no-results {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

/* ---------- Pagination ---------- */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 10px auto 40px auto;
    font-size: 0.95rem;
}

.pagination-controls #page-info {
    font-weight: 600;
}

/* ---------- JSON Format Section ---------- */
.json-format {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin: 30px auto;
    font-size: 0.95rem;
    line-height: 1.5;
}

.json-format h3 {
    color: #b91c3c;
    margin-bottom: 10px;
}

.json-format pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.json-format code {
    color: #333;
}

.json-format p strong {
    color: #dc143c;
}

.json-format.highlight {
    box-shadow: 0 0 15px 3px rgba(220, 20, 60, 0.4);
    transition: box-shadow 0.4s ease-in-out;
}

.json-format h4 {
    margin-top: 20px;
    color: #b91c3c;
}

.json-format ol {
    margin: 10px 0 10px 25px;
}

.json-format ol li {
    margin-bottom: 8px;
}

.json-format ul {
    margin: 6px 0 6px 25px;
    list-style-type: circle;
}