/* ---------------------------------------------------------------
   RESET & ROOT VARIABLES
--------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --background-color: #000000;
    --text-color: #ffffff;
    --line-color: #ffffff;
    --highlight-color: #333333;
    --link-color: #ffffff;

    --header-height: 80px;
    --footer-height: 60px;
    --transition-speed: 0.3s;

    /* Side menu widths - increased for better icon display */
    --side-menu-width-desktop: 100px;
    --side-menu-width-mobile: 70px;

    /* Icon sizes */
    --menu-icon-size-desktop: 60px;
    --menu-icon-size-mobile: 40px;

    /* Multiplier for header title size on mobile (title.png) */
    --header-title-size-mobile-multiplier: 1.5;
}

/* Light Theme Variables */
[data-theme="light"] {
    --background-color: #ffffff;
    --text-color: #000000;
    --line-color: #000000;
    --highlight-color: #eeeeee;
    --link-color: #000000;
}

/* ---------------------------------------------------------------
   BASE BODY STYLES
--------------------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
    font-size: 16px;
    transition:
      font-size var(--transition-speed) ease,
      background-color var(--transition-speed) ease,
      color var(--transition-speed) ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    :root {
        --header-height: 60px;
    }
}
@media (min-width: 1200px) {
    body {
        font-size: 18px;
    }
}

/* ---------------------------------------------------------------
   HEADER
--------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1007;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center; /* default center for landscape */
    padding: 10px 20px;
    background-color: var(--background-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Hamburger menu pinned left */
#menu-icon-container {
    position: absolute;
    left: 15px; /* Desktop default */
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1008;
    margin: 0 10px;
}
#menu-icon-container img {
    width: var(--menu-icon-size-desktop);
    height: auto;
    object-fit: contain;
}

/* Title Image styling - default */
#header-image-title {
    max-height: var(--menu-icon-size-desktop);
    width: auto;
    position: relative;
    margin: 0 auto;
}

/* Hide leftover header text */
#header-text-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------
   MOBILE PORTRAIT ADJUSTMENTS
------------------------------- */
@media (max-width: 768px) and (orientation: portrait) {
    @media (max-width: 768px) {
        .site-header {
            height: var(--header-height);
            padding: 10px;
        }
        #menu-icon-container img {
            width: var(--menu-icon-size-mobile);
            height: var(--menu-icon-size-mobile);
            margin-left: -6px;
        }
        #header-image-title {
            max-height: var(--menu-icon-size-mobile);
            width: auto;
            position: relative;
            margin: 0 auto;
            max-height: calc(var(--menu-icon-size-mobile) * 1.25);
            max-width: calc(100% - 100px);
        }
    }
}

/* ---------------------------------------------------------------
   POETRY ICONS (top center or top left)
--------------------------------------------------------------- */
#poetry-icons {
    position: fixed;
    top: 20px;
    z-index: 1999;
    display: none;
    gap: 20px;
    align-items: center;
}
#poetry-icons img {
    cursor: pointer;
    opacity: 1;
    object-fit: contain;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}
@media (min-width: 769px) {
    #poetry-icons {
        left: 50%;
        transform: translateX(-50%);
    }
    #poetry-icons img {
        width: var(--menu-icon-size-desktop);
        height: auto;
    }
    #poetry-icons img:hover {
        transform: scale(1.2);
        opacity: 0.9;
    }
}
@media (max-width: 768px) {
    #poetry-icons {
        left: 70px;
        top: 10px;
        gap: 15px;
        transform: none;
    }
    #poetry-icons img {
        width: var(--menu-icon-size-mobile);
        height: auto;
    }
    #poetry-icons img:hover {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* ---------------------------------------------------------------
   GAMES ICONS (top row - same as poetry icons)
--------------------------------------------------------------- */
#games-icons {
    position: fixed;
    top: 20px;
    z-index: 2000;
    display: none;
    gap: 20px;
    align-items: center;
}
@media (min-width: 769px) {
    #games-icons {
        left: 50%;
        transform: translateX(-50%);
    }
    #games-icons img {
        width: var(--menu-icon-size-desktop);
        height: auto;
        cursor: pointer;
        object-fit: contain;
        transition: transform var(--transition-speed) ease;
    }
    #games-icons img:hover {
        transform: scale(1.2);
    }
}
@media (max-width: 768px) {
    #games-icons {
        left: 50%;
        transform: translateX(-50%);
    }
    #games-icons img {
        width: var(--menu-icon-size-mobile);
        height: auto;
        cursor: pointer;
        object-fit: contain;
        transition: transform var(--transition-speed) ease;
    }
    #games-icons img:hover {
        transform: scale(1.1);
    }
}

/* ---------------------------------------------------------------
   SIDE MENU
--------------------------------------------------------------- */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--side-menu-width-desktop);
    height: 100%;
    background-color: var(--background-color);
    z-index: 1005;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: calc(var(--header-height) + 10px);
    transition: transform var(--transition-speed) ease;
    overflow-y: auto;
    transform: translateX(-100%);
}
body.menu-open .side-menu {
    transform: translateX(0);
}
/* On mobile, override the side-menu width */
@media (max-width: 768px) {
    .side-menu {
        width: var(--side-menu-width-mobile);
    }
}
.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.side-menu li {
    width: 100%;
    text-align: center;
    margin: 15px 0;
}
.side-menu a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    width: 100%;
    padding: 10px 0;
}
.side-menu a:hover {
    background-color: var(--highlight-color);
}

/* Updated side-menu icon styling to preserve aspect ratio */
.side-menu-icon {
    width: 100%;
    max-width: var(--menu-icon-size-desktop);
    height: auto;
    margin: 0 auto 8px auto;
    object-fit: contain;
    transition: transform var(--transition-speed) ease;
    display: block;
    box-sizing: content-box;
}
@media (max-width: 768px) {
    .side-menu-icon {
        max-width: var(--menu-icon-size-mobile);
        /* Adjust margins so that the right margin is smaller than left */
        margin: 0 4px 8px 8px;
    }
}

/* Side-menu text: Resize font based on available side-menu width */
@media (min-width: 769px) {
    .menu-text {
        font-size: calc(var(--side-menu-width-desktop) * 0.15);
    }
}
@media (max-width: 768px) {
    .menu-text {
        font-size: calc(var(--side-menu-width-mobile) * 0.15);
        max-width: var(--menu-icon-size-mobile);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ---------------------------------------------------------------
   MAIN CONTENT
--------------------------------------------------------------- */
#main-content {
    position: relative;
    z-index: 50;
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: calc(var(--footer-height) + 30px);
    flex: 1;
}
@media (max-width: 768px) {
    #main-content {
        width: 90%;
        margin: 0 auto;
        max-width: 100%;
        padding-top: calc(var(--header-height) + 10px);
    }
}
@media (min-width: 1200px) {
    #main-content {
        font-size: 1.2em;
    }
}
#main-content p {
    margin-bottom: 30px;
    line-height: 1.8;
}
#main-content p:first-of-type {
    margin-top: 20px;
}
#main-content.games-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* ---------------------------------------------------------------
   FOOTER
--------------------------------------------------------------- */
#main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: var(--background-color);
    border-top: 1px solid var(--line-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1004;
    padding: 0 20px 5px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.footer-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.footer-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}
#main-footer img {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform var(--transition-speed) ease, opacity var(--transition-speed) ease;
}
#main-footer img:hover {
    transform: scale(1.1);
    opacity: 0.8;
}
#main-footer span {
    font-size: 0.9rem;
}
@media (max-width:768px){
    #main-footer {
        padding: 0 10px 5px 10px;
    }
    .footer-left {
        gap: 10px;
    }
}

/* Language toggle in footer */
#language-toggle {
    cursor: pointer;
    color: var(--text-color);
    background-color: var(--background-color);
    border: 1px solid var(--line-color);
    padding: 0.4em 0.8em;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    margin-left: 10px;
}
#language-toggle:hover {
    background-color: var(--highlight-color);
    transform: scale(1.05);
}

/* ---------------------------------------------------------------
   CALENDAR
--------------------------------------------------------------- */
.calendar-container {
  margin: 40px auto;
  max-width: 600px;
  padding: 20px;
  border: 1px solid var(--line-color);
  width: 100%;
  text-align: center;
}
.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.calendar-table th,
.calendar-table td {
  border: 1px solid var(--line-color);
  padding: 0.8em 0.5em;
  text-align: center;
}

/* ---------------------------------------------------------------
   POEM LIST OVERLAY
--------------------------------------------------------------- */
#poem-list-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.85);
    color: #fff;
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#poem-list-overlay.show {
    display: block;
    opacity: 1;
}
#poem-list-close-btn {
    position: absolute;
    top: 15px; right: 20px;
    background: transparent;
    color: #fff;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    z-index: 10000;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-speed) ease;
}
#poem-list-close-btn:hover {
    background-color: rgba(255,255,255,0.1);
}
#poem-list-container {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    max-height: 80vh;
    width: 90%; max-width: 600px;
    overflow-y: auto;
    background-color: var(--background-color);
    border: 1px solid var(--line-color);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.poem-list-item {
    padding: 12px 10px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line-color);
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    text-align: center;
    border-radius: 4px;
}
.poem-list-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}
.poem-list-item:hover {
    background-color: var(--highlight-color);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------------
   READING OVERLAY
--------------------------------------------------------------- */
#poem-reading-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.92);
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow: hidden;
}
#poem-reading-overlay.show {
    display: flex;
    opacity: 1;
}
#poem-reading-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0 15px calc(var(--footer-height)+20px) 15px;
    box-sizing: border-box;
    overflow: hidden;
}
#poem-overlay-close {
    position: absolute;
    top: 10px; right: 15px;
    cursor: pointer;
    font-size: 1.5em;
    font-weight: bold;
    border: none; background: transparent;
    color: #fff;
    z-index: 10000;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background-color var(--transition-speed) ease;
}
#poem-overlay-close:hover {
    background-color: rgba(255,255,255,0.1);
}
#poem-overlay-title-container {
    width: 100%;
    margin: 0; padding: 5px 0;
    text-align: center;
    background-color: #000;
    position: sticky; top: 0;
    z-index: 5;
}
#poem-overlay-title {
    margin: 0;
    font-size: 1.5em;
    text-align: center;
    font-weight: 500;
    padding: 5px 10px;
    display: inline-block;
    line-height: 1.2;
}
#poem-overlay-scroll-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 10px;
    padding: 0 10px 20px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}
#poem-overlay-scroll-container::-webkit-scrollbar {
    width: 6px;
}
#poem-overlay-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}
#poem-overlay-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.3);
    border-radius: 10px;
}
#poem-overlay-content {
    white-space: pre-wrap;
    line-height: 1.7em;
    font-size: 1.2rem;
    text-align: left;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}
@media (orientation: portrait) {
    #poem-reading-container {
        padding: 0 10px calc(var(--footer-height)+15px) 10px;
    }
    #poem-overlay-title {
        font-size: 1.3em;
    }
    #poem-overlay-content {
        font-size: 1.1rem;
        line-height: 1.6em;
    }
}
@media (max-width: 480px) {
    #poem-overlay-title {
        font-size: 1.2em;
    }
    #poem-overlay-content {
        font-size: 1rem;
    }
    #poem-reading-container {
        padding: 0 10px calc(var(--footer-height)+10px) 10px;
    }
}

/* ---------------------------------------------------------------
   CONTACT FORM
--------------------------------------------------------------- */
#contact-form-container {
    margin: 40px auto;
    max-width: 600px;
    padding: 20px;
    border: 1px solid var(--line-color);
    background-color: var(--background-color);
    color: var(--text-color);
    border-radius: 8px;
    box-sizing: border-box;
}
#contact-form-container #page-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.8em;
    text-align: center;
}
#contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
#contact-form label {
    font-size: 0.95em;
    font-weight: 500;
    margin-bottom: 4px;
}
#contact-form input[type="email"],
#contact-form textarea {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--line-color);
    padding: 10px;
    border-radius: 4px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.3s ease;
}
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
    border-color: var(--highlight-color);
}
#contact-form textarea {
    min-height: 120px;
    resize: vertical;
}
.cf-turnstile {
    margin-top: 10px;
    margin-bottom: 10px;
}
#contact-form button[type="submit"] {
    cursor: pointer;
    background-color: var(--text-color);
    color: var(--background-color);
    border: none;
    padding: 0.6em 1.2em;
    font-size: 1em;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
#contact-form button[type="submit"]:hover {
    transform: scale(1.03);
}
@media (max-width:480px){
    #contact-form-container {
        margin: 20px auto;
        padding:15px;
    }
    #contact-form-container #page-title {
        font-size:1.4em;
        margin-bottom:16px;
    }
    #contact-form button[type="submit"] {
        font-size:0.95em;
        padding:0.5em 1em;
    }
}
@media (min-width:1200px){
    #contact-form-container #page-title {
        font-size:2em;
    }
    #contact-form label {
        font-size:1em;
    }
    #contact-form button[type="submit"] {
        font-size:1.1em;
    }
}

/* ---------------------------------------------------------------
   15-PUZZLE
--------------------------------------------------------------- */
.puzzle-game {
  display: grid;
  grid-template-columns: repeat(4,60px);
  grid-template-rows: repeat(4,60px);
  gap:5px;
  justify-content:center;
  margin:20px 0;
}
.puzzle-tile {
  display:flex;
  align-items:center;
  justify-content:center;
  background-color:var(--background-color);
  border:1px solid var(--line-color);
  font-size:1.2em;
  font-weight:bold;
  transition:background-color 0.2s ease;
  cursor:pointer;
  width:60px; height:60px;
}
.puzzle-tile.empty {
  background-color: var(--highlight-color);
  cursor:default;
  font-weight:normal;
}
.win-overlay {
  position:fixed; top:0; left:0;
  width:100vw; height:100vh;
  background:rgba(0,0,0,0.8);
  opacity:0; z-index:20000;
  display:flex; align-items:center; justify-content:center;
  transition:opacity 0.5s ease;
}
.win-overlay.visible {
  opacity:1;
}
.win-overlay-content {
  text-align:center; color:#fff;
}

/* ---------------------------------------------------------------
   SLOT MACHINE
--------------------------------------------------------------- */
#slot-machine-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    padding-bottom: 80px;
}
.slot-machine-reel {
    position: relative;
    width: 100%;
    height: 70vh; 
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 90px);
    overflow: hidden;
    border: 2px solid var(--line-color);
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slot-machine-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
.slot-machine-item {
    display: block;
    text-align: center;
    font-size: 1.1em;
    line-height: 50px;
    height: 50px;
    background: var(--background-color);
    color: var(--text-color);
    border-bottom: 1px dashed var(--line-color);
}
#slot-machine-spin {
    position: fixed;
    bottom: calc(var(--footer-height) + 15px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.6em 1.4em;
    background-color: var(--text-color);
    color: var(--background-color);
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    transition: transform 0.2s ease;
    z-index: 1000;
}
#slot-machine-spin:hover {
    transform: translateX(-50%) scale(1.05);
}
#slot-machine-highlight {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 2px;
    background-color: #ffffff;
    pointer-events: none;
    z-index: 10;
}
@supports (-webkit-touch-callout: none) {
  #slot-machine-container {
    padding-bottom: 60px;
  }
  .slot-machine-reel {
    height: 65vh;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 75px);
  }
  #slot-machine-spin {
    bottom: calc(var(--footer-height) + 10px);
  }
}
@media (max-width: 480px) {
  #slot-machine-container {
    padding: 10px;
    padding-bottom: 70px;
  }
  .slot-machine-reel {
    height: 70vh;
    min-height: 250px;
  }
}
@media (max-width: 430px) and (max-height: 932px) and (-webkit-device-pixel-ratio: 2),
       (max-width: 430px) and (max-height: 932px) and (-webkit-device-pixel-ratio: 3) {
  .slot-machine-reel {
    height: 65vh;
    max-height: calc(100vh - var(--header-height) - var(--footer-height) - 80px);
  }
  #slot-machine-spin {
    bottom: calc(var(--footer-height) + env(safe-area-inset-bottom, 0px) + 6px);
  }
}

/* ---------------------------------------------------------------
   ANALYSIS SECTION
--------------------------------------------------------------- */
/* Force analysis content to stack vertically rather than side-by-side */
.analysis-poem-content {
    display: flex;
    flex-direction: column;
    gap: 1em;
    margin-bottom: 2em;
    flex-wrap: nowrap;
}
.analysis-poem-container {
  margin-bottom: 2em;
  border: 1px solid #666;
  padding: 1em;
}
.analysis-poem-title {
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #eee;
  background-color: #333;
  padding: 0.5em;
  cursor: pointer;
  position: relative;
}
.analysis-title-right {
  float: right;
  font-weight: normal;
  color: #ccc;
  margin-left: 1em;
}
.analysis-container {
  margin-top: 1em;
}
.analysis-summary {
  background-color: #333;
  border: 1px solid #666;
  padding: 1em;
  margin-bottom: 1em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.analysis-summary h4 {
  margin-top: 0;
  margin-bottom: 0.5em;
}

/* The analysis boxes now stack vertically */
.analysis-lines-block, .analysis-commentary-block {
  border: 1px solid #666;
  padding: 1em;
  flex: 1;
  min-height: 150px;
  overflow-wrap: break-word;
}
.analysis-lines-block pre,
.analysis-commentary-block pre {
  margin: 0;
  padding: 0;
  line-height: 1.4em;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.analysis-line {
  cursor: pointer;
}
.analysis-line:hover {
  background-color: #444;
}
.hidden {
  display: none;
}

/* ---------------------------------------------------------------
   Q/A OVERLAY FOR WORKER GATING
--------------------------------------------------------------- */
#qa-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8);
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#qa-overlay.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
}
#qa-container {
    background-color: #111;
    padding: 20px;
    border: 2px solid #fff;
    border-radius: 5px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    box-sizing: border-box;
    margin: 10vh auto;
}
#qa-question {
  margin-bottom: 1em;
}
#qa-input {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 1em;
  border: 1px solid #ccc;
  color: #000;
  border-radius: 4px;
  font-size: 16px;
}
#qa-submit {
  padding: 0.5em 1em;
  cursor: pointer;
  background-color: var(--text-color);
  color: var(--background-color);
  border: none;
  border-radius: 4px;
  font-weight: bold;
  transition: transform 0.2s ease;
}
#qa-submit:hover {
  transform: scale(1.05);
}

/* ---------------------------------------------------------------
   Properly hide elements when needed
--------------------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0,0,0,0); 
  white-space: nowrap; 
  border: 0;
}
