 body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0; padding: 20px; background: #f0f0f0; color: #333;
    user-select: none;
  }
  h1 { text-align: center; margin-bottom: 10px; }
  #container {
    max-width: 900px; margin: auto; padding: 20px;
    border-radius: 10px; 
  }
  #quote {
    font-size: 30px;
    border: 1px solid #ccc;
    padding: 15px; border-radius: 5px; min-height: 100px;
    margin-bottom: 10px; white-space: pre-wrap;
  }
  #quote span.correct { color: green; }
  #quote span.incorrect { color: red; }
  #quote span.next-key { text-decoration: underline; }
  #inputArea {
    width: 100%; height: 100px; font-size: 30px;
    padding: 10px; border-radius: 5px; border: 1px solid #ccc;
    box-sizing: border-box;
  }
  #stats {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    background-color: #f3f3f3;
    padding: 10px;
	}
  #stats div {
    font-weight: bold;
  }
  #message {
    margin: 10px 0; text-align: center; font-size: 18px; height: 28px;
    color: #ff9800;
  }
  #keyboard {
    margin-top: 20px; user-select: none;
  }
  .row {
    display: flex; justify-content: center; margin-bottom: 5px;
  }
  .key {
    border: 1px solid #888;
    border-radius: 5px;
    background: #eee;
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 2px;
    text-align: center;
    font-weight: bold;
    box-sizing: border-box;
    cursor: default;
    user-select: none;
    transition: all 0.2s ease;
  }
  .key1 {
    background: yellow;
  }
  .key.wide { width: 60px; }
  .key.extra-wide { width: 100px; }
  .key.next-key {
    border: 3px solid #ff9800;
    box-shadow: 0 0 8px #ff9800;
    background-color: #fff3e0;
  }
  button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    border: none;
    background: #2196f3;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
  }
  button:hover {
    background: #1976d2;
  }
  #controls {
    /* display: flex; justify-content: space-between; flex-wrap: wrap; */
    gap: 10px;
    margin-top: 10px;
  }
  select, input[type="text"] {
    padding: 7px 10px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid #ccc;
    min-width: 150px;
  height: fit-content;
  }
  #customTextInput {
    width: 100%; margin-top: 10px; display: none;
    padding: 8px; border-radius: 6px; border: 1px solid #ccc;
    font-size: 16px; resize: vertical;
    min-height: 60px;
  }
  #loginSection {
    margin-top: 15px;
    display: flex; gap: 10px; align-items: center;
    justify-content: center;
  }
  #userInfo {
    margin-top: 15px;
    text-align: center;
  }
  #tabs {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .tab {
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 6px 6px 0 0;
    background: #eee;
    font-weight: bold;
    user-select: none;
  }
  .tab.active {
    background: #2196f3;
    color: white;
  }
  .tab-content {
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    padding: 20px;
    max-width: 900px;
    margin: auto;
    border-radius: 0 0 6px 6px;
    display: none;
  }
  .tab-content.active {
    display: block;
  }
  table {
    width: 100%;
    border-collapse: collapse;
  }
  th, td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
  }
  /* Dark theme */
  body.dark {
    background: #121212;
    /*color: #e0e0e0;*/
  }
  body.dark #container {
    background: #1e1e1e;
    box-shadow: 0 0 15px #000;
  }
  body.dark #quote {
    border-color: #555;
    background: #2a2a2a;
  }
  body.dark #inputArea {
    background: #2a2a2a;
    border-color: #555;
    color: #ddd;
  }
  body.dark .key {
    background: #333;
    border-color: #555;
    color: #ddd;
  }
  body.dark .key.next-key {
    background-color: #4e2b00;
    border-color: #ffa000;
    box-shadow: 0 0 10px #ffa000;
  }
  body.dark button {
    background: #1976d2;
    color: #eee;
  }
  body.dark button:hover {
    background: #1565c0;
  }
  body.dark select, body.dark input[type="text"], body.dark #customTextInput {
    background: #2a2a2a;
    color: #ddd;
    border-color: #555;
  }
  
 .keyboardb {
    display: inline-block;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
  } 
  
   .rowb {
    display: flex;
    justify-content: center;
    margin: 17px 0;
  } 
  
  
  .keyb {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 12px 14px;
    margin: 3px;
    min-width: 38px;
    text-align: center;
    user-select: none;
    font-weight: bold;
    cursor: default;
    box-sizing: border-box;
    position: relative;
    background: #fafafa;
    transition: background-color 0.3s;
  }

  /* Finger colors */
  .left-pinky { background: #ffadad; }
  .left-ring { background: #ffd6a5; }
  .left-middle { background: #fdffb6; }
  .left-index { background: #caffbf; }
  .right-index { background: #9bf6ff; }
  .right-middle { background: #a0c4ff; }
  .right-ring { background: #bdb2ff; }
  .right-pinky { background: #ffc6ff; }
  .thumb { background: #d0f4de; min-width: 80px; }
  
  /* Wider keys */
  .keyb.wide { min-width: 60px; }
  .keyb.space { min-width: 250px; }

  /* Home row highlight */
  .home-row {
    border: 2px solid #333;
  }

  /* Finger label below key */
  .finger-label {
    font-size: 10px;
    color: #555;
    position: absolute;
    bottom: -22px;
    width: 100%;
    left: 0;
  }

  /* Finger number at top-left */
  .finger-number {
    font-size: 10px;
    color: #222;
    position: absolute;
    top: 2px;
    left: 4px;
    font-weight: normal;
  }

  /* Tooltip on hover */
  .keyb:hover {
    background-color: #ddd;
  }