  .header {
    background-color: #fff;
    width: 100%;
    margin: 0px;
    border-bottom: 2px solid #cfd6ce;
  }

  .sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    background-color: #fafafa;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
  }

  .sidenav a, .sidenav h3 {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 20px;
    color: #222222;
    display: block;
    transition: 0.3s;
    text-align: left;
  }

  .sidenav a:hover {
    color: #000;
  }

  .sidenav .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 36px;
    margin-left: 50px;
  }

  .main-menu {
    background-color: #fff;
    overflow: hidden;
    box-shadow: inset;
    margin: 0px auto;
    width: 100%;
    max-width: 1200px;
    color: #000;
  }

  @media screen and (max-height: 450px) {
    .sidenav { padding-top: 15px; }
    .sidenav a { font-size: 18px; }
  }

  img {
    width: 100%;
    max-width: 1000px;
    margin: 0px auto;
    border: 0px;
  }

  h1 {
    color:#000;
    font-size: 25px;
    padding: 10px;
    text-align: left;
    margin-bottom: 12px;
  }

  a.logo { color: #000; }

  .container {
    max-width: 1100px;
    margin: 50px auto;
    background: #fff;
    padding: 15px 20px;
  }

  textarea {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 12px;
    min-height: 84px;
    padding: 10px;
    font-size: 20px;
    border-radius: 2px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    resize: vertical;
    direction: rtl;
  }

  #controls {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
  }

  #controls label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #333;
    font-weight: 600;
    gap: 6px;
    align-items: flex-start;
  }

  #controls input[type="range"] { width: 180px; }

  #alignButtons button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    cursor: pointer;
    margin: 0 5px;
  }

  #alignButtons button.active {
    background-color:#fafafa;
    color: #555;
    border-color:#eee;
  }

  #alignButtons button:hover {
    background-color: #ddd;
  }

  #outputContainer {
    gap: 18px;
    align-items: start;
  }

  .preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 20px auto;
  }

  .preview-card {
    background: #fff;
    border-radius:0px;
    padding: 20px;
    min-height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    outline: 1px solid #eee;
 
  }

  .font-name {
    text-align: left;
    font-weight: 700;
    color: #222;
    font-size: 17px;
    user-select: text;
  }

  .preview-area {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center; /* Default value, will be overridden by JS */
    text-align: right;
    direction: rtl;
    min-height: 80px;
    word-break: break-word;
    width: 100%;
  }

  .preview-text {
    display: inline-block;
    line-height: 1;
    padding: 30px;
    font-family: inherit, sans-serif;
    text-align: right;
    direction: rtl;
    white-space: pre-wrap;
  }

  .buttons-row {
    width: 100%;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
  }

  .btn {
    padding: 5px 10px;
    margin: 2px;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
  }

  .btn:hover {
    background: #222;
    color: white;
  }

  .small-note {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin-top: 10px;
  }

  @media (max-width: 600px) {
    #controls { gap: 10px; }
    textarea { max-width: 100%; font-size: 18px; }
  }

  .site-footer {
    background-color: #fff;
    color: #080000;
    padding: 40px 20px 20px;
    font-family: 'Segoe UI', sans-serif;
  }

  .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 1100px;
    margin: auto;
  }

  .footer-content h3, .footer-content h4 {
    color: #000;
  }

  .footer-left p {
    max-width: 300px;
    font-size: 0.95em;
    line-height: 1.6;
  }

  .footer-links ul {
    list-style: none;
    padding: 0;
  }

  .footer-links ul li {
    margin-bottom: 8px;
  }

  .footer-links ul li a {
    color: #302f31;
    text-decoration: none;
  }

  .footer-links ul li a:hover {
    text-decoration: underline;
  }

  .footer-social a {
    color: #555;
    text-decoration: none;
    font-size: 0.95em;
  }

  .footer-social a:hover {
    text-decoration: underline;
  }

  .footer-bottom {
    text-align: center;
    margin-top: 30px;
    font-size: 0.85em;
    color: #999;
    border-top: 1px solid #333;
    padding-top: 15px;
  }

  .pagination {
    text-align: center;
    margin: 30px auto;
    font-family: sans-serif;
  }

  .pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    text-decoration: none;
    color: #267c15;
    border: 1px solid #267c15;
    border-radius: 4px;
    transition: all 0.3s ease;
  }

  .pagination a:hover {
    background-color: #267c15;
    color: #fff;
    text-decoration: none;
  }

  .pagination a.active {
    background-color: #267c15;
    color: #fff;
    pointer-events: none;
    cursor: default;
  }
  
  @media (max-width: 1366px) {
      .container{max-width:900px;}
      .main-menu {max-width: 950px;}
  }