body {
  font-family: 'Open Sans', Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 100%;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden; /* Prevent horizontal scroll and hide off-screen menu */
}

h1 {
  margin-top: 0.3em;
  font-size: 1.7em;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.3em;
  font-weight: 600;
}

h3 {
  font-size: 1.1em;
  font-weight: 600;
}

a {
  color: rgb(68, 115, 201);
  transition: color 0.2s ease;
}

a:hover {
  color: rgb(46, 94, 184);
}

a:focus {
  outline: 2px solid #4473c9;
  outline-offset: 2px;
}

#overlay {
  display: block;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 2;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: none;
  opacity: 0;
}

#overlay.active {
  opacity: 1;
  pointer-events: all;
}

#screenshot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0px 2px 10px 2px rgba(0,0,0,0.75);
  border-radius: 7px;
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transition: all 1s ease;
}

.page {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.header-img {
  height: 96px;
  line-height: 96px;
  background: url(img/header.jpg) no-repeat;
  background-size: cover;
  background-position: center;
}

.header-img a {
  display: block;
  text-align: left;
  background: url(img/header_logo.png) no-repeat;
  overflow: hidden;
  height: 96px;
}

.content {
  display: flex;
  gap: 2rem;
}

.menu {
  width: 14em;
  min-width: 14em;
  font-size: 90%;
}

.menu a {
  text-decoration: none;
  width: 100%;
  height: 100%;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75em;
}

.menu-section {
  margin: 15px 0;
}

.menu-section-title {
  color: white;
  border-radius: 3px;
  background: #6699ff;
  text-align: center;
  padding: 0.4em 0;
  font-weight: 500;
}

.menu-item {
  color: #483D8B;
  border-radius: 3px;
  background: #EFEDF8;
  margin-top: 3px;
  padding: 0.4em 0.5em;
  min-height: 32px;
  box-sizing: border-box;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.menu-item-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item:hover {
  background: #e8e6f5;
}

.menu-item-counter a {
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-section-title a {
  justify-content: center;
}

.menu-item a i {
  width: 32px; /* the same as menu-item-icon */
  font-size: 20px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.5;
}

.menu-item-icon {
  width: 32px;
  height: 32px;
  opacity: 80%;
}

.menu-item-news {
  font-size: 90%;
  opacity: 80%;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.menu-item-news-date {
  word-break: unset;
  word-wrap: unset;
  font-weight: bold;
}

.apron {
  flex: 1;
  padding-bottom: 1.5em;
  min-width: 0;
}

.footer-author {
  color: #EEAAAA;
  font-size: 75%;
  text-align: right;
  margin-bottom: 1.5em;
  padding: 0 1rem;
}

.footer-author a {
  color: inherit;
  text-decoration: none;
}

.laser-separator {
  height: 26px;
  display: flex;
  align-items: stretch;
}

.laser-separator .laser-separator-left {
  width: 32px;
  background: url(img/divider_left.png) no-repeat;
  flex-shrink: 0;
}

.laser-separator-line {
  flex: 1;
  background: url(img/divider_pt.png) repeat-x;
}

.prog-name {
  color: navy;
}

.prog-name .prog-name-1 {
  color: red;
}

p.descr-feature-title {
  font-weight: bold;
  margin-bottom: 0.25em;
}

p.descr-feature {
  margin-top: 0.25em;
  line-height: 1.6;
}

p.newslist-date {
  margin-top: 1.5em;
  margin-bottom: 0.15em;
}

p.newslist-text {
  margin-top: 0.15em;
}

.screenshot-thumb {
  width: 300px;
  max-width: 100%;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.screenshot-thumb v1 {
  width: 220px;
}

.screenshot-thumb:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.screenshot {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.screenshot-descr {
  flex: 1;
  min-width: 250px;
  font-size: 95%;
}

p.screenshot-feature {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.screens-table {
  display: flex;
  flex-direction: column;
}

.screens-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.screens-cell {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1em;
  text-align: center;
}

span.screenshot-text-link {
  cursor: pointer;
  color: rgb(68, 115, 201);
  text-decoration: underline;
}

span.history-symbol {
  font-weight: bold;
  margin-right: 0.5em;
}

.history-change {
  margin: 0.3em 0;
}

.tutors-toc a {
  color: rgb(46, 94, 184);
  text-decoration: none;
}

.tutors-toc a:hover {
  text-decoration: underline;
}

.tutor-author {
  font-size: 85%;
}

p.tutor-screen {
  text-align: center;
  margin-bottom: 3em;
}

p.tutor-screen img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

p.tutor-goto-all {
  margin-top: 2em;
}

.faq-ans {
  margin-top: 2.1em;
}

.faq-ans:first-child {
  margin-top: 0;
}

.faq-toc a {
  color: rgb(46, 94, 184);
  text-decoration: none;
}

.faq-toc a:hover {
  text-decoration: underline;
}

.dload-section p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.dload-ver-section {
  margin-top: 2.25em;
}

.dload-ver-section:first-child {
  margin-top: 0;
}

.dload-ver-section:last-child {
  margin-bottom: 2.5em;
}

.userlink_line {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1em;
  border-radius: 5px;
}

.userlink_line:nth-child(odd) {
  background-color: #f9f9ff;
}

.userlink_logo {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.userlink_logo img {
  width: 50px;
}

.userlink_logo img {
  max-width: 100%;
  height: auto;
}

.userlink_link {
  flex: 1;
  min-width: 200px;
}

span.error {
  color: red;
}

.filter_panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.9em;
}

.filter_box {
  padding: 5px;
  width: 300px;
  border: 1px solid #ccc;
  border-radius: 4px;
  flex: 1;
}

.filter_button {
  color: #333;
  background-color: #e9e9e9;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-content: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 10px;
}

.filter_button:hover {
  color: #333;
}

.article_row {
  padding: 5px;
  border-radius: 8px;
}
.article_row:nth-child(odd) {
  background-color: #fafafd;
}

/* Responsive Images - Global */
img {
  max-width: 100%;
  height: auto;
}

.menu-backdrop {
  display: none;
}

.mobile-menu-toggle {
  display: none;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .page {
    padding: 0 0.75rem;
  }

  .header-img a {
    background: url(img/header_logo_1.png) no-repeat;
  }

  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1000;
    background: #6699ff;
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
  }

  .mobile-menu-toggle:hover {
    background: #5588ee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  }

  .hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .menu {
    /* Remove from normal document flow */
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 80vw; /* Slightly smaller to ensure it fits */
    min-width: 0;
    height: 100vh;
    background: white;
    z-index: 999;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 15px 0;
    box-sizing: border-box;
    transform: translateX(-100%); /* Fully hide off-screen */
    transition: transform 0.3s ease;
    margin-bottom: 0;
    font-size: 18px;
  }

  .menu.active {
    transform: translateX(0); /* Slide in to visible position */
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
  }

  .menu-backdrop {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
  }

  .menu-backdrop.active {
    opacity: 1;
    pointer-events: all;
  }

  .menu-section {
    margin: 10px 0;
  }

  .menu-item a {
    min-height: 44px;
    font-size: 18px;
  }

  .header-img {
    height: 80px;
    line-height: 80px;
  }

  .header-img a {
    height: 80px;
    background-size: contain;
  }

  h1 {
    font-size: 1.5em;
  }

  h2 {
    font-size: 1.2em;
  }

  .screenshot {
    flex-direction: column;
  }

  .screenshot-descr {
    padding-right: 0;
  }

  .screens-cell {
    min-width: 100%;
    padding: 0.75em;
  }

  .screenshot-thumb {
    width: 100%;
  }

  .userlink_line {
    flex-direction: column;
    align-items: flex-start;
    margin: 0.75em;
  }

  .userlink_logo {
    width: 70px;
  }

  .footer-author {
    text-align: center;
    padding: 0 0.75rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 95%;
  }

  .page {
    padding: 0 0.5rem;
  }

  .header-img {
    height: 70px;
    line-height: 70px;
  }

  .header-img a {
    height: 70px;
  }

  h1 {
    font-size: 1.4em;
  }

  .menu-item {
    font-size: 95%;
  }
}

/* Print Styles */
@media print {
  .menu,
  .laser-separator,
  .footer-author,
  .mobile-menu-toggle,
  .menu-backdrop {
    display: none;
  }

  .page {
    width: 100%;
    max-width: 100%;
  }

  .content {
    display: block;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
