.ctd-wrapper {
    --ctd-primary: #6366f1;
    --ctd-secondary: #8b5cf6;
    --ctd-accent: #ec4899;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100vh;
  }

  .ctd-card {
    background: white;
    border-radius: 2.5rem;
    padding: 3rem;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  }

  .theme-dark .ctd-card {
    background: rgb(30, 41, 59);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }

  .ctd-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 3rem;
  }

  .ctd-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    flex-shrink: 0;
  }

  .ctd-icon svg {
    width: 32px;
    height: 32px;
  }

  .ctd-header h2 {
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    color: rgb(15, 23, 42);
    letter-spacing: -0.02em;
  }

  .theme-dark .ctd-header h2 {
    color: rgb(241, 245, 249);
  }

  .ctd-input-section {
    margin-bottom: 2.5rem;
  }

  .ctd-input-section > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .theme-dark .ctd-input-section > label {
    color: rgb(203, 213, 225);
  }

  .ctd-input-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .ctd-input {
    flex: 1;
    background: rgb(248, 250, 252);
    border: 2px solid rgb(226, 232, 240);
    border-radius: 1.3rem;
    padding: 1.2rem 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: rgb(15, 23, 42);
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
  }

  .theme-dark .ctd-input {
    background: rgb(15, 23, 42);
    border-color: rgb(51, 65, 85);
    color: rgb(241, 245, 249);
  }

  .ctd-input:focus {
    border-color: var(--ctd-primary);
    background: white;
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.1);
  }

  .theme-dark .ctd-input:focus {
    background: rgb(30, 41, 59);
  }

  .ctd-input-unit {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
    white-space: nowrap;
  }

  .theme-dark .ctd-input-unit {
    color: rgb(203, 213, 225);
  }

  .ctd-presets-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--ctd-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
  }

  .ctd-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.8rem;
  }

  .ctd-preset {
    background: rgb(241, 245, 249);
    border: 2px solid rgb(226, 232, 240);
    border-radius: 1rem;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(15, 23, 42);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .theme-dark .ctd-preset {
    background: rgb(15, 23, 42);
    border-color: rgb(51, 65, 85);
    color: rgb(241, 245, 249);
  }

  .ctd-preset:hover {
    border-color: var(--ctd-primary);
    background: rgb(219, 234, 254);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
  }

  .theme-dark .ctd-preset:hover {
    background: rgba(99, 102, 241, 0.1);
  }

  .ctd-preset.active {
    background: linear-gradient(135deg, var(--ctd-primary), var(--ctd-secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  }

  .ctd-speed-section {
    margin-bottom: 2.5rem;
  }

  .ctd-speed-section > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .theme-dark .ctd-speed-section > label {
    color: rgb(203, 213, 225);
  }

  .ctd-speed-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .ctd-speed-btn {
    background: rgb(241, 245, 249);
    border: 2px solid rgb(226, 232, 240);
    border-radius: 1.1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.3s;
  }

  .theme-dark .ctd-speed-btn {
    background: rgb(15, 23, 42);
    border-color: rgb(51, 65, 85);
  }

  .ctd-speed-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: rgb(15, 23, 42);
  }

  .theme-dark .ctd-speed-label {
    color: rgb(241, 245, 249);
  }

  .ctd-speed-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
  }

  .theme-dark .ctd-speed-value {
    color: rgb(203, 213, 225);
  }

  .ctd-speed-btn:hover {
    border-color: var(--ctd-primary);
    background: rgb(219, 234, 254);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
  }

  .theme-dark .ctd-speed-btn:hover {
    background: rgba(99, 102, 241, 0.1);
  }

  .ctd-speed-btn.active {
    background: linear-gradient(135deg, var(--ctd-primary), var(--ctd-secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
  }

  .ctd-speed-btn.active .ctd-speed-label {
    color: white;
  }

  .ctd-speed-btn.active .ctd-speed-value {
    color: rgba(255, 255, 255, 0.9);
  }

  .ctd-multiplier-section {
    margin-bottom: 2.5rem;
  }

  .ctd-multiplier-section > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .theme-dark .ctd-multiplier-section > label {
    color: rgb(203, 213, 225);
  }

  .ctd-multiplier-input {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .ctd-times-btn {
    background: rgb(241, 245, 249);
    border: 2px solid rgb(226, 232, 240);
    border-radius: 0.9rem;
    padding: 0.8rem 1.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(15, 23, 42);
    cursor: pointer;
    transition: all 0.2s;
  }

  .theme-dark .ctd-times-btn {
    background: rgb(15, 23, 42);
    border-color: rgb(51, 65, 85);
    color: rgb(241, 245, 249);
  }

  .ctd-times-btn:hover {
    border-color: var(--ctd-primary);
    background: rgb(219, 234, 254);
  }

  .theme-dark .ctd-times-btn:hover {
    background: rgba(99, 102, 241, 0.1);
  }

  .ctd-times-btn.active {
    background: var(--ctd-primary);
    color: white;
    border-color: var(--ctd-primary);
  }

  .ctd-times-input {
    padding: 0.8rem 1rem;
    border: 2px solid rgb(226, 232, 240);
    border-radius: 0.9rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgb(248, 250, 252);
    color: rgb(15, 23, 42);
    outline: none;
    width: 80px;
    transition: all 0.2s;
    box-sizing: border-box;
  }

  .theme-dark .ctd-times-input {
    background: rgb(15, 23, 42);
    border-color: rgb(51, 65, 85);
    color: rgb(241, 245, 249);
  }

  .ctd-times-input:focus {
    border-color: var(--ctd-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
  }

  .ctd-results {
    background: linear-gradient(135deg, rgb(240, 249, 255) 0%, rgb(240, 253, 244) 100%);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
  }

  .theme-dark .ctd-results {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(16, 185, 129, 0.05));
  }

  .ctd-result-single,
  .ctd-result-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .ctd-result-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .theme-dark .ctd-result-label {
    color: rgb(203, 213, 225);
  }

  .ctd-result-time,
  .ctd-result-time-total {
    font-size: 2rem;
    font-weight: 900;
    color: var(--ctd-primary);
    line-height: 1;
  }

  .ctd-result-life,
  .ctd-result-life-total {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
  }

  .theme-dark .ctd-result-life,
  .theme-dark .ctd-result-life-total {
    color: rgb(203, 213, 225);
  }

  .ctd-divider {
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgb(203, 213, 225), transparent);
  }

  .theme-dark .ctd-divider {
    background: linear-gradient(180deg, transparent, rgba(203, 213, 225, 0.2), transparent);
  }

  .ctd-impact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .ctd-impact-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 1.3rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
  }

  .theme-dark .ctd-impact-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(255, 140, 0, 0.05));
    border-color: rgba(99, 102, 241, 0.1);
  }

  .ctd-impact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
  }

  .ctd-impact-number {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ctd-primary), var(--ctd-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
  }

  .ctd-impact-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgb(100, 116, 139);
  }

  .theme-dark .ctd-impact-text {
    color: rgb(203, 213, 225);
  }

  .ctd-message {
    background: linear-gradient(135deg, rgb(254, 243, 199) 0%, rgb(254, 202, 202) 100%);
    border: 2px solid rgb(251, 191, 36);
    border-radius: 1.3rem;
    padding: 1.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: rgb(146, 64, 14);
    line-height: 1.6;
  }

  .theme-dark .ctd-message {
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.1), rgba(254, 202, 202, 0.1));
    border-color: rgba(251, 191, 36, 0.3);
    color: rgb(251, 191, 36);
  }

  @media (max-width: 768px) {
    .ctd-wrapper {
      padding: 1rem;
      min-height: auto;
    }

    .ctd-card {
      padding: 1.5rem;
    }

    .ctd-header {
      margin-bottom: 1.2rem;
      gap: 0.8rem;
    }

    .ctd-header h2 {
      font-size: 1.3rem;
    }

    .ctd-results {
      grid-template-columns: 1fr;
      gap: 0.8rem;
      padding: 1rem;
    }

    .ctd-divider {
      display: none;
    }

    .ctd-speed-buttons {
      grid-template-columns: 1fr;
    }

    .ctd-impact {
      grid-template-columns: 1fr;
    }
  }