#stock-calc {
    direction: rtl;
    max-width: 850px;
    margin: auto;
    background: #ffffff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: inherit;
  }

  #compareBtn {
    border-radius: 24px;
  }

  #stock-calc h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
  }

  #stock-calc p {
    text-align: center;
    margin-bottom: 2rem;
  }

  .input-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
  }

  .input-group div {
    flex: 1 1 200px;
  }

  input[type=number] {
    width: 100%;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    transition: border-color 0.3s ease;
  }

  input[type=number].error {
    border-color: #DC2626;
    animation: shake 0.25s ease;
  }

  @keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
  }

  #compareBtn {
    width: 100%;
    background: #D61BE3;
    color: white;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 12px;
    cursor: pointer;
  }

  #error-message {
    color: #DC2626;
    text-align: center;
    margin-top: 1rem;
  }

  #results {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .result-box {
    flex: 1 1 350px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    background: #fff;
    border: 2px solid #E4E4E7;
    border-radius: 16px;
  }

  .recommended {
    border-color: #16A34A;
    background: #F0FFF4;
  }

  .chip {
    position: absolute;
    top: -14px;
    right: 47%;
    transform: translateX(50%);
    background: #16A34A;
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 999px;
  }

  .result-title {
    margin: 1.2rem auto 0.5rem;
    font-size: 1.375rem;
    min-height: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .result-amount {
    font-size: 2rem;
    font-weight: bold;
  }

  .amount-label {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
  }

  .summary-box {
    color: #16A34A;
    background: #ffffff;
    padding: 0.5rem;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
  }

  @media screen and (max-width: 767px) {
    .chip {
      top: -26px;
    }

    .recommended .result-title {
      margin-top: 1.8rem !important;
    }
  }