/* Main Typography */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f7f9fc;
    /* Lighter, cleaner background */
}

/* Table Cell Styles for Data */
.book-title {
    font-size: 1.125rem;
    font-weight: 600;
    /* Bolder for titles */
    color: #05386B;
    /* Deep Navy for importance */
    margin-bottom: 0.25rem;
}

.book-author {
    font-size: 0.9375rem;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.book-language {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

/* Action Links - Stronger Call to Action */
.amazon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #00A896;
    /* Primary Teal */
    text-decoration: none;
    font-weight: 700;
    /* Extra bold */
    transition: color 0.3s ease, transform 0.15s ease;
}

.amazon-link:hover {
    color: #007A6D;
    /* Darker teal on hover */
    text-decoration: underline;
    transform: translateY(-1px);
    /* Slight lift on hover */
}

.amazon-link:active {
    transform: translateY(0);
}

.publisher-link {
    color: #00A896;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.publisher-link:hover {
    color: #007A6D;
    text-decoration: underline;
}

/* Table Header Styles - Professional Data Grid Look */
th {
    cursor: pointer;
    user-select: none;
    padding: 1rem 0.75rem;
    /* Increased padding */
    border-bottom: 3px solid #00A896;
    /* Stronger accent border */
    text-align: left;
    background-color: #e6f8f7;
    /* Light background for header */
    color: #05386B;
    /* Darker text */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

th span {
    display: inline-flex;
    align-items: center;
}

/* Table Body Rows */
#book-list tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

#book-list tbody tr:nth-child(even) {
    background-color: #fcfdfe;
    /* Subtle alternating row color */
}

#book-list tbody tr:hover {
    background-color: #f0faff;
    /* Light blue on hover for clarity */
}

/* Table Data Cells */
#book-list td {
    padding: 1rem 1.5rem;
    /* Increased cell padding */
    white-space: nowrap;
    font-size: 0.9375rem;
    color: #1f2937;
}

/* Sort Icons */
.sort-icon {
    width: 1em;
    height: 1em;
    margin-left: 0.4rem;
    /* Adjusted margin */
    fill: currentColor;
}

.sort-icon.hidden {
    display: none;
}

.sort-icon.asc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M14.77 12.79a.75.75 0 01-1.06-.02L10 8.832 6.29 12.77a.75.75 0 01-1.08-1.04l4.25-4.5a.75.75 0 011.08 0l4.25 4.5a.75.75 0 01-.02 1.06z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1em;
    display: inline-block;
    width: 1em;
    height: 1em;
}

.sort-icon.desc {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='currentColor'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.65-3.95a.75.75 0 011.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1em;
    display: inline-block;
    width: 1em;
    height: 1em;
}

/* Promotional Banner */
.banner {
    background-color: #FFD166;
    /* Accent Yellow */
    color: #05386B;
    /* Deep Navy text for contrast */
    padding: 1.25rem;
    text-align: center;
    border-bottom: 3px solid #FFC338;
    margin-bottom: 2rem;
    font-weight: 700;
    font-size: 1.125rem;
}

.banner-link {
    color: #05386B;
    font-weight: 800;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.banner-link:hover {
    color: #00A896;
    /* Teal on hover */
}

/* Updated styling for the main text/hero section */
.hero-text {
    font-size: 1.6rem;
    /* Larger hero text */
    font-weight: 700;
    color: #05386B;
    /* Deep Navy */
}

.feature-list {
    list-style: disc;
    list-style-position: inside;
    padding-left: 1.5rem;
}

.feature-list li {
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: 1.75rem;
    font-weight: 800;
    /* Extra bold for headings */
    color: #05386B;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.input-field {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    outline: none;
}

.input-field:focus {
    --color-primary: #00A896;
    --color-primary-20: rgba(0, 168, 150, 0.2);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-20);
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(248, 248, 248, 0.6);
}

/* Tabs Navigation Styling */
.tab-nav {
  display: flex;
  gap: 0.5rem; /* Reduced gap for mobile */
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 2rem;
  overflow-x: auto; /* Keeps tabs scrollable if they exceed width */
  scrollbar-width: none; /* Hides scrollbar for Firefox */
  -ms-overflow-style: none; /* Hides scrollbar for IE/Edge */
}

.tab-nav::-webkit-scrollbar {
  display: none; /* Hides scrollbar for Chrome/Safari */
}

.tab-button {
  /* Use responsive padding: smaller on mobile, larger on desktop */
  padding: 0.5rem 0.75rem; 
  font-weight: 700;
  color: #4b5563;
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.75rem; /* Smaller base font for mobile */
  letter-spacing: 0.025em;
  flex: 1 1 auto; /* Allows buttons to grow/shrink equally */
  text-align: center;
}

.tab-button:hover {
    color: #00A896;
}

.tab-button.active {
    color: #00A896;
    border-bottom-color: #00A896;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* For mobile phone layout */
@media (min-width: 640px) {
  .tab-nav {
    gap: 1rem;
  }
  .tab-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}