  * { margin: 0; padding: 0; box-sizing: border-box; }
  :root {
    --primary: #1a4731;
    --secondary: #2d6a4f;
    --accent: #40916c;
    --gold: #d4a373;
    --cream: #faf6f1;
    --dark: #1b4332;
    --background: #f8f9fa;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --text-tertiary: var(--gold);
  }
  body {
    font: 400 16px 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--secondary), var(--dark));
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #fff;
    padding: 1rem;
  }
  body.rtl { direction: rtl; }
  .container {
    max-width: 420px;
    background: var(--cream);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    color: var(--dark);
    text-align: center;
  }
  h1 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--primary);
  }
  textarea, .output {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin: 0.5rem 0;
    font-size: 1rem;
    resize: none;
    transition: var(--transition);
  }
  textarea:focus, .output:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(64, 145, 108, 0.2);
  }
  .output {
    background: #f7fafc;
    font-family: 'Scheherazade', serif;
    direction: rtl;
    text-align: right;
    min-height: 60px;
  }
  button {
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition);
  }
  button:hover {
    background: var(--primary);
    transform: translateY(-2px);
  }
  .translator-btn {
    margin: 0.4rem;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
  h3 {
    color: var(--primary);
    font: 700 1rem Roboto;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
  }
  h3:before {
    content: " ";
    color: var(--gold);
  }
  body.rtl h3 {
    text-align: right;
    direction: rtl;
  }
  body.rtl h3:before {
    content: " ";
  }
  @media (max-width: 480px) {
    h1 { font-size: 1.4rem; }
    textarea, .output { font-size: 0.9rem; }
    button { font-size: 0.8rem; }
  }
  .align-right { text-align: right; }
  .align-left { text-align: left; }
  .floating-home-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    animation: pulse 2s infinite;
    z-index: 1000;
  }
  .floating-home-btn:hover {
    transform: scale(1.1);
    background: var(--primary);
  }
  @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
  }
  .lang-switcher {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1001;
  }
  #lang-btn {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
  }
  #lang-btn:hover {
    background-color: var(--primary);
  }
  .lang-menu {
    display: none;
    position: absolute;
    bottom: 70px;
    left: 0;
    background-color: var(--cream);
    box-shadow: var(--card-shadow);
    border-radius: 8px;
    overflow: hidden;
    min-width: 120px;
  }
  .lang-menu.show {
    display: block;
  }
  .lang-option {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
    text-align: left;
  }
  .lang-option:hover {
    background-color: #e2e8f0;
  }