.tt-wrapper {
  --tt-accent: #4f46e5;
  --tt-accent-hover: #4338ca;
  --tt-surface: #fff;
  --tt-surface-alt: #f1f5f9;
  --tt-border: #e2e8f0;
  --tt-text: #0f172a;
  --tt-text-muted: #64748b;
  --tt-key-bg: #fff;
  --tt-key-text: #64748b;
  --tt-key-border: #e2e8f0;
  --tt-key-shadow: rgba(0, 0, 0, 0.2);
  --tt-key-active-bg: #4f46e5;
  --tt-key-tested-bg: #d1fae5;
  --tt-key-tested-text: #059669;
  --tt-kb-bg: #e2e8f0;

  width: 100%;
  color: var(--tt-text);
}

.theme-dark .tt-wrapper {
  --tt-surface: #0f172a;
  --tt-surface-alt: #1e293b;
  --tt-border: #334155;
  --tt-text: #f1f5f9;
  --tt-text-muted: #94a3b8;
  --tt-key-bg: #334155;
  --tt-key-text: #cbd5e1;
  --tt-key-border: #475569;
  --tt-key-shadow: rgba(0, 0, 0, 0.5);
  --tt-key-active-bg: #6366f1;
  --tt-key-tested-bg: rgba(16, 185, 129, 0.3);
  --tt-key-tested-text: #6ee7b7;
  --tt-kb-bg: #334155;
}

body.is-widget .tt-wrapper {
  padding: 0;
}

body.is-widget .tt-wrapper > div {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 1rem;
}

    .tt-container {
      max-width: 80rem;
      margin: 0 auto;
      padding: 1rem;
    }

    .tt-card {
      background: var(--tt-surface);
      border-radius: 1.5rem;
      padding: 2rem;
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
      border: 1px solid var(--tt-border);
    }

    .tt-header {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-bottom: 2rem;
      width: 100%;
    }

    @media (min-width: 768px) {
      .tt-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
      }
    }

    .tt-header-left {
      flex: 1;
    }

    .tt-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.25rem 0.75rem;
      border-radius: 9999px;
      background-color: rgba(79, 70, 229, 0.1);
      color: var(--tt-accent);
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.5rem;
    }

    .tt-badge-icon {
      width: 1rem;
      height: 1rem;
    }

    .tt-title {
      font-size: 1.875rem;
      font-weight: 900;
      letter-spacing: -0.02em;
      margin: 0 0 0.25rem;
    }

    .tt-description {
      font-size: 0.9375rem;
      color: var(--tt-text-muted);
      margin: 0;
    }

    .tt-stats {
      display: flex;
      gap: 1rem;
      flex-wrap: wrap;
    }

    .tt-stat-box {
      background: var(--tt-surface-alt);
      padding: 1rem;
      border-radius: 1rem;
      text-align: center;
      min-width: 120px;
    }

    .tt-stat-label {
      font-size: 0.75rem;
      font-weight: 700;
      text-transform: uppercase;
      color: var(--tt-text-muted);
      letter-spacing: 0.05em;
    }

    .tt-stat-value {
      font-size: 2.25rem;
      font-weight: 900;
      color: var(--tt-accent);
      margin-top: 0.5rem;
    }

    .tt-reset-btn {
      padding: 1rem;
      background: var(--tt-surface-alt);
      border: none;
      border-radius: 1rem;
      cursor: pointer;
      color: var(--tt-text-muted);
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .tt-reset-btn:hover {
      background: var(--tt-border);
    }

    .tt-reset-icon {
      width: 1.5rem;
      height: 1.5rem;
    }

    .tt-keyboard-wrapper {
      position: relative;
      width: 100%;
      overflow-x: auto;
      padding-bottom: 1rem;
      display: flex;
      justify-content: center;
    }

    .tt-keyboard {
      background: var(--tt-kb-bg);
      padding: 0.5rem;
      border-radius: 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      user-select: none;
      min-width: 900px;
    }

    .tt-row {
      display: flex;
      gap: 0.25rem;
    }

    .tt-key {
      height: 3rem;
      background: var(--tt-key-bg);
      border-radius: 0.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.75rem;
      color: var(--tt-key-text);
      border-top: 1px solid rgba(255, 255, 255, 0.3);
      box-shadow: 0 2px 0 var(--tt-key-shadow);
      transition: all 300ms ease-out;
      border: 1px solid var(--tt-key-border);
    }

    .tt-key-esc,
    .tt-key-f,
    .tt-key-sm {
      width: 3rem;
    }

    .tt-key-md {
      width: 4rem;
    }

    .tt-key-lg {
      width: 5rem;
    }

    .tt-key-xl {
      width: 8rem;
    }

    .tt-key-xxl {
      width: 18rem;
    }

    .tt-key.tt-key-active {
      background: var(--tt-key-active-bg);
      color: white;
      box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.2);
      transform: translateY(1px);
      border-color: var(--tt-accent);
    }

    .tt-key.tt-key-tested {
      background: var(--tt-key-tested-bg);
      color: var(--tt-key-tested-text);
      border-color: var(--tt-key-tested-text);
    }

    .tt-key.tt-key-releasing {
      background: var(--tt-key-bg);
      color: var(--tt-key-text);
      box-shadow: 0 2px 0 var(--tt-key-shadow);
      transform: translateY(0);
      border-color: var(--tt-key-border);
    }

    .tt-spacer-4 {
      width: 0.25rem;
    }

    .tt-spacer-8 {
      width: 0.5rem;
    }

    .tt-spacer-12 {
      width: 0.75rem;
    }

    .tt-spacer-108 {
      width: 6.75rem;
    }

    .tt-event-log-container {
      margin-top: 0.75rem;
      padding: 0;
      background: transparent;
      border-radius: 0;
      border: none;
      width: 100%;
    }

    .tt-event-log-header {
      display: none;
    }

    .tt-event-log-icon {
      display: none;
    }

    .tt-event-log-label {
      display: none;
    }

    .tt-event-log {
      font-size: 0.65rem;
      color: var(--tt-text);
      height: 2rem;
      overflow-x: auto;
      overflow-y: hidden;
      background: var(--tt-surface-alt);
      padding: 0.375rem;
      border-radius: 0.5rem;
      border: 1px solid var(--tt-border);
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 0.5rem;
      white-space: nowrap;
      width: 100%;
      scrollbar-width: none;
    }

    .tt-event-log::-webkit-scrollbar {
      display: none;
    }

    .tt-event-log div {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 1;
      font-weight: 600;
      padding: 0.25rem 0.5rem;
      min-width: 1.5rem;
      height: 1.5rem;
      background: var(--tt-key-bg);
      border: 1px solid var(--tt-key-border);
      border-radius: 0.375rem;
      box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
      flex-shrink: 0;
    }