@font-face {
    font-family: 'Tilok';
    src: url('https://moradoklanna.com/dict/LN_TILOK_V6_05.TTF');
}
body {
    font-family: 'Sarabun', sans-serif;
    font-size: 1rem;
    position: relative;
}
h2 {
    font-size: 2rem;
    font-weight: bold;
}
.tilok {
    font-family: 'Tilok', sans-serif;
    font-size: 1.6em !important;
    position: relative;
    top: -3px;
    line-height: 1.1 !important;
}
.mainlogo img {
    width: 100%;
    max-width: 300px;
    height: auto;
}
.tone1 {
    color: blue;
}
.tone2 {
    color: green;
}
.pronounce {
    font-size: 1.5em;
    padding: 10px;
    margin-top: 20px;
    font-weight: bold;
}
.legend {
    background-color: #f8f9fa;
    padding: 10px;
    margin-top: 20px;
    font-weight: bold;
}
.cardmeaning {
    font-size: 1.1rem;
    line-height: 1.6;
}
.backbutton {
    font-size: 1.2em;
}
/* Navbar Styling */
.navbar {
    background-color: #b11f24; /* Lanna traditional color */
}
.navbar-brand, .navbar-nav .nav-link {
    color: #ffffff !important;
    font-size: 1.1rem;
}
.navbar-brand:hover, .navbar-nav .nav-link:hover {
    color: #ddd;
}
/* Back to Top Button Styling */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 40px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: #b11f24;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
}
#backToTopBtn:hover {
    background-color: #555;
}
/* Highlight Search Term */
mark {
    background-color: yellow;
}
/* Card Styling */
.card-header {
    background-color: #f8f9fa;
    color: #000;
}
/* Tooltip Styling */
.tooltip-inner {
    max-width: 350px;
    padding: .25rem .5rem;
    color: #fff;
    text-align: center;
    background-color: #555;
    border-radius: .25rem;
}
.tooltip.bs-tooltip-top .arrow::before, .tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {
    bottom: 0;
    border-width: .4rem .4rem 0;
    border-top-color: #555;
}
.font-size-controls button {
    width: 40px;
    height: 40px;
    margin: 0 2px;
    font-size: 1rem;
    border: none;
    background-color: #f8f9fa;
    color: #000;
    cursor: pointer;
    border-radius: 5px;
}

.font-size-controls button:hover {
    background-color: #e2e6ea;
}

.table-responsive, table, th, td {
    vertical-align: top !important;
}

/* Make table rows clickable */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #f1f1f1;
}

/* Responsive Table Styling */
@media (max-width: 575.98px) {
    .table-responsive, table, th, td {
        font-size: inherit !important;
    }
    .navbar-brand, .navbar-nav .nav-link {
        font-size: 1.1rem;
    }
    .backbutton {
        font-size: 1rem;
    }
    .cardmeaning {
        font-size: 1rem;
    }
    .font-size-controls {
        text-align: center;
        margin-top: 10px;
    }
    .font-size-controls button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .tilok {
        font-size: 1.6em !important;
        line-height: 1.1 !important;
        position: relative;
        top: -3px;
    }
    .form-inline  {
        margin-top: 30px;
    }