* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #0d0d0d;
    margin: 0;
    padding: 0;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
}
.container {
    max-width: 600px;
    text-align: center;
    flex: 1;
}
img {
    max-width: 35%;
    height: auto;
    margin-bottom: 20px;
}
form {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
input[type="text"] {
    padding: 10px;
    width: 60%;
    border: 1px solid #333;
    border-radius: 5px;
    margin-right: 10px;
    background-color: #111;
    color: #fff;
    transition: background-color 0.3s, color 0.3s;
}
button {
    position: relative;
    overflow: hidden;
    color: #fff;
    background-color: transparent;
    border: 2px solid #e4b02a;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.3s, transform 0.2s;
    font-weight: bold;
    margin-left: 5px;
}
button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #e4b02a;
    z-index: -1;
    transition: transform 0.5s;
    transform-origin: left;
    transform: scaleX(0);
    transition-timing-function: cubic-bezier(0.5, 1.6, 0.4, 0.7);
}
button:hover::before {
    transform: scaleX(1);
}
button:hover {
    color: black;
}
button:active {
    transform: translateY(2px);
}
#result {
    text-align: left !important; /* ensure left alignment for populated results */
    background-color: #222;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
    color: #fff;
    /* Make result content visible by default on static pages like obdii-code-breakdown.php */
    display: block;
    transition: background-color 0.3s, color 0.3s;
    font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
/* Extra guard: paragraphs and lists inside #result are left-aligned */
#result p, #result ul, #result ol, #result li, #result .section, #result .section-body, #result .list {
    text-align: left !important;
}
.info-text {
    margin: 10px 0 20px;
    font-size: 1.1em;
}
.result-item {
    margin-bottom: 15px;
}
.result-key {
    font-weight: bold;
    color: #e4b02a;
    display: block;
    margin-bottom: 5px;
}
.result-value {
    margin-left: 20px;
}
.result-value p {
    margin: 2px 0;
}
#print-button {
    display: none;
}
/* Hide the dark/light theme toggle globally on all pages */
.theme-toggle {
    display: none !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e4b02a;
    color: #000;
    border: none;
    padding: 4px; /* Half the size */
    border-radius: 5px;
    cursor: pointer;
    z-index: 1000;
    font-size: 12px; /* Half the size */
}
.repair-guide {
    background-color: #333;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}
.repair-guide h3 {
    color: #e4b02a;
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
}
.repair-guide h4 {
    color: #e4b02a;
    font-size: 20px;
    margin-top: 15px;
    margin-bottom: 10px;
}
.repair-guide p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 18px;
}
.repair-guide .step {
    margin-left: 20px;
}
.repair-guide .bullet {
    margin-left: 20px;
}
.repair-guide strong {
    color: #e4b02a;
}
.footer-link {
    font-size: 10px;
    color: lightgray;
    text-align: center;
    margin-top: auto;
    padding: 10px 0;
}
.footer-link a {
    color: lightgray;
    text-decoration: none;
}
.footer-link a:hover {
    text-decoration: underline;
}
@media print {
    /* Make overall text 30% smaller and more condensed for print */
    html, body {
        background-color: white !important;
        color: black !important;
        padding-top: 0 !important; /* was used for Website header */
        font-size: 88% !important; /* make 10% bigger than previous 70% */
        line-height: 1.35 !important; /* slightly increase for readability at larger size */
        font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Tighten headings and typical content blocks */
    h1, h2, h3, h4, h5, h6 {
        margin-top: 0.4em !important;
        margin-bottom: 0.3em !important;
        line-height: 1.15 !important;
    }
    p, li {
        margin: 0.25em 0 !important;
    }

    .container {
        max-width: 100% !important;
        padding-top: 8px !important;
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        margin: 0 !important;
    }
    #result {
        background-color: white !important;
        color: black !important;
        box-shadow: none !important;
        border: none !important;
    }
    .result-key {
        color: black !important;
    }
    #obd-form, #print-button, .theme-toggle {
        display: none !important;
    }

    /* Remove the "Website:" header entirely when printing */
    body::after {
        content: none !important;
        display: none !important;
    }
}
@media (max-width: 768px) {
    button {
        color: black;
        background-color: #e4b02a;
    }
    button::before {
        display: none;
    }
    button:active {
        transform: translateY(2px);
        background-color: #d89b1a;
    }
}
.animation-container {
    display: none;
    width: 300px;
    height: 300px;
    margin: 20px auto;
    position: relative;
}
.web {
    position: relative;
    width: 100%;
    height: 100%;
}
.point {
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #e4b02a, #ff6f00);
    border-radius: 50%;
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.animation-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

/* New styles for share icons */
.share-icons {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-text {
    font-size: 12px;
    color: lightgray;
    margin-right: 5px;
}

.share-icons img {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-icons img:hover {
    transform: scale(1.1);
}

/* Load Lexend variable font for results content */
@font-face {
    font-family: 'Lexend';
    src: url('/fonts/Lexend-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900; /* variable range */
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #1c1c1c;
    --text-color: #e0e0e0;
    --container-bg: rgb(31, 31, 31);
    --highlight-color: #e4b02a;
    --input-bg: rgba(255, 255, 255, 0.2);
    --input-color: #fff;
    --button-bg: #e4b02a;
    --button-color: #fff;
    --footer-bg: linear-gradient(135deg, #333, #000);
    --footer-border: #444;

    /* Unified content widths – will be synced with menu widths via media queries */
    --container-width: 90%;
    --container-max: 900px;
}

.light-theme {
    --bg-color: #f0f0f0;
    --text-color: #333333;
    --container-bg: #f0f0f0;
    --highlight-color: #d49a1f;
    --input-bg: #ffffff;
    --input-color: #333333;
    --button-bg: #d49a1f;
    --button-color: #ffffff;
    --footer-bg: #f0f0f0;
    --footer-border: #cccccc;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-color), #000000);
    margin: 0;
    color: var(--text-color);
    transition: background 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f0f0f0, #e5e5e5) !important;
}

.test-dot {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 10px;
    height: 10px;
    background-color: green;
    border-radius: 50%;
    z-index: 1000;
}

.logo-container {
    margin-top: 12px;
    text-align: center;
}
.logo-container img {
    width: 500px;              /* match code/index.php on-screen size */
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px #000000);
}
.light-theme .logo-container img {
    filter: none;
}

/* Keep panel centered but DO NOT center text inside content containers by default */
.container, .result-container {
    text-align: initial; /* let children decide; result-container below forces left */
    backdrop-filter: blur(10px);
    background: var(--container-bg);
    padding: 20px;
    border-radius: 10px;
    /* 50% less drop shadow (halve spread/blur and opacity) */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    animation: fadeIn 1s ease-out;
    margin-bottom: 20px;
    width: var(--container-width);
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}
/* Ensure dynamic search results content is left-aligned inside its result container */
.result-container {
    text-align: left !important; /* force override of any inherited centering */
    font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
.result-container .section,
.result-container .section-body,
.result-container .list,
.result-container .result-item,
.result-container .result-key,
.result-container .result-value,
.result-container p,
.result-container li,
.result-container ul,
.result-container ol {
    text-align: left !important;
    margin-left: 0;
}
/* Ensure dynamic search results content is left-aligned inside its result container */
.result-container {
    text-align: left !important; /* force override of inherited centering */
}
.result-container .section,
.result-container .section-body,
.result-container .list,
.result-container .result-item,
.result-container .result-key,
.result-container .result-value,
.result-container p,
.result-container li,
.result-container ul,
.result-container ol {
    text-align: left !important;
    margin-left: 0;
}

.light-theme .container, .light-theme .result-container {
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.9);
    border: 3px solid var(--text-color);
}

.small-container {
    width: 75%;
    display: inline-block;
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .small-container {
        width: 95%;
    }
}

.obdii-link {
    font-family: 'Arial', sans-serif;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: none;
    color: #e4b02a;
    text-decoration: none;
    -webkit-text-stroke: 1pxrgb(0, 0, 0);
    text-stroke: 1px #e4b02a;
}

.obdii-link:hover {
    color: #e4b02a;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Remove the global img sizing so it doesn't override logo sizing */
/* img sizing is controlled per-component (logo, icons, etc.) */

h1 {
    font-size: 1.8em;
    margin-top: 2px;
    margin-bottom: 10px;
    color: var(--highlight-color);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.light-theme h1 {
    text-shadow: none;
}

.info-text {
    margin: 2px 0 10px;
    font-size: 1.2em;
    color: var(--text-color);
}

form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

input[type="text"] {
    padding: 10px;
    width: 60%;
    border: none;
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--input-color);
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s, color 0.3s;
}

.light-theme input[type="text"] {
    box-shadow: none;
    border: 1px solid var(--text-color);
}

input[type="text"]::placeholder {
    color: #aaa;
}

/* Unified button style per request (keeps current theme colors) */
button,
input[type="submit"],
button.quick-start-btn,
.quick-start-btn {
    background: var(--button-bg);
    color: var(--button-color);
    font-family: inherit;
    padding: 0.6em 1.3em;
    font-weight: 900;
    font-size: 18px;
    border: 3px solid #000;
    border-radius: 0.4em;

    /* Use a dark offset shadow only (remove any light/white edge) */
    box-shadow: none; /* eliminate the solid/white-looking drop shadow globally */

    cursor: pointer;

    letter-spacing: 0.05rem;
    text-transform: uppercase;

    /* Lighter text outline to avoid halo artifacts */
    text-shadow:
      0.5px 0.5px 0 #000,
      1px 1px 0 #000;

    transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.2s ease;
}

/* Light theme keeps same dark offset shadow for consistency (no white edge) */
.light-theme button,
.light-theme input[type="submit"],
.light-theme .quick-start-btn {
    box-shadow: 0.1em 0.1em 0 rgba(0,0,0,0.9);
}

/* Hover uses provided offset/lift and keeps a single dark shadow */
button:hover,
input[type="submit"]:hover,
.quick-start-btn:hover {
    transform: translate(-0.05em, -0.05em);
    box-shadow: 0.15em 0.15em 0 rgba(0,0,0,0.9);
}
/* Keep outlined text on hover for all buttons */
button:hover,
input[type="submit"]:hover,
.quick-start-btn:hover {
    color: var(--button-color);
    text-shadow:
      0.25px 0.25px #000, 0.5px 0.5px #000, 0.75px 0.75px #000,
      1px 1px #000, 1.25px 1.25px #000, 1.5px 1.5px #000,
      1.75px 1.75px #000, 2px 2px #000;
}

/* Active uses provided pressed offset with a subtle dark shadow */
button:active,
input[type="submit"]:active,
.quick-start-btn:active {
    transform: translate(0.05em, 0.05em);
    box-shadow: 0.05em 0.05em 0 rgba(0,0,0,0.9);
}

.result-container {
    text-align: left;
    position: relative;
}

.light-theme .result-container {
    box-shadow: none;
    border: 1px solid var(--text-color);
}

.result-item {
    margin-bottom: 15px;
}

.result-key {
    font-weight: bold;
    color: var(--highlight-color);
    display: block;
    margin-bottom: 5px;
}

.result-value {
    margin-left: 20px;
}

.icon-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.icon-container img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    filter: drop-shadow(0 0 5px #000000);
    transition: transform 0.3s;
}

.light-theme .icon-container img {
    filter: none;
}

.icon-container img:hover {
    transform: scale(1.1);
}

.footer {
    width: 100%;
    text-align: center;
    position: relative;
    padding: 0;
    background: var(--footer-bg);
    margin-top: auto;
    border-top: 1px solid var(--footer-border);
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.5);
    left: 0;
    right: 0;
    bottom: 0;
}

.light-theme .footer {
    box-shadow: none;
}

.footer-link {
    font-size: 12px;
    color: var(--text-color);
    margin-bottom: 5px;
}

.footer-link a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-link a:hover {
    color: var(--highlight-color);
}

.footer .info-text {
    font-size: 7pt;
    color: #888;
    margin-top: 5px;
}

.google-search-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    text-align: center;
}

.google-search-link img {
    width: 25%;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.light-theme .google-search-link img {
    filter: none;
}

.google-search-link:hover img {
    transform: scale(1.1);
}

.google-search-link div {
    font-family: 'Roboto', sans-serif;
    font-size: 1.2em;
    color: var(--highlight-color);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    transition: color 0.3s ease;
}

.google-search-link div:hover {
    color: #d49a1f;
}

.error-message {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.5em;
    color: #ff4b4b;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
}

.suggestion-container {
    text-align: center;
    margin-top: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.2em;
}

.suggestion-container strong {
    color: var(--text-color);
}

.suggestion-container a {
    color: var(--highlight-color);
    text-decoration: none;
    margin: 0 5px;
    position: relative;
}

.suggestion-container a:not(:first-child)::before {
    content: '•';
    color: var(--text-color);
    margin-right: 5px;
    position: absolute;
    left: -10px;
}

.suggestion-container a:hover {
    text-decoration: underline;
    color: #d49a1f;
}

/* Quick Start button: requested green sweep style while keeping 3D retro depth */
/* Keep Quick Start specific layout bits while deferring visual style to global button */
.quick-start-btn {
    outline: none;
    margin-top: 16px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    /* keep same border radius feel as global */
    border-radius: 0.4em;
}
/* Quick Start hover uses the same global hover offsets; no unique overrides needed */
.quick-start-btn:hover { }
/* Prevent any color or outline change of text on hover */
.quick-start-btn:hover span {
    color: inherit !important;
    text-shadow:
      0.25px 0.25px #000, 0.5px 0.5px #000, 0.75px 0.75px #000,
      1px 1px #000, 1.25px 1.25px #000, 1.5px 1.5px #000,
      1.75px 1.75px #000, 2px 2px #000 !important;
}
.quick-start-btn:active {
    transform: translateY(1px);
    box-shadow:
      inset 0 1px 0 rgba(0,0,0,0.6),
      inset 0 -1px 0 rgba(255,255,255,0.06),
      0 1px 0 #000,
      0 4px 10px rgba(0,0,0,0.65);
}

/* Sweep overlay per request */
.quick-start-btn::before,
.quick-start-btn::after {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    content: "";
}
.quick-start-btn::before {
    /* Sweep overlay color aligned with submit button theme */
    background: #000;
    width: 120%;
    left: -10%;
    transform: skew(30deg);
    opacity: 0.12; /* subtle so brand color remains primary */
    transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
}
.quick-start-btn:hover::before {
    transform: translate3d(100%, 0, 0);
}
/* Soft highlight layer to enhance 3D during sweep */
.quick-start-btn::after {
    /* Soft highlight tuned for golden button */
    background: radial-gradient(120% 140% at 0% 50%, rgba(255,255,255,0.18), rgba(255,255,255,0) 60%);
    mix-blend-mode: screen;
    opacity: 0.45;
    transition: opacity 0.4s ease;
}
.quick-start-btn:hover::after {
    opacity: 0.75;
}
/* Ensure no hover animation changes the text outline */
.quick-start-btn:hover span {
    text-shadow:
      0.25px 0.25px #000, 0.5px 0.5px #000, 0.75px 0.75px #000,
      1px 1px #000, 1.25px 1.25px #000, 1.5px 1.5px #000,
      1.75px 1.75px #000, 2px 2px #000;
}

/* Text span transition/colors */
.quick-start-btn span {
    position: relative;
    z-index: 10;
    /* Keep text fixed across hover */
    transition: none !important;
    color: ghostwhite !important; /* constant */
    line-height: 1;
    display: inline-block;
    /* Keep strong outline-like shadow consistently */
    text-shadow:
      0.25px 0.25px #000, 0.5px 0.5px #000, 0.75px 0.75px #000,
      1px 1px #000, 1.25px 1.25px #000, 1.5px 1.5px #000,
      1.75px 1.75px #000, 2px 2px #000 !important;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
}

/* Make submit button text match Quick Start font styling (reinforcement) */
button[type="submit"] {
    letter-spacing: 0.05rem;
    text-transform: uppercase;
    font-weight: 800;
    text-shadow:
      0.25px 0.25px #000, 0.5px 0.5px #000, 0.75px 0.75px #000,
      1px 1px #000, 1.25px 1.25px #000, 1.5px 1.5px #000,
      1.75px 1.75px #000, 2px 2px #000;
}
/* Do not change text color/outline on hover (reinforced with !important above) */
.quick-start-btn:hover span {
    /* Lock font color on hover to prevent black override */
    color: ghostwhite !important;
}

/* Ensure container behavior */
.quick-start-btn { position: relative; overflow: hidden; }

/* Small-screen tweak */
@media (max-width: 480px) {
  .quick-start-btn {
    padding: 10px 16px;
    gap: 8px;
    border-radius: 6px;
  }
}

@keyframes textShadowPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.popup-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    position: relative;
    background: var(--container-bg);
    width: 90%;
    max-width: 800px;
    margin: 50px auto;
    padding: 10px; /* reduced to 25% of previous 40px */
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    color: var(--text-color);
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Smooth scrolling feel for long guides */
    scroll-behavior: smooth;
}

/* Dark-themed scrollbar with orange highlight for Quick Start popup (WebKit/Blink) */
.popup-content::-webkit-scrollbar {
    width: 12px;
}
.popup-content::-webkit-scrollbar-track {
    background: #111;               /* dark track */
    border-radius: 10px;
}
.popup-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #e4b02a, #d49a1f); /* orange highlight */
    border-radius: 10px;
    border: 2px solid #111;         /* creates inset look against dark track */
}
.popup-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f0bf3c, #e4b02a);
}

/* Firefox (Gecko) scrollbar colors */
.popup-content {
    scrollbar-width: thin;                          /* thin bar */
    scrollbar-color: #e4b02a #111;                  /* thumb color, track color */
}

/* Redesigned popup close button */
.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.18);
    background: linear-gradient(145deg, rgba(30,30,32,0.95), rgba(18,18,20,0.95));
    color: #efefef;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .2s ease, border-color .2s ease;
    box-shadow:
      0 2px 10px rgba(0,0,0,0.5),
      inset 0 0 0 1px rgba(255,255,255,0.04);
    backdrop-filter: blur(4px);
}
.popup-close-btn .popup-close-icon {
    pointer-events: none;
    filter: drop-shadow(0 1px 0 rgba(0,0,0,0.6));
}
.popup-close-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg, rgba(38,38,42,0.98), rgba(22,22,24,0.98));
    border-color: rgba(255,255,255,0.28);
    box-shadow:
      0 4px 14px rgba(0,0,0,0.6),
      inset 0 0 0 1px rgba(255,255,255,0.06);
}
.popup-close-btn:active {
    transform: translateY(0);
    box-shadow:
      0 2px 8px rgba(0,0,0,0.55),
      inset 0 0 0 1px rgba(255,255,255,0.04);
}
.popup-close-btn:focus-visible {
    outline: 2px solid var(--highlight-color);
    outline-offset: 2px;
}
/* Hide-only text for accessibility */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.popup-content h2 {
    color: var(--highlight-color);
    margin-bottom: 25px;
    font-size: 1.8em;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

/* Quick Start popup refinements */
.popup-content ol {
    padding-left: 25px;
    counter-reset: item;
    margin: 0;
}
.popup-content .qs-intro {
    font-size: 1rem;
    color: var(--text-color);
}
.popup-content .qs-steps > li {
    margin-bottom: 16px;
    line-height: 1.55;
}
.popup-content .qs-step-title {
    color: var(--highlight-color);
    font-weight: 700;
    margin-bottom: 6px;
}
.popup-content .qs-step-body {
    color: var(--text-color);
}
.popup-content .qs-bullets {
    margin: 8px 0 0 18px;
    padding-left: 6px;
}
.popup-content .qs-bullets li {
    margin: 6px 0;
}

.popup-content ol li {
    margin-bottom: 20px;
    line-height: 1.5;
    position: relative;
}

.popup-content ul {
    padding-left: 20px;
    margin-top: 15px;
    list-style-type: disc;
}

.popup-content ul li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-content strong {
    color: var(--highlight-color);
    font-weight: bold;
}

/* Ensure hidden for the alternate theme-toggle definition too */
.theme-toggle {
    display: none !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #000000;
    border-radius: 50%;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    font-size: 20px;
    color: #000000;
}

/* Keep hidden even in light theme */
.light-theme .theme-toggle {
    display: none !important;
    background-color: #000000;
    color: #000000;
}

.print-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.print-icon:hover {
    transform: scale(1.1);
}

/* Center ONLY the code header line on code pages */
.code-header {
    text-align: center !important;
    color: #e4b02a !important; /* brand gold override */
    font-size: clamp(1.6em, 6vw, 2.7em); /* responsive sizing */
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Explicit step-downs to ensure at least ~30% reduction on smaller screens */
@media (max-width: 900px) {
    .code-header { font-size: 2.1em; } /* ~22% smaller than 2.7em */
}
@media (max-width: 640px) {
    .code-header { font-size: 1.9em; } /* ~30% smaller than 2.7em */
}
@media (max-width: 520px) {
    .code-header { font-size: 1.8em; } /* ensure comfortable fit on very small screens */
}

/* Keep the same brand color in light theme as requested */
.light-theme .code-header {
    color: #e4b02a !important;
    text-shadow: none;
}

@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .container, .result-container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: none !important;
    }

    .logo-container img {
        max-width: 20% !important; /* Make logo smaller when printing */
    }

    .container h1, /* "Diagnose Your Check Engine Light" */
    .container .info-text, /* "Enter OBDII code below:" */
    .container form, /* Search bar and button */
    .container .quick-start-btn, /* Quick Start button */
    #common-codes-container, /* Common OBDII Codes */
    .container.small-container, /* What is an OBD2 Code? & How to Use an OBD2 Scanner */
    .print-icon, .theme-toggle, .footer, .products-section {
        display: none !important;
    }
    
    .code-header {
        margin-top: -80px !important; /* Move the code header up closer to the logo */
    }
}
/* Product Styles */
.products-section {
    margin: 40px 0;
    width: 100%;
}

.products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 20px auto;
    width: 90%;
    max-width: 1200px;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .products-container {
        width: 100%;
        padding: 0 10px;
    }
    .product-card {
        width: 100%;
        margin: 0;
    }
}

.product-card {
    background: var(--container-bg);
    border-radius: 10px;
    padding: 20px;
    width: calc(50% - 30px);
    min-width: 280px;
    max-width: 400px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 10px;
}

.light-theme .product-card {
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.9);
    border: 3px solid var(--text-color);
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-title {
    color: var(--highlight-color);
    font-size: 1.2em;
    font-weight: bold;
    margin: 10px 0;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
    transition: color 0.3s ease;
    cursor: pointer;
}

.product-title:hover {
    color: #d49a1f;
    text-decoration: underline;
}

.product-description {
    color: var(--text-color);
    font-size: 0.9em;
    margin: 10px 0;
    flex-grow: 1;
}

.product-rating {
    color: var(--highlight-color);
    margin: 10px 0;
}

.product-price {
    font-size: 1.4em;
    color: var(--highlight-color);
    font-weight: bold;
    margin: 10px 0;
}

.product-coupon {
    background-color: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    margin: 10px 0;
}

.product-link {
    background-color: var(--button-bg);
    color: var(--button-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
    display: inline-block;
}

.product-link:hover {
    background-color: #d49a1f;
}

/* (gallery and image popup styles removed) */

/* Codes Index styles (moved from inline in /codes for reuse) */
.codes-index .codes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.codes-index .code-link {
  display:block;
  padding:14px 10px;
  border:1px solid #333;
  border-radius:8px;
  background:#1f1f1f;
  color:var(--text-color);
  text-align:center;
  text-decoration:none;
  font-weight:500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.codes-index .code-link:hover {
  background:#ffa857;
  color:#000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.codes-index .pagination {
  display:flex;
  flex-wrap: wrap;
  gap:8px;
  margin-top:20px;
  align-items:center;
  justify-content: center;
}
.codes-index .pagination .btn,
.codes-index .pagination span {
  padding:8px 12px;
  border:1px solid #333;
  border-radius:6px;
  background:#1f1f1f;
  color:var(--text-color);
  text-decoration:none;
  min-width: 44px;
  text-align: center;
  transition: all 0.2s ease;
}
.codes-index .pagination .btn:hover {
  background:#ffa857;
  color:#000;
  border-color: #e4b02a;
}
.codes-index .pagination .current {
  background:#333;
  color:#fff;
  border-color:#555;
  font-weight: bold;
}
.codes-index .pagination .disabled {
  opacity: .4;
  pointer-events: none;
  cursor: not-allowed;
}
.codes-index .pagination .dots {
  padding: 8px 4px;
  color: #888;
}

/* Menu styles */
.menu-wrapper {
    width: 100%;
    display: flex;
    justify-content: center; /* center menu horizontally */
    align-items: center;
    margin: 10px 0 12px;     /* slightly tighter vertical spacing */
    padding-left: 0;
    padding-right: 0;
}
.menu-bar {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 0.75rem; /* keep compact inner padding; outer gutters handled by width below */
    background: #1a1a1a;
    border-radius: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
    width: 92%;              /* reduce left/right outer space relative to page edges */
    max-width: 900px;        /* allow a bit wider on large screens */
    margin-left: auto;       /* center the bar itself */
    margin-right: auto;
    justify-content: center; /* center contained buttons in the row */
}
:root {
    --container-width: 90%;
    --container-max: 900px;
}
.menu-button {
    position: relative;
    padding: 0.75rem 1.25rem;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, font-size 0.2s ease;
    z-index: 2;
    color: var(--text-color);
    text-decoration: none; /* if it's an anchor, keep it styled as a button */
    display: inline-block; /* anchors behave like the existing div buttons */
    font-size: 1rem; /* base ~16px */
}
.menu-button:hover {
    background: #ffa857; /* highlight color on hover */
    color: #000;         /* improve contrast on highlight */
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
}
.context-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: #2c2c2c;
    border: 1px solid #444;
    border-radius: 0.5rem;
    padding: 0.5rem;
    min-width: 200px;
    z-index: 10;
    font-size: 0.95rem; /* slightly smaller than top-level buttons */
}
/* Flip alignment for right-aligned dropdowns (Help, Contact) */
.menu-button.align-right .context-menu {
    left: auto;
    right: 0;              /* align top-right of menu with bottom-right of button */
}
.context-menu a, .context-menu div {
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background 0.2s, font-size 0.2s ease;
    color: var(--text-color);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    font-size: inherit; /* inherit from .context-menu */
}
.context-menu a:hover, .context-menu div:hover {
    background: #ffa857; /* match hover highlight */
    color: #000;         /* readable on highlight */
}
/* Ensure hover works even without JS as a fallback.
   The .show-menu class is toggled by a small JS helper to persist the menu ~120ms after mouse leaves. */
.menu-button:hover > .context-menu,
.menu-button:focus-within > .context-menu,
.menu-button.show-menu > .context-menu {
    display: block;
}

/* Gradual font scaling for menu and dropdowns on smaller screens */
@media (max-width: 900px) {
    /* Menu width */
    .menu-bar { width: 96%; max-width: 900px; margin-left: auto; margin-right: auto; justify-content: center; }
    /* Make all content containers match the menu width for congruent gutters */
    :root { --container-width: 96%; --container-max: 900px; }
    .menu-button { font-size: 0.95rem; }           /* ~15px */
    .context-menu { font-size: 0.9rem; }           /* ~14px */
}
@media (max-width: 760px) {
    .menu-bar { width: 97%; max-width: 760px; margin-left: auto; margin-right: auto; justify-content: center; }
    :root { --container-width: 97%; --container-max: 760px; }
    .menu-button { font-size: 0.9rem; }            /* ~14px */
    .context-menu { font-size: 0.85rem; }          /* ~13.6px */
}
@media (max-width: 640px) {
    .menu-bar { width: 98%; max-width: 640px; margin-left: auto; margin-right: auto; justify-content: center; }
    :root { --container-width: 98%; --container-max: 640px; }
    .menu-button { font-size: 0.75rem; }           /* ~13.6px */
    .context-menu { font-size: 0.7rem; }           /* ~12.8px */
}
@media (max-width: 520px) {
    .menu-bar { width: 98.5%; max-width: 520px; margin-left: auto; margin-right: auto; justify-content: center; }
    :root { --container-width: 99.5%; --container-max: 520px; }
    .menu-button { font-size: 1.1rem; }            /* ~12.8px */
    .context-menu { font-size: 0.95rem; }          /* ~12px */
}


@media (max-width: 600px) {
    .menu-bar {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .menu-button {
        padding: 0.5rem 0.9rem;
    }
}
    .tip-box {
        background-color: rgba(228, 176, 42, 0.1);
        padding: 15px;
        border-left: 4px solid var(--highlight-color);
        margin: 20px 0;
        border-radius: 0 5px 5px 0;
    }
.search-container {
    text-align: center;
    backdrop-filter: blur(10px);
    background: var(--container-bg);
    padding: 20px;
    border-radius: 10px;
    /* 50% less drop shadow (halve spread/blur and opacity) */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    animation: fadeIn 1s ease-out;
    margin: 16px auto;
    width: var(--container-width);   /* match containers */
    max-width: var(--container-max);
}
.search-container h1 {
    font-size: 1.2em; /* half the previous 1.8em */
    margin-top: 2px;
    margin-bottom: 6px; /* slightly tighter before the info line */
    color: var(--highlight-color);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}
.search-container .info-text { margin: 2px 0 8px; font-size: 1.0em; color: var(--text-color); } /* tighten spacing above the input */
/* Override search form styling to match requested Twitch-like input + icon button */
.search-container form.searchbar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px; /* as requested */
    gap: 0;       /* no gap; borders touch */
    margin-top: 0; /* remove extra space between label and input */
}

/* Input */
.search-container .searchbar-input {
    max-width: 250px;
    height: 100%;
    outline: none;
    font-size: 14px;
    font-weight: 500;
    background-color: #53535f;
    caret-color: #f7f7f8;
    color: #fff;
    padding: 7px 10px;
    border: 2px solid transparent;
    border-top-left-radius: 7px;
    border-bottom-left-radius: 7px;
    margin-right: 1px;
    transition: all .2s ease;
    box-shadow: none; /* remove previous inset shadow */
}
.search-container .searchbar-input:hover {
    border: 2px solid rgba(255, 255, 255, 0.16);
}
.search-container .searchbar-input:focus {
    border: 2px solid #ffa857;
    background-color: #0e0e10;
}

/* Button */
.search-container .searchbar-btn {
    border: none;
    cursor: pointer;
    background-color: rgba(42, 42, 45, 1);
    border-top-right-radius: 7px;
    border-bottom-right-radius: 7px;
    height: 100%;
    width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    /* Add the same offset-style shadow behavior as Quick Start button */
    box-shadow: 0.1em 0.1em 0 rgba(0,0,0,0.9);
    text-shadow: none;        /* keep icon text clean */
    border-left: 0;           /* flush with input */
}
.search-container .searchbar-btn:hover {
    background-color: rgba(54, 54, 56, 1);
    /* Match hover lift like Quick Start */
    transform: translate(-0.05em, -0.05em);
    box-shadow: 0.15em 0.15em 0 rgba(0,0,0,0.9);
}
.search-container .searchbar-btn svg {
    width: 22px;
    height: 22px;
    fill: #efeff1;
    filter: none;
    transition: filter 0.15s ease;
}
/* On hover, keep icon shadow; button now has offset shadow too */
.search-container .searchbar-btn:hover svg {
    filter: drop-shadow(1px 1px 0 #000);
}

/* Only center the top-level H1 inside search container and the code header on code pages */
.search-container h1 { color: var(--highlight-color); text-align:center; margin-top:0; }
/* Strongly center the code header H1 specifically inside the result container */
/* Center ONLY the code header, regardless of other left-align guards, and apply brand color */
.result-container > h1.code-header,
.container.result-container > h1.code-header,
.result-container h1.code-header {
  text-align: center !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  color: #e4b02a !important; /* brand gold for CODE {CODE} */
  font-family: 'Lexend', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}
.section { margin: 16px 0; }
/* Prevent global centering from affecting lists/paragraphs inside result-container */
.result-container .list p { margin-left: 0 !important; }
/* Prevent global centering from affecting lists/paragraphs inside result-container */
.result-container .list p { margin-left: 0 !important; }
/* Reduce spacing between the underline and the content below */
.section h2 { color: var(--highlight-color); border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom:2px; margin-bottom: 4px; }
.list p { margin: 6px 0; }
.meta { text-align:center; font-size:12px; color:#999; }
.section-body { margin-top: 4px; }
/* Tighter line-height utility for print */
.print-tight * { line-height: 1.2 !important; }
.breadcrumbs { font-size: 12px; margin-bottom: 10px; }
.breadcrumbs a { color: var(--text-color); text-decoration:none; }
.breadcrumbs a:hover { text-decoration: underline; }
.print-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}
.print-icon:hover { transform: scale(1.1); }

.print-logo-caption {
    display: none;
}

/* Beautiful Codes Directory Styling - Override all existing styles */
.codes-beautiful {
  /* Match the header menu and shared search container widths */
  width: var(--container-width);
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px;
}

/* Force override any existing link styles */
.codes-beautiful a,
.codes-beautiful a:link,
.codes-beautiful a:visited,
.codes-beautiful a:hover,
.codes-beautiful a:active {
  text-decoration: none !important;
}

/* Header Section */
.codes-header {
  text-align: center;
  margin-bottom: 40px;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
  padding: 30px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.breadcrumb-nav {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.breadcrumb-link {
  color: #fff !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-link:hover {
  color: #ffa857 !important;
}

.breadcrumb-separator {
  margin: 0 8px;
  color: #666;
}

.breadcrumb-current {
  color: #ffa857;
  font-weight: 500;
}

.codes-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #ffa857;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 700;
}

.codes-description {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Modern Search Section */
.search-section {
  margin-bottom: 40px;
}

.search-container-modern {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
  border-radius: 50px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-icon {
  display: flex;
  align-items: center;
  padding: 0 15px;
  font-size: 1.2rem;
  color: #888;
}

.search-input-modern {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 16px;
  padding: 15px 10px;
  outline: none;
}

.search-input-modern::placeholder {
  color: #888;
}

.search-btn-modern {
  background: linear-gradient(135deg, #ffa857, #e4b02a);
  color: #000;
  border: none;
  padding: 12px 24px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 168, 87, 0.3);
}

.search-btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 168, 87, 0.4);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

.suggestions-modern {
  max-width: 600px;
  margin: 10px auto 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.error-message {
  max-width: 600px;
  margin: 10px auto 0;
  padding: 15px;
  background: rgba(255, 77, 77, 0.1);
  border: 1px solid rgba(255, 77, 77, 0.3);
  border-radius: 8px;
  color: #ff6b6b;
  text-align: center;
}

/* Section Titles */
.section-title {
  font-size: 1.8rem;
  color: #ffa857;
  margin-bottom: 25px;
  text-align: center;
  font-weight: 600;
}

/* Letter Navigation */
.letter-navigation {
  margin-bottom: 50px;
}

/* Letter buttons layout:
   - Default: four in a single row (P B C U)
   - When space is insufficient: wrap as two columns and two rows,
     ensuring C and U move together to the next line (never a single item). */
.letter-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* four across by default */
  gap: 15px;
  max-width: 800px;                      /* widen container to allow 4 inline */
  margin: 0 auto;
}

/* When the viewport is narrower, force a 2x2 grid so C and U drop together */
@media (max-width: 720px) {
  .letter-buttons {
    grid-template-columns: repeat(2, 1fr); /* two per row -> P B / C U */
    max-width: 500px;
  }
}

/* Keep the very small breakpoints consistent with the 2x2 behavior */
@media (max-width: 480px) {
  .letter-buttons {
    grid-template-columns: repeat(2, 1fr);
    max-width: 360px;
  }
}

.letter-btn {
  display: flex !important;                 /* use flex to vertically center content */
  flex-direction: column;                   /* stack letter, label, desc */
  justify-content: center;                  /* vertical centering */
  align-items: center;                      /* horizontal centering */
  background: linear-gradient(135deg, #2a2a2a, #1f1f1f) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  padding: 15px 10px !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  text-align: center !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  color: inherit !important;
  min-height: 120px !important;
  aspect-ratio: 1 !important;
}

.letter-btn:hover,
.letter-btn:focus,
.letter-btn:active {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(255, 168, 87, 0.2) !important;
  border-color: #ffa857 !important;
  text-decoration: none !important;
}

.letter-btn:link,
.letter-btn:visited {
  text-decoration: none !important;
  color: inherit !important;
}

.letter-icon {
  display: none !important;
}

.letter-main {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.letter-btn:hover .letter-main {
  color: #ffa857;
}

.letter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 3px;
}

.letter-btn:hover .letter-label {
  color: #ffa857;
}

.letter-desc {
  font-size: 0.7rem;
  color: #aaa;
  line-height: 1.2;
}

/* Tables Styling */
.codes-table-section, .category-examples {
  margin-bottom: 50px;
}

.codes-table-container {
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.codes-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.codes-table th {
  background: linear-gradient(135deg, #ffa857, #e4b02a);
  color: #000;
  font-weight: 600;
  padding: 15px;
  text-align: left;
  border: none;
  font-size: 1rem;
}

.codes-table th:first-child {
  border-radius: 8px 0 0 0;
}

.codes-table th:last-child {
  border-radius: 0 8px 0 0;
}

.table-row {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.codes-table td {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(42, 42, 42, 0.5);
}

.code-cell {
  font-weight: 600;
}

.code-badge {
  display: inline-block;
  background: linear-gradient(135deg, #333, #222);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-family: monospace;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.code-badge.large {
  padding: 10px 20px;
  font-size: 1.1rem;
}

.category-cell {
  color: #ccc;
  font-weight: 500;
}

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

.code-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ffa857, #e4b02a) !important;
  color: #000 !important;
  text-decoration: none !important;
  padding: 5px 10px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 4px rgba(255, 168, 87, 0.3) !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.85rem !important;
}

.code-btn:hover,
.code-btn:focus,
.code-btn:active {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(255, 168, 87, 0.4) !important;
  color: #000 !important;
  text-decoration: none !important;
  background: linear-gradient(135deg, #ffb366, #f0b938) !important;
}

.code-btn:link,
.code-btn:visited {
  color: #000 !important;
  text-decoration: none !important;
}

.code-btn.primary {
  background: linear-gradient(135deg, #4ecdc4, #45b7d1) !important;
  box-shadow: 0 1px 4px rgba(78, 205, 196, 0.3) !important;
}

.code-btn.primary:hover {
  box-shadow: 0 2px 6px rgba(78, 205, 196, 0.4) !important;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.code-btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Category Examples */
.category-table-wrapper {
  margin-bottom: 30px;
}

.category-subtitle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 15px;
  font-weight: 600;
}

.category-icon {
  font-size: 1.5rem;
}

.mini-table-container {
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.mini-codes-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-codes-table td {
  padding: 8px;
  text-align: center;
}

.mini-code-btn {
  display: inline-block !important;
  background: linear-gradient(135deg, #333, #222) !important;
  color: #fff !important;
  text-decoration: none !important;
  /* 50% larger sizing vs original */
  padding: 6px 9px !important;        /* was 4px 6px */
  border-radius: 12px !important;      /* scale up corner radius */
  font-family: monospace !important;
  font-size: 1.125rem !important;      /* was 0.75rem */
  font-weight: 600 !important;         /* slightly bolder for readability */
  transition: all 0.3s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  min-width: 45px !important;          /* was 30px */
  text-align: center !important;
}

.mini-code-btn:hover,
.mini-code-btn:focus,
.mini-code-btn:active {
  color: #000 !important;
  background: #ffa857 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
  text-decoration: none !important;
}

.mini-code-btn:link,
.mini-code-btn:visited {
  color: #fff !important;
  text-decoration: none !important;
}

/* All remaining styles for letter codes, pagination, etc. */
.letter-codes-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.code-count {
  font-size: 1rem;
  opacity: 0.7;
  font-weight: normal;
}

.letter-nav-quick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-nav-btn {
  padding: 8px 16px;
  background: #333;
  color: #fff !important;
  text-decoration: none;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.quick-nav-btn:hover, .quick-nav-btn.active {
  background: #ffa857;
  color: #000 !important;
}

.back-btn {
  background: #555 !important;
}

.back-btn:hover {
  background: #666 !important;
  color: #fff !important;
}

/* All Codes Table */
.all-codes-table-container {
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow-x: auto;
}

.all-codes-table {
  width: 100%;
  border-collapse: collapse;
}

.all-codes-table th {
  background: linear-gradient(135deg, #ffa857, #e4b02a);
  color: #000;
  font-weight: 600;
  padding: 15px;
  text-align: left;
  border: none;
}

.all-codes-table th:first-child {
  border-radius: 8px 0 0 0;
}

.all-codes-table th:last-child {
  border-radius: 0 8px 0 0;
}

.codes-row {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

.all-codes-table td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(42, 42, 42, 0.3);
}

.type-cell {
  color: #ccc;
}

.type-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Pagination */
.pagination-modern {
  text-align: center;
  margin-top: 40px;
}

.pagination-info {
  margin-bottom: 20px;
  color: #ccc;
  font-size: 0.9rem;
}

.pagination-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #ffa857, #e4b02a);
  color: #000 !important;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(255, 168, 87, 0.3);
}

.pagination-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 168, 87, 0.4);
}

.pagination-numbers {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pagination-number {
  padding: 8px 12px;
  background: #333;
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination-number:hover, .pagination-number.active {
  background: #ffa857;
  color: #000 !important;
}

.pagination-dots {
  color: #666;
  padding: 0 5px;
}

/* No Codes Message */
.no-codes-message {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-codes-icon {
  font-size: 3rem;
  margin-bottom: 20px;
}

.no-codes-message h3 {
  color: #ffa857;
  margin-bottom: 15px;
}

.no-codes-message p {
  color: #ccc;
  margin-bottom: 30px;
}

.letter-btn.small {
  padding: 15px;
  max-width: 150px;
}

.letter-btn.small .letter-main {
  font-size: 2rem;
}

.letter-btn.small .letter-label {
  font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .codes-beautiful {
    padding: 15px;
  }
  
  .codes-title {
    font-size: 2rem;
  }
  
  .letter-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 350px;
  }
  
  .letter-btn {
    /* keep centered layout on medium screens */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 12px 8px !important;
    min-height: 100px !important;
  }
  
  .letter-main {
    font-size: 1.8rem;
  }
  
  .letter-label {
    font-size: 0.8rem;
  }
  
  .letter-desc {
    font-size: 0.65rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .codes-table-container,
  .all-codes-table-container {
    padding: 20px;
  }
  
  .codes-table th,
  .codes-table td,
  .all-codes-table th,
  .all-codes-table td {
    padding: 10px;
    font-size: 0.9rem;
  }
  
  .pagination-nav {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .search-container-modern {
    flex-direction: column;
    border-radius: 12px;
  }
  
  .search-btn-modern {
    border-radius: 8px;
    margin-top: 10px;
  }
  
  .letter-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 300px;
  }
  
  .letter-btn {
    /* keep centered layout on small screens */
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 6px !important;
    min-height: 85px !important;
    border-radius: 10px !important;
  }
  
  .letter-icon {
    font-size: 1.2rem;
    margin-bottom: 3px;
  }
  
  .letter-main {
    font-size: 1.5rem;
    margin-bottom: 2px;
  }
  
  .letter-label {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }
  
  .letter-desc {
    font-size: 0.6rem;
  }
  
  .code-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
  }
  
  .mini-code-btn {
    /* keep approx +50% scale on small screens too */
    padding: 9px 15px;
    font-size: 1.2rem;
    min-width: 75px;
  }
}

/* Extra small screens (385px and below) */
@media (max-width: 385px) {
  .codes-beautiful {
    padding: 10px;
  }
  
  .letter-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    max-width: 280px;
  }
  
  .letter-btn {
    padding: 8px 4px !important;
    min-height: 75px !important;
    border-radius: 8px !important;
  }
  
  .letter-icon {
    font-size: 1rem;
    margin-bottom: 2px;
  }
  
  .letter-main {
    font-size: 1.3rem;
    margin-bottom: 1px;
  }
  
  .letter-label {
    font-size: 0.65rem;
    margin-bottom: 1px;
  }
  
  .letter-desc {
    font-size: 0.55rem;
    line-height: 1.1;
  }
  
  .codes-title {
    font-size: 1.5rem;
  }
}

/* Override existing codes-index styles */
.codes-beautiful .codes-grid .code-link {
  color: #fff !important;
}

.codes-beautiful .codes-grid .code-link:hover {
  color: #000 !important;
  background: #ffa857 !important;
}

@media print {
    /* Keep print stable; no transform to avoid layout issues and apply condensed sizing */
    html, body { background: white !important; color: black !important; font-size: 80% !important; line-height: 1.35 !important; }

    .container {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        /* Remove extra outer margins for print to maximize page usage */
        margin: 0 !important;
        padding-top: 8px !important;
    }
    /* Hide inline search UI on print */
    .search-container { display: none !important; }
    /* Hide the top menu while printing */
    .menu-wrapper { display: none !important; }

    /* Position and size the logo for print: top-right, scaled with smaller text */
    .logo-container {
        position: relative !important;
        height: 0 !important; /* avoid taking vertical space */
    }
    
    /* Header Section */
    .codes-header {
      text-align: center;
      margin-bottom: 40px;
      background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
      padding: 30px;
      border-radius: 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .breadcrumb-nav {
      margin-bottom: 20px;
      font-size: 0.9rem;
    }
    
    .breadcrumb-link {
      color: #fff !important;
      text-decoration: none;
      transition: color 0.3s ease;
    }
    
    .breadcrumb-link:hover {
      color: #ffa857 !important;
    }
    
    .breadcrumb-separator {
      margin: 0 8px;
      color: #666;
    }
    
    .breadcrumb-current {
      color: #ffa857;
      font-weight: 500;
    }
    
    .codes-title {
      font-size: 2.5rem;
      margin-bottom: 15px;
      color: #ffa857;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
      font-weight: 700;
    }
    
    .codes-description {
      font-size: 1.1rem;
      color: #ccc;
      max-width: 800px;
      margin: 0 auto;
      line-height: 1.5;
    }
    
    /* Modern Search Section */
    .search-section {
      margin-bottom: 40px;
    }
    
    .search-container-modern {
      display: flex;
      max-width: 600px;
      margin: 0 auto;
      background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
      border-radius: 50px;
      padding: 8px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .search-icon {
      display: flex;
      align-items: center;
      padding: 0 15px;
      font-size: 1.2rem;
      color: #888;
    }
    
    .search-input-modern {
      flex: 1;
      border: none;
      background: transparent;
      color: #fff;
      font-size: 16px;
      padding: 15px 10px;
      outline: none;
    }
    
    .search-input-modern::placeholder {
      color: #888;
    }
    
    .search-btn-modern {
      background: linear-gradient(135deg, #ffa857, #e4b02a);
      color: #000;
      border: none;
      padding: 12px 24px;
      border-radius: 40px;
      font-weight: 600;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      transition: all 0.3s ease;
      box-shadow: 0 4px 12px rgba(255, 168, 87, 0.3);
    }
    
    .search-btn-modern:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(255, 168, 87, 0.4);
    }
    
    .btn-shine {
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      animation: shine 2s infinite;
    }
    
    @keyframes shine {
      0% { left: -100%; }
      50% { left: 100%; }
      100% { left: 100%; }
    }
    
    .suggestions-modern {
      max-width: 600px;
      margin: 10px auto 0;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    
    .error-message {
      max-width: 600px;
      margin: 10px auto 0;
      padding: 15px;
      background: rgba(255, 77, 77, 0.1);
      border: 1px solid rgba(255, 77, 77, 0.3);
      border-radius: 8px;
      color: #ff6b6b;
      text-align: center;
    }
    
    /* Section Titles */
    .section-title {
      font-size: 1.8rem;
      color: #ffa857;
      margin-bottom: 25px;
      text-align: center;
      font-weight: 600;
    }
    
    /* Letter Navigation */
    .letter-navigation {
      margin-bottom: 50px;
    }
    
    .letter-buttons {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 20px;
      max-width: 1000px;
      margin: 0 auto;
    }
    
    .letter-btn {
      display: block;
      background: linear-gradient(135deg, #2a2a2a, #1f1f1f);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 16px;
      padding: 25px;
      text-decoration: none;
      transition: all 0.3s ease;
      text-align: center;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }
    
    .letter-btn:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 24px rgba(255, 168, 87, 0.2);
      border-color: #ffa857;
    }
    
    .letter-icon {
      font-size: 2rem;
      margin-bottom: 10px;
    }
    
    .letter-main {
      font-size: 3rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 8px;
    }
    
    .letter-btn:hover .letter-main {
      color: #ffa857;
    }
    
    .letter-label {
      font-size: 1.2rem;
      font-weight: 600;
      color: #fff;
      margin-bottom: 5px;
    }
    
    .letter-btn:hover .letter-label {
      color: #ffa857;
    }
    
    .letter-desc {
      font-size: 0.9rem;
      color: #aaa;
    }
    
    /* Tables Styling */
    .codes-table-section, .category-examples {
      margin-bottom: 50px;
    }
    
    .codes-table-container {
      background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
      border-radius: 16px;
      padding: 30px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.1);
      overflow-x: auto;
    }
    
    .codes-table {
      width: 100%;
      border-collapse: collapse;
      margin: 0;
    }
    
    .codes-table th {
      background: linear-gradient(135deg, #ffa857, #e4b02a);
      color: #000;
      font-weight: 600;
      padding: 15px;
      text-align: left;
      border: none;
      font-size: 1rem;
    }
    
    .codes-table th:first-child {
      border-radius: 8px 0 0 0;
    }
    
    .codes-table th:last-child {
      border-radius: 0 8px 0 0;
    }
    
    .table-row {
      animation: fadeInUp 0.6s ease forwards;
      opacity: 0;
    }
    
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .codes-table td {
      padding: 15px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(42, 42, 42, 0.5);
    }
    
    .code-cell {
      font-weight: 600;
    }
    
    .code-badge {
      display: inline-block;
      background: linear-gradient(135deg, #333, #222);
      color: #fff;
      padding: 8px 16px;
      border-radius: 20px;
      font-family: monospace;
      font-size: 1rem;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .code-badge.large {
      padding: 10px 20px;
      font-size: 1.1rem;
    }
    
    .category-cell {
      color: #ccc;
      font-weight: 500;
    }
    
    .action-cell {
      text-align: right;
    }
    
    .code-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      background: linear-gradient(135deg, #ffa857, #e4b02a);
      color: #000 !important;
      text-decoration: none;
      padding: 10px 20px;
      border-radius: 25px;
      font-weight: 600;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(255, 168, 87, 0.3);
    }
    
    .code-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 168, 87, 0.4);
      color: #000 !important;
    }
    
    .code-btn.primary {
      background: linear-gradient(135deg, #4ecdc4, #45b7d1);
      box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    }
    
    .code-btn.primary:hover {
      box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
    }
    
    .btn-arrow {
      font-size: 1.1rem;
      transition: transform 0.3s ease;
    }
    
    .code-btn:hover .btn-arrow {
      transform: translateX(3px);
    }
    
    /* Category Examples */
    .category-table-wrapper {
      margin-bottom: 30px;
    }
    
    .category-subtitle {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 1.3rem;
      color: #fff;
      margin-bottom: 15px;
      font-weight: 600;
    }
    
    .category-icon {
      font-size: 1.5rem;
    }
    
    .mini-table-container {
      background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
      border-radius: 12px;
      padding: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    }
    
    .mini-codes-table {
      width: 100%;
      border-collapse: collapse;
    }
    
    .mini-codes-table td {
      padding: 8px;
      text-align: center;
    }
    
    .mini-code-btn {
      display: inline-block;
      background: linear-gradient(135deg, #333, #222);
      color: #fff !important;
      text-decoration: none;
      padding: 8px 12px;
      border-radius: 15px;
      font-family: monospace;
      font-size: 0.9rem;
      font-weight: 500;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.2);
      min-width: 60px;
    }
    
    .mini-code-btn:hover {
      color: #000 !important;
      background: var(--accent-color, #ffa857);
      transform: translateY(-2px);
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Letter Codes Section */
    .letter-codes-section {
      margin-bottom: 40px;
    }
    
    .section-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 30px;
      flex-wrap: wrap;
      gap: 20px;
    }
    
    .code-count {
      font-size: 1rem;
      opacity: 0.7;
      font-weight: normal;
    }
    
    .letter-nav-quick {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
    }
    
    .quick-nav-btn {
      padding: 8px 16px;
      background: #333;
      color: #fff !important;
      text-decoration: none;
      border-radius: 20px;
      font-weight: 500;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .quick-nav-btn:hover, .quick-nav-btn.active {
      background: #ffa857;
      color: #000 !important;
    }
    
    .back-btn {
      background: #555 !important;
    }
    
    .back-btn:hover {
      background: #666 !important;
      color: #fff !important;
    }
    
    /* All Codes Table */
    .all-codes-table-container {
      background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
      border-radius: 16px;
      padding: 30px;
      margin-bottom: 30px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.1);
      overflow-x: auto;
    }
    
    .all-codes-table {
      width: 100%;
      border-collapse: collapse;
    }
    
    .all-codes-table th {
      background: linear-gradient(135deg, #ffa857, #e4b02a);
      color: #000;
      font-weight: 600;
      padding: 15px;
      text-align: left;
      border: none;
    }
    
    .all-codes-table th:first-child {
      border-radius: 8px 0 0 0;
    }
    
    .all-codes-table th:last-child {
      border-radius: 0 8px 0 0;
    }
    
    .codes-row {
      animation: fadeInUp 0.4s ease forwards;
      opacity: 0;
    }
    
    .all-codes-table td {
      padding: 12px 15px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      background: rgba(42, 42, 42, 0.3);
    }
    
    .type-cell {
      color: #ccc;
    }
    
    .type-label {
      font-size: 0.9rem;
      opacity: 0.8;
    }
    
    /* Pagination */
    .pagination-modern {
      text-align: center;
      margin-top: 40px;
    }
    
    .pagination-info {
      margin-bottom: 20px;
      color: #ccc;
      font-size: 0.9rem;
    }
    
    .pagination-nav {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    
    .pagination-btn {
      padding: 10px 20px;
      background: linear-gradient(135deg, #ffa857, #e4b02a);
      color: #000 !important;
      text-decoration: none;
      border-radius: 25px;
      font-weight: 600;
      transition: all 0.3s ease;
      box-shadow: 0 2px 8px rgba(255, 168, 87, 0.3);
    }
    
    .pagination-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 168, 87, 0.4);
    }
    
    .pagination-numbers {
      display: flex;
      gap: 5px;
      align-items: center;
    }
    
    .pagination-number {
      padding: 8px 12px;
      background: #333;
      color: #fff !important;
      text-decoration: none;
      border-radius: 6px;
      transition: all 0.3s ease;
      min-width: 40px;
      text-align: center;
    }
    
    .pagination-number:hover, .pagination-number.active {
      background: #ffa857;
      color: #000 !important;
    }
    
    .pagination-dots {
      color: #666;
      padding: 0 5px;
    }
    
    /* No Codes Message */
    .no-codes-message {
      text-align: center;
      padding: 60px 20px;
      background: linear-gradient(135deg, rgba(31, 31, 31, 0.95), rgba(20, 20, 20, 0.98));
      border-radius: 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .no-codes-icon {
      font-size: 3rem;
      margin-bottom: 20px;
    }
    
    .no-codes-message h3 {
      color: #ffa857;
      margin-bottom: 15px;
    }
    
    .no-codes-message p {
      color: #ccc;
      margin-bottom: 30px;
    }
    
    .letter-btn.small {
      padding: 15px;
      max-width: 150px;
    }
    
    .letter-btn.small .letter-main {
      font-size: 2rem;
    }
    
    .letter-btn.small .letter-label {
      font-size: 1rem;
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
      .codes-beautiful {
        padding: 15px;
      }
      
      .codes-title {
        font-size: 2rem;
      }
      
      .letter-buttons {
        grid-template-columns: 1fr;
      }
      
      .section-header {
        flex-direction: column;
        align-items: flex-start;
      }
      
      .codes-table-container,
      .all-codes-table-container {
        padding: 20px;
      }
      
      .codes-table th,
      .codes-table td,
      .all-codes-table th,
      .all-codes-table td {
        padding: 10px;
        font-size: 0.9rem;
      }
      
      .pagination-nav {
        flex-direction: column;
        gap: 15px;
      }
    }
    
    @media (max-width: 480px) {
      .search-container-modern {
        flex-direction: column;
        border-radius: 12px;
      }
      
      .search-btn-modern {
        border-radius: 8px;
        margin-top: 10px;
      }
      
      .code-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
      }
      
      .mini-code-btn {
        /* print small-screen override scaled up accordingly */
        padding: 9px 15px;
        font-size: 1.2rem;
        min-width: 75px;
      }
    }
    
    /* Override existing codes-index styles */
    .codes-beautiful .codes-grid .code-link {
      color: #fff !important;
    }
    
    .codes-beautiful .codes-grid .code-link:hover {
      color: #000 !important;
      background: #ffa857 !important;
    }
    .logo-container a {
        position: static !important;
    }
    .logo-container img {
        position: fixed !important;
        top: 0mm !important;
        right: 5mm !important;
        max-width: 90px !important; /* slightly reduced to harmonize with 70% text scale */
        height: auto !important;
        filter: none !important;
        z-index: 1000 !important;
    }
    /* Print-only caption under the fixed logo, scaled for condensed print */
    .print-logo-caption {
        display: block !important;
        position: fixed !important;
        top: 22mm !important; /* appears beneath the 0mm-tall fixed logo */
        right: 5mm !important;
        font-weight: 800 !important;
        letter-spacing: 0.16em !important;
        font-size: 8.5pt !important; /* reduced to align with 70% scaling */
        color: #000 !important;
        z-index: 1000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        text-transform: uppercase;
    }

    /* Force visible divider under section headers when printing */
    .section h2 {
        border-bottom: 1px solid #000 !important;
        padding-bottom: 6px !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .print-icon { display: none !important; }
    /* Collapse browser header/footer area by using very small top/bottom margins,
       and widen printable area by reducing left/right margins. Note: actual
       removal of system headers/footers depends on browser print settings,
       but this minimizes page margins to fit more content per page. */
    @page {
        size: auto;
        margin: 4mm 10mm 4mm 10mm; /* top right bottom left */
    }
}
