  :root {
      --blue: #0072ff;
      --blue-dark: #005fd1;
      --red: #e63946;
      --gray-light: #f1f8ff;
      --gray-dark: #222;
      --white: #fff;
      --border-radius: 10px;
      --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }

    * {
      box-sizing: border-box;
    }

    body {
      font-family: var(--font-family);
      background-color: var(--blue);
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      color: var(--gray-dark);
    }

    .container {
      background: var(--white);
      border-radius: var(--border-radius);
      padding: 30px 25px;
      max-width: 420px;
      width: 90%;
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);
      animation: fadeInScale 0.5s ease forwards;
    }

    @keyframes fadeInScale {
      from {opacity: 0; transform: scale(0.9);}
      to {opacity: 1; transform: scale(1);}
    }

    h2 {
      text-align: center;
      margin-bottom: 30px;
      font-weight: 700;
      font-size: 1.9rem;
      color: var(--blue-dark);
      user-select: none;
    }

    input, button {
      width: 100%;
      font-size: 1rem;
      padding: 14px 18px;
      margin-bottom: 20px;
      border-radius: var(--border-radius);
      border: 1.8px solid #ccc;
      transition: border-color 0.3s ease;
      font-weight: 600;
      user-select: text;
    }

    input {
      outline: none;
    }

    input:focus {
      border-color: var(--blue);
      box-shadow: 0 0 8px var(--blue);
    }

    button {
      background-color: var(--blue);
      color: var(--white);
      font-weight: 700;
      border: none;
      cursor: pointer;
      user-select: none;
      transition: background-color 0.3s ease;
    }

    button:hover:not(:disabled) {
      background-color: var(--blue-dark);
    }

    button:disabled {
      background-color: #7caaff;
      cursor: not-allowed;
    }

    #result {
      font-size: 1rem;
      min-height: 150px;
      border-radius: var(--border-radius);
      padding: 20px 24px;
      margin-top: 15px;
      background-color: var(--gray-light);
      border-left: none;
      color: var(--gray-dark);
      white-space: pre-line;
      display: none;
      position: relative;
      transition: border-left-color 0.4s ease;
      user-select: none;
    }

    #result.visible {
      display: block;
      border-left: 6px solid var(--blue);
    }

    #result.error {
      border-left-color: var(--red);
      background-color: #ffe6e6;
      color: var(--red);
      font-weight: 700;
    }

    /* Status badge with blinking dot */
    .status-badge {
      position: relative;
      display: inline-block;
      padding: 8px 24px 8px 18px;
      border-radius: var(--border-radius);
      color: var(--white);
      font-weight: 700;
      font-size: 1.1rem;
      margin-bottom: 20px;
      text-transform: capitalize;
      user-select: none;
    }

    /* Different background colors by status */
    .status-badge.delivered {
      background-color: #2ecc71;
    }

    .status-badge.in-transit {
      background-color: #3498db;
    }

    .status-badge.pending {
      background-color: #f39c12;
    }

    .status-badge.cancelled {
      background-color: #e74c3c;
    }

    .status-badge.other {
      background-color: var(--blue);
    }

    /* Blinking dot */
    .status-badge::before {
      content: "";
      position: absolute;
      top: 50%;
      left: 10px;
      transform: translateY(-50%);
      width: 10px;
      height: 10px;
      background-color: #fff;
      border-radius: 50%;
      animation: blink 1.2s infinite;
      box-shadow: 0 0 6px var(--white);
    }

    /* No blinking dot on error */
    #result.error .status-badge::before {
      display: none;
    }

    @keyframes blink {
      0%, 50%, 100% { opacity: 1; }
      25%, 75% { opacity: 0; }
    }

    /* Info rows */
    .info-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      font-weight: 600;
    }

    .info-label {
      color: #555;
    }

    .delay {
      margin-top: 15px;
      color: var(--red);
      font-weight: 700;
      text-align: center;
      user-select: none;
    }

    /* Loader animation on button */
    #trackButton.loading {
      position: relative;
      pointer-events: none;
      color: transparent;
    }

    #trackButton.loading::after {
      content: "";
      position: absolute;
      top: 50%;
      left: 50%;
      width: 18px;
      height: 18px;
      margin: -9px 0 0 -9px;
      border: 3px solid var(--white);
      border-top-color: transparent;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    /* Responsive */
    @media (max-width: 480px) {
      .container {
        max-width: 95vw;
        padding: 25px 15px;
      }
    }