  @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

  :root {
    /* Light mode colors (orange theme) */
    --primary-color: #f7931e;
    --primary-dark: #e67e22;
    --primary-light: #fbb040;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --link-color: #3182ce;
    --link-hover: #2c5aa0;
    --bg-primary: #FFF;
    --bg-secondary: #f8f9fa;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      /* Dark mode colors (purple theme) */
      --primary-color: #8b5cf6;
      --primary-dark: #7c3aed;
      --primary-light: #a78bfa;
      --text-primary: #f7fafc;
      --text-secondary: #e2e8f0;
      --link-color: #90cdf4;
      --link-hover: #63b3ed;
      --bg-primary: #1a202c;
      --bg-secondary: #2d3748;
    }
  }

  * {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  }

  html {
    background-color: var(--bg-primary);
  }

  body {
    color: var(--text-primary);
    background: var(--bg-primary);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-color) 25%, var(--bg-primary) 50%, var(--bg-primary) 100%);
    background-attachment: fixed;
    line-height: 1.6;
  }

  h1, h2, h3, h4, h5, h6, p, ul, ol, li {
    display: block;
    padding: 8px 5px;
    color: var(--text-primary);
  }

  h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    padding-bottom: 4px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    line-height: 1.3;
    letter-spacing: -0.025em;
  }

  h1 {
    font-size: 42px;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 24px;
  }

  h2 {
    font-size: 32px;
    color: var(--primary-dark);
    margin-bottom: 20px;
  }

  h3 {
    font-size: 26px;
    color: var(--text-secondary);
    margin-bottom: 8px;
  }

  h4 {
    font-size: 22px;
    color: var(--text-secondary);
    margin-bottom: 14px;
  }

  h5, h6 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 12px;
  }

  p {
    font-size: 16px;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-secondary);
    font-weight: 400;
  }

  .innerimg {
    display: block;
    margin: 0 auto;
  }

  a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s ease;
  }

  a:hover {
    text-decoration: underline;
    color: var(--link-hover);
  }

  ul {
    list-style: disc;
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.7;
  }

  ul ul {
    margin-bottom: 8px;
    margin: 8px 32px;
  }

  ul li {
    display: list-item;
    margin: 4px 32px;
    padding: 2px 0;
    color: var(--text-secondary);
  }

  ul li::marker {
    color: var(--primary-dark);
  }

  ul:nth-last-child(1), p:nth-last-child(1) {
    margin-bottom: 0;
  }

  header, main, .title, .breadcrumbs {
    margin: 0 auto;
    max-width: 1000px;
  }

  .breadcrumbs {
    margin-top: -40px;
  }

  header, footer {
    margin: 0 auto;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  /* Disable sticky header for guider pages to avoid overlap with content menus */
  .no-sticky-header header {
    position: static;
  }

  nav {
    display: block;
    margin: 0 -30px;
    padding: 0 15px;
    background-color: var(--primary-color);
  }

  .mininav {
    display: none;
    margin: 0 0;
    padding: 0;
    background-color: var(--primary-color);
  }

  .mininav.show {
    display: block;
  }

  nav ul {
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: flex-end;
    list-style: none;
    padding: 4px 5px 0 5px;
    background-color: var(--primary-color);
  }

  .mininav ul {
    display: block;
    padding: 0;
    margin: 0;
    background-color: #666;
  }

  nav ul li {
    margin: 0 2px;
    padding: 0;
    text-align: center;
    font-size: 80%;
  }

  .mininav ul li {
    display: block;
    text-align: center;
    font-size: 80%;
    padding: 0;
    margin: 1px 0;
  }

  nav ul li.expand, nav .logo {
    display: none;
  }

  nav ul li a, .mininav ul li a {
    display: block;
    color: #333;
    padding: 15px 30px;
    background-color: #333;
    color: #FFF;
    font-weight: bold;
    min-width: 100px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
  }

  .mininav ul li a {
    border-radius: 0;
    padding: 15px 10px;
    min-width: none;
  }

  nav ul li a.active {
    display: block;
    color: #000;
    background-color: var(--primary-light);
  }

  nav ul li a:hover {
    display: block;
    color: #FFF;
  }

  .title {
    padding: 15px 30px 5px 30px;
    background-color: var(--primary-light);
  }

  .title span {
    display: block;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 32px;
    margin: 0 5px;
    letter-spacing: -0.025em;
  }

  .breadcrumbs {
    padding: 0 30px 15px 30px;
    background-color: var(--primary-light);
  }

  .breadcrumbs ul {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 5px;
  }

  .breadcrumbs ul li {
    margin: 0;
    padding: 0;
    color: #FFF;
  }

  .breadcrumbs ul li a {
    color: #FFF;
  }

  .breadcrumbs ul li:nth-child(1):before {
    content: '';
    color: #FFF;
    margin-left: 0;
  }

  .breadcrumbs ul li:before {
    content: '/';
    margin-left: 5px;
  }

  main {
    padding: 0 30px 20px 30px;
    background-color: var(--bg-primary);
    line-height: 1.7;
  }

  main .filler {
    display: block;
    width: 100%;
    margin: 0 auto 0 auto;
    padding: 0;
    text-align: center;
    height: 30px;
  }

  main .smallfiller {
    display: block;
    width: 100%;
    margin: 0 auto 0 auto;
    padding: 0;
    text-align: center;
    height: 15px;
  }

  main .blankline {
    display: block;
    width: 100%;
    margin: 0 auto 0 auto;
    padding: 0;
    text-align: center;
    height: 1px;
  }

  main .dottedline {
    display: block;
    width: 100%;
    margin: 0 auto 15px auto;
    padding: 0;
    text-align: center;
    height: 30px;
    border-bottom: dotted 1px #CCC;
  }

  main .flashbox {
    display: block;
    width: 80%;
    margin: 30px auto 0 auto;
    padding: 0;
    text-align: center;
  }

  main .flashbox.tryme a {
    display: block;
    background-color: #6BA7FF;
    border-radius: 15px;
    color: #FFF;
    padding: 15px 15px 25px 15px;
    font: bold 46px 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  }

  main .flashbox.tryme a:hover {
    display: block;
    background-color: #FF6BF1;
    text-decoration: none;
  }

  main .flashbox.tryme a small {
    display: block;
    font-size: 14px;
  }

  footer {
    display: flex;
    flex-direction: row;
    padding: 15px 15px;
    margin: 0;
    background-color: var(--primary-color);
  }

  footer span {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: #FFF;
  }

  footer span a {
    color: #FFF;
  }

  .cookie {
    position: sticky;
    z-index: 99;
    bottom: 0;
    background-color: var(--bg-secondary);
    text-align: center;
    padding: 30px;
    border-top: solid 1px var(--text-secondary);
    color: var(--text-primary);
    box-shadow: 0 0 50px 0 rgba(0, 0, 0, 0.3);
  }

  .cookie span {
    display: block;
  }

  .cookie span strong {
    font-size: 22px;
    color: var(--text-primary);
  }

  .cookie a {
    display: inline-block;
    margin: 10px 6px 0 6px;
    color: #FFF;
    background-color: var(--primary-color);
    font-size: 18px;
    padding: 15px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .cookie a.accept {
    background-color: #149f00;
    font-weight: bold;
  }

  .cookie a.reject {
    background-color: #AAA;
    color: #888;
  }

  .cookie a:hover {
    text-decoration: none;
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .share-btns { 
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .share-btn {
      display: inline-block;
      color: #FFF;
      padding: 4px 10px;
      text-align: center;
      font: bold 12px Arial, Verdana;
      margin: 0 4px;
      border-radius: 5px;
  }

  .share-btn:focus,
  .share-btn:hover {
      text-decoration: none;
      opacity: 0.8;
      color: #FFF;
  }

  .share-btn:active {
      color: #e2e2e2;
  }

  .share-btn.x { background: #333; }
  .share-btn.facebook { background: #3B5998; }
  .share-btn.reddit { background: #ff5700; }
  .share-btn.linkedin { background: #4875B4; }
  .share-btn.snapchat { background: #e0ff00; color: #333; }
  .share-btn.whatsapp { background: #189a05; }
  .share-btn.email { background: #444444; }
  .share-btn.email:before { content: '✉'; margin-right: 5px; }

  /* Footer styles */
  .footer-content {
    text-align: center;
    padding: 20px;
    margin: 0 auto;
  }

  .footer-main {
    margin-bottom: 10px;
  }

  .footer-links {
    font-size: 0.9em;
  }

  .footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
  }

  .footer-separator {
    margin: 0 8px;
    color: var(--text-secondary);
    opacity: 0.6;
  }

  /* Cookie consent styles */
  .cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .cookie-consent {
    background-color: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid var(--bg-secondary);
  }

  .cookie-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
  }

  .cookie-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: white;
  }

  .cookie-content {
    padding: 25px;
    color: var(--text-primary);
  }

  .cookie-content p {
    margin: 15px 0;
    line-height: 1.6;
    color: var(--text-secondary);
  }

  .cookie-content ul {
    margin: 15px 0;
    padding-left: 25px;
  }

  .cookie-content li {
    margin: 8px 0;
    color: var(--text-secondary);
  }

  .cookie-notice {
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 0.95em;
    color: var(--text-primary);
  }

  .cookie-links {
    text-align: center;
    margin: 20px 0;
    font-size: 0.9em;
  }

  .cookie-links a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  .cookie-links a:hover {
    color: var(--link-hover);
    text-decoration: underline;
  }

  .cookie-actions {
    padding: 20px 25px;
    background-color: var(--bg-secondary);
    border-radius: 0 0 12px 12px;
    text-align: center;
  }

  .cookie-btn {
    background-color: var(--text-secondary);
    color: white;
    border: none;
    padding: 12px 20px;
    margin: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
  }

  .cookie-btn.accept {
    background-color: #28a745;
  }

  .cookie-btn.necessary {
    background-color: #dc3545;
  }

  .cookie-btn.settings {
    background-color: #007bff;
  }

  .cookie-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }

  /* Modern Highscore Table */
  .highscore-table-container {
    overflow-x: auto;
    margin-bottom: 45px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: var(--bg-primary);
  }

  .highscore-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
  }

  .highscore-table thead tr {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
  }

  .highscore-table th {
    padding: 16px 20px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
  }

  .highscore-table th:first-child {
    border-top-left-radius: 12px;
    text-align: center;
  }

  .highscore-table th:last-child {
    border-top-right-radius: 12px;
    text-align: right;
  }

  .highscore-table tbody tr {
    border-bottom: 1px solid var(--bg-secondary);
    transition: all 0.2s ease;
  }

  .highscore-table tbody tr:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .highscore-table tbody tr.even {
    background-color: var(--bg-primary);
  }

  .highscore-table tbody tr.odd {
    background-color: var(--bg-secondary);
  }

  .highscore-table td {
    padding: 16px 20px;
    border: none;
    font-size: 15px;
    line-height: 1.5;
  }

  .highscore-table .position {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
  }

  .highscore-table .wpm {
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
  }

  .highscore-table .error-rate {
    text-align: center;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
  }

  .highscore-table .date {
    text-align: right;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
  }

  /* Top 3 special styling */
  .highscore-table tbody tr:nth-child(1) .position::before {
    content: '🥇 ';
  }

  .highscore-table tbody tr:nth-child(2) .position::before {
    content: '🥈 ';
  }

  .highscore-table tbody tr:nth-child(3) .position::before {
    content: '🥉 ';
  }

  .highscore-table tbody tr:nth-child(1),
  .highscore-table tbody tr:nth-child(2),
  .highscore-table tbody tr:nth-child(3) {
    background: linear-gradient(90deg, var(--primary-light), var(--bg-primary));
    font-weight: 700;
  }

  @media (max-width: 600px) {
    .highscore-table th,
    .highscore-table td {
      padding: 12px 8px;
      font-size: 13px;
    }

    .highscore-table .wpm {
      font-size: 16px;
    }

    .highscore-table .error-rate {
      font-size: 14px;
    }
  }

  /* Accessibility enhancements */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }

  /* Focus indicators */
  a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
  }

  /* Skip to main content link */
  .skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #007bff;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
  }

  .skip-link:focus {
    top: 6px;
  }

  /* High contrast mode support */
  @media (prefers-contrast: high) {
    .oim .current {
      background-color: #000;
      color: #fff;
    }
    
    .oim .current.miss {
      background-color: #f00;
      color: #fff;
    }
  }

  /* Reduced motion support */
  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    
    .sticky-ad {
      transition: none;
    }
  }

  /* Response */

  @media only screen and (max-width: 900px) {
    nav {
      margin: 0;
      padding: 0;
    }

    nav ul li a {
      padding: 8px 5px;
    }
  }

  @media only screen and (max-width: 700px) {
    nav ul li a {
      padding: 8px 2px;
      font-size: 10px;
    }
  }

  @media only screen and (max-width: 600px) {
    html {
      min-width: 500px;
    }

    header {
      background-color: #CCC;
    }

    .title {
      display: none;
    }

    .breadcrumbs {
      display: none;
    }

    nav .logo {
      display: inline-block;
      position: absolute;
      top: 0;
      color: 400000;
      padding: 12px;
      font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
      font-style: normal;
      font-size: 18px;
    }

    nav ul {
      justify-content: right;
      padding: 0;
    }

    nav ul li {
      display: none;
    }

    nav ul li.expand {
      display: list-item;
      padding: 0;
      margin: 0;
    }

    nav ul li a {
      padding: 8px 15px;
      font-size: 28px;
      min-width: 20px;
      border-radius: 0;
    }

    nav ul li a:hover {
      text-decoration: none;
    }

    .breadcrumbs, .title, main {
      max-width: 100%;
    }

    nav, main, .title, .breadcrumbs {
      border-right: none;
      border-left: none;
    }

    /* Mobile-specific improvements */
    body {
      font-size: 14px;
      line-height: 1.4;
    }
    
    #main {
      margin: 10px;
      padding: 15px;
    }
    
    #main_header h1 {
      font-size: 24px;
      margin: 10px 0;
    }
    
    #main_navigation {
      text-align: center;
    }
    
    #main_navigation a {
      display: inline-block;
      margin: 5px;
      padding: 8px 12px;
      font-size: 14px;
    }
    
    .oim {
      height: auto;
      min-height: 33px;
      flex-wrap: wrap;
    }
    
    .oim span {
      font-size: 18px;
      padding: 4px 6px;
    }
    
    .flashbox {
      margin: 15px 0;
      padding: 15px;
    }
    
    .flashbox a {
      font-size: 16px;
      padding: 10px 15px;
    }
    
    /* Improved touch targets */
    button, input[type="button"], .cta-button {
      min-height: 44px;
      padding: 12px 20px;
      font-size: 16px;
    }
    
    /* Better spacing for mobile */
    h1, h2, h3 {
      margin: 15px 0 10px 0;
    }
    
    p {
      margin: 10px 0;
    }

    /* Footer mobile styles */
    .footer-content {
      padding: 15px 10px;
    }
    
    .footer-main, .footer-links {
      display: block;
      margin: 5px 0;
    }
    
    .footer-separator {
      display: none;
    }
    
    .footer-links a {
      display: inline-block;
      margin: 3px 8px;
    }

    /* Cookie consent mobile styles */
    .cookie-consent-overlay {
      padding: 10px;
    }
    
    .cookie-consent {
      max-height: 90vh;
    }
    
    .cookie-content {
      padding: 20px;
    }
    
    .cookie-actions {
      padding: 15px 20px;
    }
    
    .cookie-btn {
      display: block;
      width: 100%;
      margin: 8px 0;
      padding: 14px;
    }
  }