:root {
  --primary: #000000;
  --secondary: #333333;
  --accent: #0066cc;
  --accent-light: #0080ff;
  --light: #666666;
  --lighter: #999999;
  --lightest: #f8f9fa;
  --white: #ffffff;
  --blue: #0066cc;
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  --tulu-primary: #0066cc;
  --tulu-secondary: #0080ff;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  color: var(--primary);
  min-width: 375px;
  min-height: 100vh;
  line-height: 1.6;
}
html, body {
  font-size: 18px;
  line-height: 1.3;
  height: 100%;
}

img {
  max-width: 100%;
}
hr {
  height: 2px;
  border: 0;
  background: #ddd;
  display: block;
  margin: 30px 0;
}
h1, h2, h3, h4, h5 {
  margin: 10px 0 10px 0;
}

h4, h5 {
  margin: 0 0 10px 0;
  font-weight: normal;
}

a {
  color: var(--primary);
}
  a:hover {
    color: var(--blue);
  }

input:not([type="radio"]),
select,
button,
textarea,
.button {
  padding: 15px;
  font-family: "Helvetica Neue", "Segoe UI", Helvetica, sans-serif;
  font-size: 1rem;
  line-height: 1.2rem;
  color: var(--primary);
  border-radius: 5px;
  border: 1px solid #ccc;
}
input:focus,
select:focus {
  border-color: var(--light);
  outline: none;
}

button, .button {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  width: auto;
  cursor: pointer;
  padding: 10px 20px;
}
.button-outline {
  background: var(--white);
  color: var(--primary);
}
  .button-outline:hover {
    background: var(--lighter);
    color: var(--primary);
  }
button:hover, .button:hover {
  border-color: #444;
  background: #444;
}

.noul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.text-right {
  text-align: right;
}

/* Custom */
.main {
  background: var(--white);
  border-radius: 0;
  box-shadow: none;
  border: none;
  margin: 0 auto;
  padding: 40px 20px;
  max-width: 1000px;

  display: flex;
  flex-direction: column;
}
  .home .container {
    max-width: 1000px;
  }

.logo img {
  height: auto;
  max-width: 200px;
}
  .home .logo img {
    max-width: 80%;
  }

.intro {
  display: none;
  color: var(--secondary);
  margin: 20px 0;
  font-weight: 400;
  line-height: 1.5;
}

.site-title {
  margin: 15px 0 0 0;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.4;
}

.site-title .tulu-text {
  display: block;
  font-family: 'Noto Sans Kannada', 'Lohit Kannada', 'Kedage', sans-serif;
  font-weight: 600;
  color: var(--tulu-primary);
  font-size: 1.2em;
  margin-bottom: 2px;
}

.site-title .subtitle {
  display: block;
  color: var(--secondary);
  font-size: 0.9em;
  font-weight: 400;
}

.tulu-text {
  font-family: 'Noto Sans Kannada', 'Lohit Kannada', 'Kedage', sans-serif;
  font-weight: 500;
  color: var(--primary);
  font-size: 1.1em;
}

  .search .tabs {
    position: relative;
    margin-left: 0;
    text-align: center;
    margin-bottom: 15px;
  }
  .search .tabs .group {
    display: inline;
  }
  .search .tabs input {
    opacity: 0;
    position: absolute;
  }
  .search .tab {
    background: transparent;
    color: var(--light);
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none;
    text-align: center;

    display: inline-block;
    margin: 0 15px 0 0;
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
  }
    .search .tabs input:focus + label,
    .search .tabs label:hover {
      color: var(--primary);
      border-color: var(--lighter);
    }
    .search .tabs input:checked + label {
      background: var(--lightest);
      color: var(--primary);
      border-color: var(--lighter);
      font-weight: 500;
    }

.search-form {
  position: relative;
  margin-top: 10px;
}
.search-form > div {
  display: flex;
  align-items: stretch;
  border-radius: 4px;
  border: 2px solid var(--lighter);
  background: var(--white);
  transition: all 0.2s ease;
}

.search-form > div:focus-within {
  border-color: var(--accent);
}

  .search-form input {
    flex-grow: 1;
    padding: 12px 16px;
    border: none;
    font-size: 1.1rem;
    border-radius: 0;
    background: transparent;
    outline: none;
  }
  .search-form input:focus {
    outline: none;
  }
  .search-form button {
    border: none;
    background: var(--accent);
    color: var(--white);
    border-radius: 0;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
  }
  .search-form button:hover {
    background: var(--accent-light);
  }
  .search-form button img {
    max-height: 18px;
    min-width: 18px;
    filter: brightness(0) invert(1);
  }

.page {
  margin: 30px 0 30px 0;
}
  .entries .entry {
    margin-bottom: 40px;
    background: var(--white);
    border-radius: 0;
    padding: 20px 0;
    box-shadow: none;
    border-left: none;
    border-bottom: 1px solid var(--lightest);
    transition: none;
  }
  .entries .entry:hover {
    background: var(--white);
    box-shadow: none;
    transform: none;
  }
  .entries .head {
    position: relative;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: none;
  }
  .entries .title {
    margin: 0 0 8px 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 600;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
  }
  .entries .pronun {
    color: var(--light);
    font-style: italic;
    font-weight: 400;
    margin-top: 4px;
    display: block;
    font-size: 0.9rem;
  }
.entries .defs {
  padding: 0 0 0 24px;
  background: transparent;
  border-radius: 0;
  padding: 0 0 0 24px;
  margin-top: 12px;
}
  .entries .defs:not(:first-child) {
    margin-bottom: 16px;
  }
  .entries li::marker {
    color: var(--light);
    font-weight: normal;
  }
  .entries .defs li {
    margin-bottom: 8px;
    position: relative;
    padding: 4px 0;
    border-radius: 0;
    transition: none;
    line-height: 1.6;
  }
  .entries .defs li::marker {
    font-size: 1em;
  }
  .entries .defs li:hover {
    background: var(--lightest);
    box-shadow: none;
    transform: none;
  }

  .entries .defs .types {
    list-style-type: none;
    margin: 0 0 12px -24px;
    color: var(--light);
    font-style: italic;
    font-weight: 400;
    font-size: 0.9rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    display: block;
    border: none;
  }
  .entries .defs .types:first-child {
    margin-top: 0;
  }

  .entries .defs .types:hover {
    background: rgba(102, 126, 234, 0.25);
    border-color: var(--accent);
    transform: translateY(-1px);
    transition: all 0.2s ease;
  }

    .entry .edit {
      background: var(--accent);
      color: var(--white);
      border-radius: 20px;
      padding: 8px 12px;
      position: absolute;
      right: 0;
      top: 0;
      display: none;
      text-decoration: none;
      z-index: 1000;
      line-height: 1;
      font-size: 0.8rem;
      transition: all 0.3s ease;
      box-shadow: var(--card-shadow);
    }
    .entry .edit:hover {
      background: var(--accent-light);
      transform: scale(1.1);
    }
    .entries .defs li:hover .edit {
      display: block;
    }
    .entry .head:hover .edit {
      display: block;
    }

.related ul {
  font-size: 0.875rem;
}
  .related ul li {
    margin-bottom: 10px;
  }
  .related h2 {
    font-size: 1rem;
  }

.form-submit {
  background: var(--white);
  border-radius: 15px;
  padding: 24px;
  box-shadow: var(--card-shadow);
}
  .form-submit select {
    padding: 10px;
  }
  .form-submit fieldset {
    padding: 0;
    margin: 0 0 20px 0;
    border: 0;
  }
  .form-submit label {
    display: block;
    color: var(--secondary);
  }
  .form-submit select, .form-submit textarea {
    width: 100%;
  }
  .form-submit li {
    margin-bottom: 20px;
  }
  .form-submit li:first-child .btn-remove-relation {
    display: none;
  }
  .form-submit input,
  .form-submit textarea {
    width: 100%;
  }

.form-comments {
  margin: 10px 0 45px 0;
  display: none;
  padding: 15px;
  clear: both;
}
  .form-comments textarea {
    width: 100%;
    min-height: 200px;
  }
  .form-comments h3 {
    margin: 0 0 15px 0;
  }
  .form-comments button {
    margin: 0 10px 10px 0;
    width: 100%;
  }

.glossary .index {
  background: #f7f7f7;
  margin-bottom: 15px;
}
  .glossary .index a {
    text-decoration: none;
    display: inline-block;
    padding: 5px;
  }
  .glossary .index .sel,
  .glossary .index a:hover {
    background: var(--primary);
    color: var(--white);
  }

  .glossary .words {
    /* column-count: auto;
    column-gap: 0; */
    column-count: 3;
    column-gap: 40px;
  }
    .glossary .words li {
      border-bottom: 1px solid #eee;
      page-break-inside: avoid;
      margin-bottom: 10px;
    }
    .glossary .words a {
      text-decoration: none;
    }

.pagination {
  margin-top: 30px;
}
  .pagination a {
    display: inline-block;
    text-decoration: none;
  }
  .pagination .pg-page {
    padding: 0 6px;
  }
  .pagination .pg-selected {
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
  }
  .pagination.top {
    margin-bottom: 30px;
  }
  .pagination.bottom {
    margin-top: 30px;
  }

/* Custom pages */
.page.type textarea{
  width: 100%;
  min-height: 400px;
}

.page {
  margin: 0 30px;
}
  .page li {
    margin-bottom: 20px;
  }
  .page a {
    color: var(--blue);
  }
  .page a:hover {
    color: var(--secondary);
  }

.nav {
  border-top: 1px dashed #ccc;
  padding: 15px 0;
  text-align: center;

  margin: 30px -30px 0 -30px;
}
  .nav a {
    text-decoration: none;
    color: var(--light);
    margin: 0 15px;
  }
  .nav a:hover {
    color: var(--blue);
  }

.header {
  margin-bottom: 40px;
} 
.footer {
  margin-bottom: 30px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--light);
  padding: 20px;
  border-top: 1px solid var(--lightest);
  margin-top: 60px;
}
  .footer a {
    color: var(--light);
    display: inline-block;
    margin: 0 10px;
    text-decoration: none;
  }
  .footer a:hover {
    color: var(--accent);
  }
  .footer img {
    max-width: 15px;
  }
.footer .slash {
  margin: 0 10px;
}
.footer .credit img {
  height: 11px;
  width: auto;
}
.footer .credit:hover img {
  opacity: 0.6;
}


.center {
  text-align: center;
}

/* Homepage */

.home {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px 0;
}
  .home .main {
    padding: 80px 40px;
    animation: fadeInUp 0.6s ease;
  }
  .home .header {
    text-align: center;
    margin-bottom: 60px;
  }
  .home .intro {
    display: block;
  }
  .home .site-title {
    font-size: 1.3rem;
    text-align: center;
    margin-top: 20px;
  }
  .home .site-title .tulu-text {
    font-size: 1.4em;
    margin-bottom: 5px;
  }
  .home .site-title .subtitle {
    font-size: 1em;
    opacity: 0.8;
  }
  .home .logo {
    width: 100%;
    flex: none;
    margin-bottom: 40px;
  }
    .home .logo img {
      max-height: 180px;
      transition: transform 0.2s ease;
    }
    .home .logo img:hover {
      transform: scale(1.02);
    }
  .home .search {
    width: 100%;
    flex: none;
    max-width: 600px;
    margin: 0 auto;
  }

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid #ffffff;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Enhanced transitions */
.search {
  transition: transform 0.3s ease;
}

.entries .entry {
  transition: all 0.3s ease;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

@media screen and (min-width: 2000px) {
  html, body, input, button, select, textarea {
    font-size: 24px;
  }
  button {
    padding: 20px 30px;
  }
  .container {
    max-width: 50%;
  }
  .nav a {
    font-size: 0.75rem;
  }
}

@media screen and (max-width: 775px) {
  body {
    background: var(--white);
  }
  .home .main,
  .main {
    margin: 0;
    padding: 20px;
    width: 100%;
    max-width: 100%;
    border: 0;
    box-shadow: none;
  }
  .home {
    display: block;
  }

  .logo {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
  }
  .logo img {
    max-height: 32px;
  }

  .entries {
    padding: 0 0 0 20px;
  }

  .nav {
    position: static;
  }
  .nav a {
    display: block;
    margin-bottom: 5px;
    padding: 5px 0;
  }

  .footer {
    margin-bottom: 15px;
  }
    .footer a {
      padding: 10px;
    }

  .form-submit .columns {
    width: 100%;
  }
  .form-submit button[type="submit"] {
    width: 100%;
  }

  .page {
    margin-left: 0;
    margin-right: 0;
  }
}

@media screen and (max-width: 500px) {
  .search .tabs {
    margin: 0;
  }
  .search .tabs .tab {
    display: inline-block;
    border-bottom: 0;
    text-align: left;
    border: 0;
    padding: 5px 0;
  }
  .search .tabs input {
    opacity: 1;
    position: relative;
  }
  .search .tabs .group {
    display: block;
  }

  .footer a {
    display: block;
  }
  .footer a.icon {
    display: inline-block;
  }
  .related a {
    display: inline-block;
    padding: 5px 0;
  }
}

/* Card Effect for Main Section */
.main.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin: 20px auto;
  max-width: 1200px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.main.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.home .main.card {
  margin-top: 40px;
}

/* Card header styling */
.card .header {
  padding: 30px 40px;
  border-bottom: 1px solid #f0f0f0;
}

/* Adjust container for card effect */
body {
  background: #f8f9fa;
}

.container {
  max-width: none;
  padding: 0 20px;
}
